Re: [SR-Users] Add Record-Route on 200 OK

2016-01-08 Thread Daniel-Constantin Mierla
Hello,

just to complete a bit about Via vs Record-Route: the reply received by
Kamailio will have only the addresses of the hops from Kamailio to the
sender of the request (caller). But if there are hops between Kamailio
and callee, those addresses are no longer in Via headers. Via is used to
route reply back to the caller and needs to be the addresses from
current hop towards the caller.

So even if you try to use Via addresses to rebuild the Record-Route that
is not going to work.

Also, in many cases, Record-Route headers carry special URI parameters
that are very important for the node that added Record-Route (like
dialog ids, masks for From/To updates, etc).

Therefore you should not add a record-route for a node in the path of
signaling that you don't control and you don't know what expects to be
there.

The right fix is in UA side to properly mirror Record-Route headers.

Cheers,
Daniel

On 06/01/16 16:48, Igor Potjevlesch wrote:
> Hi Alex,
>
> You're right, it was my mistake. It's one of the UA in the call-flow which
> not put the Record-Route into the replies.
> So, the issue is not on Kamalio.
>
> Nevertheless, the UA put the Record-Route into Via headers. Is there a
> simple way to copy the Via into Record-route headers?
>
> Regards,
>
> Igor.
>
>
> -Message d'origine-
> De : sr-users [mailto:sr-users-boun...@lists.sip-router.org] De la part de
> Alex Balashov
> Envoyé : mercredi 6 janvier 2016 16:42
> À : Igor Potjevlesch 
> Objet : Re: [SR-Users] Add Record-Route on 200 OK
>
> Kamailio has no hand in this behaviour. It appends the Record-Route header
> to the initial invite, but dealing with it from that point onward, including
> ensuring that it is copied into replies sent back to the initiator, is
> entirely the responsibility of the user agents/endpoints, not the proxy.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> Sent from my BlackBerry.
>   Original Message
> From: Igor Potjevlesch
> Sent: Wednesday, January 6, 2016 10:30
> To: 'Kamailio (SER) - Users Mailing List'
> Reply To: Kamailio (SER) - Users Mailing List
> Subject: Re: [SR-Users] Add Record-Route on 200 OK
>
> Hi Alex,
>
> It what I was thinking. What could cause this into Kamailio?
>
> Regards,
>
> Igor.
>
> -Message d'origine-
> De : sr-users [mailto:sr-users-boun...@lists.sip-router.org] De la part de
> Alex Balashov Envoyé : mercredi 6 janvier 2016 15:39 À :
> sr-users@lists.sip-router.org Objet : Re: [SR-Users] Add Record-Route on 200
> OK
>
> Igor,
>
> No, that is not normal. The UAS (the server receiving the initial
> INVITE) is required to copy the Record-Route into dialog-forming responses.
>
> From RFC 3261 Section 12.1.1 ("UAS Behavior"):
>
> When a UAS responds to a request with a response that establishes a dialog
> (such as a 2xx to INVITE), the UAS MUST copy all Record-Route header field
> values from the request into the response (including the URIs, URI
> parameters, and any Record-Route header field parameters, whether they are
> known or unknown to the UAS) and MUST maintain the order of those values.
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] using pipelimit at CPS (1 second)

2016-01-08 Thread Daniel-Constantin Mierla
Hello,

besides Alex' relevant remarks on time interval for sampling, note that
getting high performances require tuning other parameters, typically
across many modules. For pipelimit, be sure you increase the value for
hash_size

http://www.kamailio.org/docs/modules/stable/modules/pipelimit.html#pipelimit.p.hash_size

Look also to the readme of the modules you are using and if there is a
hash_size parameter, you should increase those too.

Then timer processes could be important for performances as well. In the
next presentation I gave some hints about bits to be adjusted for good
performances:

http://www.slideshare.net/miconda/kamailio-surfing-big-waves-of-sip-with-style

Cheers,
Daniel


On 07/01/16 20:04, Alex Balashov wrote:
> Not personally, but we sell a SIP platform built on top of Kamailio
> that is designed specifically for that purpose.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> Sent from my BlackBerry.
> *From: *Vik Killa
> *Sent: *Thursday, January 7, 2016 14:01
> *To: *Kamailio (SER) - Users Mailing List
> *Reply To: *Kamailio (SER) - Users Mailing List
> *Subject: *Re: [SR-Users] using pipelimit at CPS (1 second)
>
>
> Do you operate Kamilio in a wholesale environment with many CPS? 
>
> On Thu, Jan 7, 2016 at 12:22 PM, Alex Balashov
> > wrote:
>
> Vik,
>
> We have used pipelimit at a sampling interval of 1 second, and, on
> the basis of contact with reality, decided to shift to a 3-second
> sampling window.
>
> The major problem with the 1-second interval is not the CPU usage,
> but that it's not very useful. Such a sampling window is extremely
> responsive to fluctuations within a short time, and this manifests
> very well in SIPP testing.
>
> However, SIPP generates calls in an orderly and linear fashion.
> Real-world SIP traffic is highly bursty and volatile. The result
> is that a 1-second sampling window will not properly encapsulate
> the data so as to reliably enforce a CPS limit of X. For example,
> if you set a limit of 300 CPS, the short sampling window makes it
> quite possible to burst far beyond 300 CPS as long as it is done
> within < 50% of the duty cycle.
>
> 3 seconds is a more realistic compromise. In virtue of smoothing
> some peaks, it is less dynamic and responsive, but it far more
> accurately takes into account the bursty and chaotic nature of
> real-world high-volume call setups. These are not modeled well
> with SIPP testing.
>
> -- Alex
>
>
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920  (toll-free) /
> +1-678-954-0671  (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
> list
> sr-users@lists.sip-router.org 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] Panning next major release - v4.4

2016-01-08 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> replying on this announcement to get it fresh in mind for everyone and,
> if it is needed, start relevant discussions for upcoming major release
> 4.4.

I too would like to have capability to reload tls certificates without
restarting Kamailio.

-- Juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] Panning next major release - v4.4

2016-01-08 Thread Daniel-Constantin Mierla
Load balancer (dispatcher) and webrtc (websocket) have example of
configuration in their documentation (module readme).

Integration with other application is approached on many web
articles/blogs. There are many ways of doing it, specific for various
use cases.

Cheers,
Daniel

On 08/01/16 10:09, Abdul Basit wrote:
> I would like to have capability to have basic functionality file in
> kamailio.cfg and other integration and to have separated config file
>  for e.g. asterisk integration, load balancing, and webRTC and many more.
>
> > Date: Fri, 8 Jan 2016 10:59:55 +0200
> > To: mico...@gmail.com; sr-...@lists.sip-router.org
> > From: j...@tutpro.com
> > CC: sr-users@lists.sip-router.org
> > Subject: Re: [SR-Users] [sr-dev] Panning next major release - v4.4
> >
> > Daniel-Constantin Mierla writes:
> >
> > > replying on this announcement to get it fresh in mind for everyone
> and,
> > > if it is needed, start relevant discussions for upcoming major release
> > > 4.4.
> >
> > I too would like to have capability to reload tls certificates without
> > restarting Kamailio.
> >
> > -- Juha
> >
> > ___
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users@lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Audio issue when using 2 port ATA

2016-01-08 Thread Daniel-Constantin Mierla
You need to engage branch route again in failure route. All those tm
route blocks need to be re-engaged for each t_relay().

Cheers,
Daniel

On 07/01/16 22:09, Daniel W. Graham wrote:
>
> The SDP was updated with RTPProxy IP.
>
>  
>
> Yes, config was written around the default config, here are some
> snippets of the config that is related. Do I just need to call branch
> route in the failure route?
>
>  
>
> if ($branch(count) > 0) {
>
> t_load_contacts();
>
> t_next_contacts();
>
> t_on_failure("HUNT_FAIL");
>
> }
>
>
>
> route(RELAY);
>
>  
>
> --
>
>  
>
> route[RELAY] {
>
>  
>
> if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
>
> if(!t_is_set("branch_route"))
> t_on_branch("MANAGE_BRANCH");
>
> }
>
> if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
>
> if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
>
> }
>
> if (is_method("INVITE")) {
>
> if(!t_is_set("failure_route"))
> t_on_failure("MANAGE_FAILURE");
>
> }
>
>  
>
> if (!t_relay()) {
>
> sl_reply_error();
>
> }
>
> exit;
>
> }
>
>  
>
> branch_route[MANAGE_BRANCH] {
>
> xlogl("L_INFO", "$ci : New branch [$T_branch_idx] to $ru\n");
>
> route(NATMANAGE);
>
> }
>
>  
>
> failure_route["HUNT_FAIL"] {
>
>   if (!t_next_contacts()) {
>
> exit;
>
>   }
>
>  
>
>   t_on_failure("HUNT_FAIL");
>
>   t_relay();
>
> }
>
> dan-signature
>
>  
>
> *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> *Sent:* Thursday, January 7, 2016 4:24 AM
> *To:* Daniel W. Graham ; Kamailio (SER) - Users
> Mailing List 
> *Subject:* Re: [SR-Users] Audio issue when using 2 port ATA
>
>  
>
>  
>
> On 06/01/16 21:28, Daniel W. Graham wrote:
>
> I did more experimenting and seams the issue only exists in two of
> three configurations. If I can fix the first I think it will fix
> the second as well.
>
>  
>
> If both ATA ports share the same username and serial forking is
> used, the issue as described below happens. Looks like the issue
> is that I never called route(NATMANAGE) in the serial forking
> failure route.
>
>
> If you are having your config based on default kamailio.cfg, then you
> should engage the branch route before sending out any invite.
>
> Cheers,
> Daniel
>
>
>  
>
> -Dan
>
>  
>
> *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
> Behalf Of *Daniel W. Graham
> *Sent:* Wednesday, January 6, 2016 3:06 PM
> *To:* mico...@gmail.com ; Kamailio (SER)
> - Users Mailing List 
> 
> *Subject:* Re: [SR-Users] Audio issue when using 2 port ATA
>
>  
>
> I do control, this particular setup is in my lab. I just took
> another look at the captures and see both RTP streams (viewing in
> front of firewall). First call rtp is sourced from
> Kamailio(rtpproxy) second call rtp is sourced from one of the
> backend asterisk servers (which is where the issue is, should also
> be from rtpproxy).
>
>  
>
> -Dan
>
>  
>
> *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> *Sent:* Wednesday, January 6, 2016 8:09 AM
> *To:* Daniel W. Graham  >; Kamailio (SER) - Users Mailing List
> >
> *Subject:* Re: [SR-Users] Audio issue when using 2 port ATA
>
>  
>
> Is the firewall a system that you control and can do traces on it?
> Can you see rtp coming to it? Is it forwarded?
>
> Cheers,
> Daniel
>
> On 06/01/16 13:40, Daniel W. Graham wrote:
>
> Firewall is not doing sip alg, I have compared traces and they
> are the same.
>
> Daniel W. Graham
>
> CMSInter.net  LLC
>
> 989.400.4230
>
>
> On Jan 6, 2016, at 3:05 AM, Daniel-Constantin Mierla
> > wrote:
>
> Hello,
>
> is the firewall doing SIP ALG?
>
> Can you get a SIP network trace on UA? If yes, compare it
> with the one captured on server.
>
> Cheers,
> Daniel
>
> On 06/01/16 01:50, Daniel W. Graham wrote:
>
> Setup is -
>
>  
>
> 2 port ATA <> FIREWALL <> KAMAILIO / RTPPROXY <> ASTERISK
>
>  
>
> If I have a single port in use behind the firewall,
> all NAT functions work properly and media is relayed
> through rtpproxy.
>
>  
>
> If I have both ports in use behind the firewall, when
> 

Re: [SR-Users] Ways to reload Kamailio configuration file without restart

2016-01-08 Thread Daniel-Constantin Mierla
Hello,

if you need to change the routing logic, then you have to restart. If
you use UDP, it is not noticed at all by the clients and active calls
are not affected at all.

Restart is very fast. Also, the content of the config should be only
logic, the values (like IP addresses), should be inside the database --
for example lcr, dispatcher, ... can reload the records from database
without a need to restart, but by issuing a MI/RPC command.

Changing values for parameters can be done for many of them using
command line.

Cheers,
Daniel

On 07/01/16 08:11, Amit Patkar wrote:
> Hi
>
> What are different ways to reload Kamailio configuration file without
> restart?
> I need to make configuration file changes on production server without
> bringing down kamailio service.
>
> *Thanks & Regards,*
> Amit Patkar
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Panning next major release - v4.4

2016-01-08 Thread Daniel-Constantin Mierla
Hello,

replying on this announcement to get it fresh in mind for everyone and,
if it is needed, start relevant discussions for upcoming major release 4.4.

Cheers,
Daniel

On 14/12/15 09:07, Daniel-Constantin Mierla wrote:
> Hello,
>
> sketching the road to the next major release, so people can plan their
> goals for it and discuss, if needed, before the start of winter holidays:
>
>   - development freezing by end of January 2016
>   - test for one to one and a half month
>   - release in the first part of March 2016
>
> If there are important topics to decide on, we can organize an IRC
> meeting sometime in January 2016.
>
> Cheers,
> Daniel
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] Panning next major release - v4.4

2016-01-08 Thread Abdul Basit
I would like to have capability to have basic functionality file in 
kamailio.cfg and other integration and to have separated config file
 for e.g. asterisk integration, load balancing, and webRTC and many more.

> Date: Fri, 8 Jan 2016 10:59:55 +0200
> To: mico...@gmail.com; sr-...@lists.sip-router.org
> From: j...@tutpro.com
> CC: sr-users@lists.sip-router.org
> Subject: Re: [SR-Users] [sr-dev] Panning next major release - v4.4
> 
> Daniel-Constantin Mierla writes:
> 
> > replying on this announcement to get it fresh in mind for everyone and,
> > if it is needed, start relevant discussions for upcoming major release
> > 4.4.
> 
> I too would like to have capability to reload tls certificates without
> restarting Kamailio.
> 
> -- Juha
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
  ___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] Panning next major release - v4.4

2016-01-08 Thread Daniel-Constantin Mierla


On 08/01/16 09:59, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> replying on this announcement to get it fresh in mind for everyone and,
>> if it is needed, start relevant discussions for upcoming major release
>> 4.4.
> I too would like to have capability to reload tls certificates without
> restarting Kamailio.
>
Afaik, tls.cfg can be reloaded at runtime, that should reload the tls
certificates linked there. Have you tried and it doesn't work?

http://www.kamailio.org/docs/modules/stable/modules/tls.html#tls.r.tls.reload

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio IMS deployment

2016-01-08 Thread Daniel-Constantin Mierla
Hello,

thanks -- one more thing, though: can you export the document as pdf to
be able to view it easy on different OSes as well as browsers?

Cheers,
Daniel

On 08/01/16 17:47, Franz Edler wrote:
>
> Hello Daniel,
>
>  
>
> the short description is as follows:
>
>  
>
> It is an “IMS in one box” configuration, where I re-built the default
> configuration of the original OpenIMSCore.
>
> The configuration uses only the core-functions of the IMS. I omitted
> (disabled) advanced functions like NAT, RTP-relay, antiflood,
> capturing, etc… and created a VMware image for this configuration.
>
> It is a good starting point for educational purpose. All three servers
> (P-CSCF, I-CSCF and S-CSCF) and the HSS (from Fraunhofer) are running
> on one machine. The clients are typically provided by the host system.
>
> The additional functions which are provided by the config-files but
> disabled in a first step may be added (enabled) gradually. Also an
> application (IMS-AS) may be easily added as a further Kamailio instance.
>
> The benefit is that all these servers and function are running on one
> physical machine (e.g. a notebook).
>
>  
>
> I also made a quick drawing of the architecture (attached).
>
>  
>
> Cheers Franz
>
>  
>
> *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> *Sent:* Thursday, January 7, 2016 10:16 AM
> *To:* franz.ed...@technikum-wien.at; Kamailio (SER) - Users Mailing
> List 
> *Subject:* Re: [SR-Users] Kamailio IMS deployment
>
>  
>
> Hello,
>
> thanks for sharing these, I expect to help a lot the people starting
> to build an IMS core with Kamailio.
>
> If you can send me a short description of the IMS network you built
> with these configs, I would like to post a news article on
> kamailio.org to make it more visible.
>
> Cheers,
> Daniel
>
> On 06/01/16 16:09, Franz Edler wrote:
>
> Hi Ramya,
>
>  
>
> I now succeeded to configure a stripped down version of Kamilio IMS.
>
>  
>
> Here is my log-file and the config-files used: 
> 
> https://www.dropbox.com/s/ehkzi9pbhlp7njc/Kamailio-IMS%20config-files.zip?dl=0
>
> As you can see in the log-file I used several steps to configure
> the IMS platform. The last step (step 5) contains basic Kamailio
> and basic IMScore.
>
> For the configuration of the IMS core I disabled all additional
> functions (NAT, dispatcher, SBC …etc) which are not necessary for
> the core function.
>
> I kept the configuration scheme of the original OpenIMSCore using
> same IP-address but different ports for P-CSCF (4060), I-CSCF
> (5060) and S-CSCF (6060).
>
> I hope I have included all relevant files.
>
>  
>
> And here is the VMware-image of the last step
> 
> 5:https://www.dropbox.com/s/pwwx009hiigt27v/Debian_8.2-step5-basicKamailio%26basicIMScore.zip?dl=0
>
>
> For the VMware configuration I used the following IP addresses:
>
> 10.0.0.9the Kamailio guest system
>
> 10.0.0.10 the host system (Windows Notebook)
>
>  
>
> I hope that fits for you. In case of any questions you may ask.
>
> BR Franz
>
>  
>
> *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
> Behalf Of *Ramya Y
> *Sent:* Wednesday, December 2, 2015 10:46 AM
> *To:* sr-users@lists.sip-router.org
> 
> *Subject:* [SR-Users] Kamailio IMS deployment
>
>  
>
> Hi,
>
>  
>
> I am newbie to kamailio world and we would like to deploy Kamailio
> based IMS platform. Can any body share the link or Step by step
> procedure(user Guide) to deploy Kamailio IMS. 
>
>  
>
> Regards,
>
> Ramya
>
>
>
>
> ___
>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>
> sr-users@lists.sip-router.org 
>
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
> Book: SIP Routing With Kamailio - http://www.asipto.com
> http://miconda.eu

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Audio issue when using 2 port ATA

2016-01-08 Thread Daniel-Constantin Mierla
Welcome - glad to hear it was sorted out!

Cheers,
Daniel

On 08/01/16 18:32, Daniel W. Graham wrote:
>
> I follow now :) tested and working.
>
>  
>
> Thanks Daniel for the help!
>
>  
>
> -Dan
>
>  
>
> *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> *Sent:* Friday, January 8, 2016 3:33 AM
> *To:* Daniel W. Graham ; Kamailio (SER) - Users
> Mailing List 
> *Subject:* Re: [SR-Users] Audio issue when using 2 port ATA
>
>  
>
> You need to engage branch route again in failure route. All those tm
> route blocks need to be re-engaged for each t_relay().
>
> Cheers,
> Daniel
>
> On 07/01/16 22:09, Daniel W. Graham wrote:
>
> The SDP was updated with RTPProxy IP.
>
>  
>
> Yes, config was written around the default config, here are some
> snippets of the config that is related. Do I just need to call
> branch route in the failure route?
>
>  
>
> if ($branch(count) > 0) {
>
> t_load_contacts();
>
> t_next_contacts();
>
> t_on_failure("HUNT_FAIL");
>
> }
>
>
>
> route(RELAY);
>
>  
>
> --
>
>  
>
> route[RELAY] {
>
>  
>
> if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
>
> if(!t_is_set("branch_route"))
> t_on_branch("MANAGE_BRANCH");
>
> }
>
> if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
>
> if(!t_is_set("onreply_route"))
> t_on_reply("MANAGE_REPLY");
>
> }
>
> if (is_method("INVITE")) {
>
> if(!t_is_set("failure_route"))
> t_on_failure("MANAGE_FAILURE");
>
> }
>
>  
>
> if (!t_relay()) {
>
> sl_reply_error();
>
> }
>
> exit;
>
> }
>
>  
>
> branch_route[MANAGE_BRANCH] {
>
> xlogl("L_INFO", "$ci : New branch [$T_branch_idx] to $ru\n");
>
> route(NATMANAGE);
>
> }
>
>  
>
> failure_route["HUNT_FAIL"] {
>
>   if (!t_next_contacts()) {
>
> exit;
>
>   }
>
>  
>
>   t_on_failure("HUNT_FAIL");
>
>   t_relay();
>
> }
>
> dan-signature
>
>  
>
> *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> *Sent:* Thursday, January 7, 2016 4:24 AM
> *To:* Daniel W. Graham 
> ; Kamailio (SER) - Users Mailing List
>  
> *Subject:* Re: [SR-Users] Audio issue when using 2 port ATA
>
>  
>
>  
>
> On 06/01/16 21:28, Daniel W. Graham wrote:
>
> I did more experimenting and seams the issue only exists in
> two of three configurations. If I can fix the first I think it
> will fix the second as well.
>
>  
>
> If both ATA ports share the same username and serial forking
> is used, the issue as described below happens. Looks like the
> issue is that I never called route(NATMANAGE) in the serial
> forking failure route.
>
>
> If you are having your config based on default kamailio.cfg, then
> you should engage the branch route before sending out any invite.
>
> Cheers,
> Daniel
>
>
>
>  
>
> -Dan
>
>  
>
> *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org]
> *On Behalf Of *Daniel W. Graham
> *Sent:* Wednesday, January 6, 2016 3:06 PM
> *To:* mico...@gmail.com ; Kamailio
> (SER) - Users Mailing List 
> 
> *Subject:* Re: [SR-Users] Audio issue when using 2 port ATA
>
>  
>
> I do control, this particular setup is in my lab. I just took
> another look at the captures and see both RTP streams (viewing
> in front of firewall). First call rtp is sourced from
> Kamailio(rtpproxy) second call rtp is sourced from one of the
> backend asterisk servers (which is where the issue is, should
> also be from rtpproxy).
>
>  
>
> -Dan
>
>  
>
> *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> *Sent:* Wednesday, January 6, 2016 8:09 AM
> *To:* Daniel W. Graham  >; Kamailio (SER) - Users Mailing
> List  >
> *Subject:* Re: [SR-Users] Audio issue when using 2 port ATA
>
>  
>
> Is the firewall a system that you control and can do traces on
> it? Can you see rtp coming to it? Is it forwarded?
>
> Cheers,
> Daniel
>
> On 06/01/16 13:40, Daniel W. Graham wrote:
>
> Firewall is not doing sip alg, I have compared 

Re: [SR-Users] Kamailio - Asterisk: Handling loss of SIP BYE and dangling channels

2016-01-08 Thread Alex Balashov

Hi Benjamin,

To some extent, this is just a perennial, existential problem of using a 
proxy, so part of the answer is going to be that you need fundamentally 
reliable signalling, speaking from the vantage point of something which 
operates are a signalling relay (i.e. Kamailio).


However, I understand that reality does not mirror expectations. As the 
purveyor of a SIP service delivery platform based entirely on Kamailio, 
we run into this problem all the time, particularly since our system 
generates accounting records with billing involvement. There are some 
well-established and canonical solutions:


1. You make it sound like the Asterisk channel stays up indefinitely in 
such a situation. Why is that?


The normal behaviour is for Asterisk to hang up the call after some 
number of seconds without incoming RTP.


It's likely that tuning the RTP timeout setting to something 
conservative[1] would solve a lot of your problems off the bat.


2. The Kamailio 'dialog' module can spoof a BYE toward both endpoints 
based on an absolute dialog timeout (regardless of whether both dialog 
peers are still actively engaged), which can be set globally or on a 
per-dialog basis:


http://kamailio.org/docs/modules/4.3.x/modules/dialog.html#timeout-avp-id

http://kamailio.org/docs/modules/4.3.x/modules/dialog.html#default-timeout-id

http://www.kamailio.org/wiki/cookbooks/4.3.x/pseudovariables#dlg_ctx_attr

3. The 'dialog' module also has a dead peer detection / keepalive scheme 
based on sequential OPTIONS pings:


http://kamailio.org/docs/modules/4.3.x/modules/dialog.html#idp1898328

If one or both of the peers don't respond to these, the dialog will be 
timed out, and if you've set $dlg_ctx(timeout_bye) = 1, this will result 
in a spoofed BYE toward both peers as well.


4. There are various other signalling-oriented UA-side mechanisms 
intended to solve this problem as well, such as SIP Session Timers (RFC 
4028).


...

Of course, all this depends on the maintenance of dialog state in 
Kamailio, which is an additional complication and a potential wrinkle if 
that data were to be lost.


So, it's a bit hard to say whether Kamailio is the _best_ place to solve 
this problem. The first line of defence really should be at the endpoint 
level on both sides of the proxy. Beyond that, Kamailio does offer some 
pragmatic solutions.


-- Alex

[1] Notwithstanding RTP interruptions due to VAD, hold, etc.

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] using re.subst with an $avp or $var

2016-01-08 Thread Alex Balashov

On 01/08/2016 04:28 PM, Vik Killa wrote:


 $var(destnumber1) =
$(ru{re.subst,/^sip:$var(PrefixMatch)(.*)@(.*)/\1/});
 $var(destnumber2) = $(ru{re.subst,/^sip:00(.*)@(.*)/\1/});
 xlog("L_INFO", "destnumber1 $var(destnumber1)\n");
 xlog("L_INFO", "destnumber2 $var(destnumber2)\n");

In the above, destnumber2 works, yet destnumber1 does not.


If I may be so bold, I think you have your answer. :-)

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] using re.subst with an $avp or $var

2016-01-08 Thread Vik Killa
Assuming the answer is no this is not possible, then does anyone know of a
way to accomplish this? Perhaps with textops module?
Thanks,
/V

On Fri, Jan 8, 2016 at 4:30 PM, Alex Balashov 
wrote:

> On 01/08/2016 04:28 PM, Vik Killa wrote:
>
>  $var(destnumber1) =
>> $(ru{re.subst,/^sip:$var(PrefixMatch)(.*)@(.*)/\1/});
>>  $var(destnumber2) = $(ru{re.subst,/^sip:00(.*)@(.*)/\1/});
>>  xlog("L_INFO", "destnumber1 $var(destnumber1)\n");
>>  xlog("L_INFO", "destnumber2 $var(destnumber2)\n");
>>
>> In the above, destnumber2 works, yet destnumber1 does not.
>>
>
> If I may be so bold, I think you have your answer. :-)
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio - Asterisk: Handling loss of SIP BYE and dangling channels

2016-01-08 Thread Sergey Okhapkin
RTP timeout in asterisk is the best place to handle the situation. Another 
option is SIP session timer, but it could give false negatives with NATed 
clients.

On Friday 08 January 2016 11:56:51 Benjamin Fitzgerald wrote:
> Hi,
> 
> I'm wondering what the best approach to handling a SIP dialog when one
> endpoint disappears/fails to send the BYE message.
> 
> I have Kamailio as a proxy for all mobile (iPhone/Android) SIP clients.
> Occasionally, the user hangs up the call but no BYE message is received.
> This means that Asterisk has an open channel even though there is no
> client. Kamailio also continues to receive successful registrations from
> the SIP client so the endpoint is not down completely.
> 
> Is Kamailio the appropriate place to handle this situation? What do you
> recommend? If not could you point me in the right direction? RTP timeout?
> Asterisk? The SIP client itself?
> 
> Thanks for your help.
> 
> Benjamin Fitzgerald
> LETS Corporation
> (925) 235-1154
> b...@letscorp.us

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio - Asterisk: Handling loss of SIP BYE and dangling channels

2016-01-08 Thread Benjamin Fitzgerald
Hi Alex,

Thanks for your quick response.

1. Sorry to be unclear, the Asterisk channel does not stay up indefinitely.
We do have a max timeout but since a large portion of our business is based
on conference calling, the timeout is rather large. I will definitely
change the RTP timeout as my first attempt.

2. Since Asterisk is also a serving as PSTN gateway, I like this because it
allows me to control calls with SIP endpoints separately. We have no issues
with all PSTN calls and I'd like to keep it that way :)

3. I'm not sure this will work in my case because the endpoint is
reachable, but client state is not in sync with the server: i.e.
Kamailio/Asterisk think it's in a call but the endpoint does not. If
sending OPTIONS could tell me if the endpoint thinks it's in a call or not,
then this could potentially work. On a side note, is there a SIP message
that I can send to a client to have it report its state? (Registered, Auth
Failed, In a call, etc.)

4. I do know about SIP Session Timers but chose to not use them during the
initial deployment (because of Asterisk channel timeout which I know
realize is too large). Maybe this will help in conjunction with the above
methods.

Would you mind expanding on endpoint defense? Specifically with mobile
client applications? I agree this would be the ideal solution, I'm just not
sure where to start here.

Benjamin Fitzgerald
LETS Corporation
(925) 235-1154
b...@letscorp.us




***Confidential Notice:
This message is intended only for the use of the individual or entity to
which it is addressed and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this message in error, please
delete this message from all computers and contact Orion Systems/LETS Corp
immediately by return e-mail and/or telephone at (925) 566-5600

On Fri, Jan 8, 2016 at 12:08 PM, Alex Balashov 
wrote:

> Hi Benjamin,
>
> To some extent, this is just a perennial, existential problem of using a
> proxy, so part of the answer is going to be that you need fundamentally
> reliable signalling, speaking from the vantage point of something which
> operates are a signalling relay (i.e. Kamailio).
>
> However, I understand that reality does not mirror expectations. As the
> purveyor of a SIP service delivery platform based entirely on Kamailio, we
> run into this problem all the time, particularly since our system generates
> accounting records with billing involvement. There are some
> well-established and canonical solutions:
>
> 1. You make it sound like the Asterisk channel stays up indefinitely in
> such a situation. Why is that?
>
> The normal behaviour is for Asterisk to hang up the call after some number
> of seconds without incoming RTP.
>
> It's likely that tuning the RTP timeout setting to something
> conservative[1] would solve a lot of your problems off the bat.
>
> 2. The Kamailio 'dialog' module can spoof a BYE toward both endpoints
> based on an absolute dialog timeout (regardless of whether both dialog
> peers are still actively engaged), which can be set globally or on a
> per-dialog basis:
>
> http://kamailio.org/docs/modules/4.3.x/modules/dialog.html#timeout-avp-id
>
>
> http://kamailio.org/docs/modules/4.3.x/modules/dialog.html#default-timeout-id
>
> http://www.kamailio.org/wiki/cookbooks/4.3.x/pseudovariables#dlg_ctx_attr
>
> 3. The 'dialog' module also has a dead peer detection / keepalive scheme
> based on sequential OPTIONS pings:
>
> http://kamailio.org/docs/modules/4.3.x/modules/dialog.html#idp1898328
>
> If one or both of the peers don't respond to these, the dialog will be
> timed out, and if you've set $dlg_ctx(timeout_bye) = 1, this will result in
> a spoofed BYE toward both peers as well.
>
> 4. There are various other signalling-oriented UA-side mechanisms intended
> to solve this problem as well, such as SIP Session Timers (RFC 4028).
>
> ...
>
> Of course, all this depends on the maintenance of dialog state in
> Kamailio, which is an additional complication and a potential wrinkle if
> that data were to be lost.
>
> So, it's a bit hard to say whether Kamailio is the _best_ place to solve
> this problem. The first line of defence really should be at the endpoint
> level on both sides of the proxy. Beyond that, Kamailio does offer some
> pragmatic solutions.
>
> -- Alex
>
> [1] Notwithstanding RTP interruptions due to VAD, hold, etc.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) 

Re: [SR-Users] Kamailio - Asterisk: Handling loss of SIP BYE and dangling channels

2016-01-08 Thread Alex Balashov

Benjamin,

On 01/08/2016 03:25 PM, Benjamin Fitzgerald wrote:


1. Sorry to be unclear, the Asterisk channel does not stay up
indefinitely. We do have a max timeout but since a large portion of our
business is based on conference calling, the timeout is rather large. I
will definitely change the RTP timeout as my first attempt.


Yes, but I was referring specifically to the RTP timeout. If the mobile 
endpoint goes away, it will stop sending RTP. If Asterisk detects that 
no RTP has been received in x seconds, it should hang up the channel, 
after prophylactically sending a BYE for the call in the direction of 
Kamailio/the mobile peer.


I had been under the impression that Asterisk has a fairly conservative 
default RTP timeout anyway, but it seems I may be mistaken:


https://github.com/asterisk/asterisk/blob/master/configs/samples/pjsip.conf.sample#L740

https://github.com/asterisk/asterisk/blob/master/configs/samples/sip.conf.sample#L624

(Not sure which SIP channel driver you're using.)


3. I'm not sure this will work in my case because the endpoint is
reachable, but client state is not in sync with the server: i.e.
Kamailio/Asterisk think it's in a call but the endpoint does not. If
sending OPTIONS could tell me if the endpoint thinks it's in a call or
not, then this could potentially work.


Would sending a BYE to both peers not have the effect of synchronising 
them forcefully to a state of "the call is hung up"?


If you're concerned about sending a BYE to an endpoint that thinks the 
call is already hung up, don't be. In that case, it'll simply be 
rejected. You can't negatively affect the state of a dialog that's 
already dead.


Curious, however: when you say "Kamailio/Asterisk think it's in a call", 
how does this apply to Kamailio?


Stateful SIP proxies are transaction-stateful, not dialog-stateful.

Thus, by default, Kamailio doesn't know anything about "calls", but only 
the SIP transactions of which they are made up, and only for so long as 
those transactions are active. The 'dialog' module allows Kamailio to be 
call-stateful, at the cost of additional statekeeping complexity, but 
you should only use this capability if you need it for something (e.g. 
limiting concurrent calls, keepalive/timeout as described previously, etc.)



On a side note, is there a SIP message that I can send to a client to
have it report its state? (Registered, Auth Failed, In a call, etc.)


There's no standard query mechanism like this that I am aware of; the 
only way of disseminating such state information with which I'm familiar 
is presence, which is proactively pushed out by the endpoints and 
requires server-side support.



4. I do know about SIP Session Timers but chose to not use them during
the initial deployment (because of Asterisk channel timeout which I know
realize is too large). Maybe this will help in conjunction with the
above methods.


SSTs are rather bureaucratic and, in my experience, often incorrectly 
implemented or unsupported. In the SST conception of things, the roles 
in keepalive ping-pong are negotiated entirely between the UAs, and it 
is up to the UAs to maintain those roles. This goes wrong easily enough 
that server-side solutions such as periodic reinvites and other "pings" 
(like the Kamailio dialog module's OPTIONS pings) are a rather popular 
alternative.



Would you mind expanding on endpoint defense? Specifically with mobile
client applications? I agree this would be the ideal solution, I'm just
not sure where to start here.


By "endpoint defence" I simply meant that detecting dead peers should be 
up to the SIP endpoints (mobile SIP client and Asterisk, by the sound of 
it) first and foremost, and that any proxy-side measures should be a 
secondary layer.


-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] using re.subst with an $avp or $var

2016-01-08 Thread Vik Killa
I'm not trying to replace the R-URI like in your example, im trying to
remove a prefix from the RURI

On Fri, Jan 8, 2016 at 4:34 PM, Alex Balashov 
wrote:

> On 01/08/2016 04:28 PM, Vik Killa wrote:
>
>  $var(destnumber1) =
>> $(ru{re.subst,/^sip:$var(PrefixMatch)(.*)@(.*)/\1/});
>>
>
> But, it's certainly worth asking if what you're trying to accomplish here
> can't be accomplished differently...
>
>$var(destnumber1) = "$rz:" + $var(PrefixMatch) + "@" + $rd + ":" + $rp;
>
> Or:
>
>   $var(destnumber1) = $_s($rz:$var(PrefixMatch)@$rd:$rp);
>
> -- Alex
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] Panning next major release - v4.4

2016-01-08 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> Afaik, tls.cfg can be reloaded at runtime, that should reload the tls
> certificates linked there. Have you tried and it doesn't work?
> 
> http://www.kamailio.org/docs/modules/stable/modules/tls.html#tls.r.tls.reload

I just tried by replacing ca_list file of my proxy (that contained ca
certs of my peers) with a single bogus ca cert.  Then I executed tls.cfg
and made a call from one of the peers to my proxy.  My proxy still
recognized the call as coming from the peer based on its tls common
name.  My understanding is that this should not have been possible if
the cached ca_list of my proxy would have been updated.

-- Juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] using re.subst with an $avp or $var

2016-01-08 Thread Alex Balashov

On 01/08/2016 04:28 PM, Vik Killa wrote:


 $var(destnumber1) =
$(ru{re.subst,/^sip:$var(PrefixMatch)(.*)@(.*)/\1/});


But, it's certainly worth asking if what you're trying to accomplish 
here can't be accomplished differently...


   $var(destnumber1) = "$rz:" + $var(PrefixMatch) + "@" + $rd + ":" + $rp;

Or:

  $var(destnumber1) = $_s($rz:$var(PrefixMatch)@$rd:$rp);

-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] using re.subst with an $avp or $var

2016-01-08 Thread Vik Killa
Hello,
Is it possible to use $avp() or $var() inside re.subst?
Example:

$var(PrefixMatch) = "00";
$var(destnumber1) =
$(ru{re.subst,/^sip:$var(PrefixMatch)(.*)@(.*)/\1/});
$var(destnumber2) = $(ru{re.subst,/^sip:00(.*)@(.*)/\1/});
xlog("L_INFO", "destnumber1 $var(destnumber1)\n");
xlog("L_INFO", "destnumber2 $var(destnumber2)\n");

In the above, destnumber2 works, yet destnumber1 does not.
Thanks!
/V
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio - Asterisk: Handling loss of SIP BYE and dangling channels

2016-01-08 Thread Benjamin Fitzgerald
Hi,

I'm wondering what the best approach to handling a SIP dialog when one
endpoint disappears/fails to send the BYE message.

I have Kamailio as a proxy for all mobile (iPhone/Android) SIP clients.
Occasionally, the user hangs up the call but no BYE message is received.
This means that Asterisk has an open channel even though there is no
client. Kamailio also continues to receive successful registrations from
the SIP client so the endpoint is not down completely.

Is Kamailio the appropriate place to handle this situation? What do you
recommend? If not could you point me in the right direction? RTP timeout?
Asterisk? The SIP client itself?

Thanks for your help.

Benjamin Fitzgerald
LETS Corporation
(925) 235-1154
b...@letscorp.us
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio - Asterisk: Handling loss of SIP BYE and dangling channels

2016-01-08 Thread Benjamin Fitzgerald
Alex,

I think #1 fixed it for me! Thank you so much! I changed the RTP timeout on
a test account SIP account and immediately it resolved the issue.

You're right, sending a BYE would effectively synchronize them however I
did not think keepalive using OPTIONS scheme would send a BYE message in
the event of a dead RTP session. That's why I thought this scheme may not
work.

I was mistaken about referring to Kamailio as dialog stateful, it's just
easier for me to think about a call that way. When debugging this problem,
I pulled up the SIP dialog on my Homer server and saw the last message
being 200 OK sent to the SIP Client (after Invite/Trying) and the BYE was
never sent back from the client. I suppose I phrased this incorrectly as
Kamailio thinks the endpoint is in a call, when really it is just Asterisk
and I am personally associating the state with these transactions.

Yes, I recall when I initially read about SSTs, many people reported they
had difficulty getting them to function properly. So far it looks like I
will not have to implement any proxy-side measures.

Benjamin Fitzgerald
LETS Corporation
(925) 235-1154
b...@letscorp.us




***Confidential Notice:
This message is intended only for the use of the individual or entity to
which it is addressed and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this message in error, please
delete this message from all computers and contact Orion Systems/LETS Corp
immediately by return e-mail and/or telephone at (925) 566-5600

On Fri, Jan 8, 2016 at 12:47 PM, Alex Balashov 
wrote:

> Benjamin,
>
> On 01/08/2016 03:25 PM, Benjamin Fitzgerald wrote:
>
> 1. Sorry to be unclear, the Asterisk channel does not stay up
>> indefinitely. We do have a max timeout but since a large portion of our
>> business is based on conference calling, the timeout is rather large. I
>> will definitely change the RTP timeout as my first attempt.
>>
>
> Yes, but I was referring specifically to the RTP timeout. If the mobile
> endpoint goes away, it will stop sending RTP. If Asterisk detects that no
> RTP has been received in x seconds, it should hang up the channel, after
> prophylactically sending a BYE for the call in the direction of
> Kamailio/the mobile peer.
>
> I had been under the impression that Asterisk has a fairly conservative
> default RTP timeout anyway, but it seems I may be mistaken:
>
>
> https://github.com/asterisk/asterisk/blob/master/configs/samples/pjsip.conf.sample#L740
>
>
> https://github.com/asterisk/asterisk/blob/master/configs/samples/sip.conf.sample#L624
>
> (Not sure which SIP channel driver you're using.)
>
> 3. I'm not sure this will work in my case because the endpoint is
>> reachable, but client state is not in sync with the server: i.e.
>> Kamailio/Asterisk think it's in a call but the endpoint does not. If
>> sending OPTIONS could tell me if the endpoint thinks it's in a call or
>> not, then this could potentially work.
>>
>
> Would sending a BYE to both peers not have the effect of synchronising
> them forcefully to a state of "the call is hung up"?
>
> If you're concerned about sending a BYE to an endpoint that thinks the
> call is already hung up, don't be. In that case, it'll simply be rejected.
> You can't negatively affect the state of a dialog that's already dead.
>
> Curious, however: when you say "Kamailio/Asterisk think it's in a call",
> how does this apply to Kamailio?
>
> Stateful SIP proxies are transaction-stateful, not dialog-stateful.
>
> Thus, by default, Kamailio doesn't know anything about "calls", but only
> the SIP transactions of which they are made up, and only for so long as
> those transactions are active. The 'dialog' module allows Kamailio to be
> call-stateful, at the cost of additional statekeeping complexity, but you
> should only use this capability if you need it for something (e.g. limiting
> concurrent calls, keepalive/timeout as described previously, etc.)
>
> On a side note, is there a SIP message that I can send to a client to
>> have it report its state? (Registered, Auth Failed, In a call, etc.)
>>
>
> There's no standard query mechanism like this that I am aware of; the only
> way of disseminating such state information with which I'm familiar is
> presence, which is proactively pushed out by the endpoints and requires
> server-side support.
>
> 4. I do know about SIP Session Timers but chose to not use them during
>> the initial deployment (because of Asterisk channel timeout which I know
>> realize is too large). Maybe this will help in conjunction with the
>> above methods.
>>
>
> SSTs are rather bureaucratic and, in my experience, often incorrectly
> implemented or unsupported. In the SST conception of things, the roles 

Re: [SR-Users] using re.subst with an $avp or $var

2016-01-08 Thread Alex Balashov

On 01/08/2016 04:38 PM, Vik Killa wrote:


I'm not trying to replace the R-URI like in your example, im trying to
remove a prefix from the RURI


Oh, I see.

You might consider stripping[1] the necessary number of characters from 
the user part of the RURI, then.


   $var(prefix_len) = $(var(PrefixMatch){s.len});
   $var(destnumber1) = $(rU{s.strip,$var(prefix_len)});

-- Alex

[1] http://www.kamailio.org/wiki/cookbooks/4.3.x/transformations#sstrip_len

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] Panning next major release - v4.4

2016-01-08 Thread Juha Heinanen
Juha Heinanen writes:

> I just tried by replacing ca_list file of my proxy (that contained ca
> certs of my peers) with a single bogus ca cert.  Then I executed tls.cfg
> and made a call from one of the peers to my proxy.  My proxy still
> recognized the call as coming from the peer based on its tls common
> name.  My understanding is that this should not have been possible if
> the cached ca_list of my proxy would have been updated.

It turned out that the old tls connection from the peer to my proxy was
still alive.  After terminating the connection, a new connection setup
was correctly refused.

So looks like certs can be reloaded on the fly.  I'll try later with
client and server certs.

-- Juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] using re.subst with an $avp or $var

2016-01-08 Thread Alex Balashov

On 01/08/2016 04:40 PM, Vik Killa wrote:


That last statement was in-accurate. Im not trying to modify the R-URI
at all actually.
I'd like to create a variable.


Right, you're trying to extract a value from the RURI, transform it, and 
copy the transformed value into something else.


I think my last suggestion would serve that aim, if I understood the 
objective correctly.


-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] using re.subst with an $avp or $var

2016-01-08 Thread Vik Killa
That last statement was in-accurate. Im not trying to modify the R-URI at
all actually.
I'd like to create a variable.

On Fri, Jan 8, 2016 at 4:38 PM, Vik Killa  wrote:

> I'm not trying to replace the R-URI like in your example, im trying to
> remove a prefix from the RURI
>
> On Fri, Jan 8, 2016 at 4:34 PM, Alex Balashov 
> wrote:
>
>> On 01/08/2016 04:28 PM, Vik Killa wrote:
>>
>>  $var(destnumber1) =
>>> $(ru{re.subst,/^sip:$var(PrefixMatch)(.*)@(.*)/\1/});
>>>
>>
>> But, it's certainly worth asking if what you're trying to accomplish here
>> can't be accomplished differently...
>>
>>$var(destnumber1) = "$rz:" + $var(PrefixMatch) + "@" + $rd + ":" + $rp;
>>
>> Or:
>>
>>   $var(destnumber1) = $_s($rz:$var(PrefixMatch)@$rd:$rp);
>>
>> -- Alex
>>
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>> 303 Perimeter Center North, Suite 300
>> Atlanta, GA 30346
>> United States
>>
>> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] using re.subst with an $avp or $var

2016-01-08 Thread Vik Killa
Hi Alex,
Thank you! Your suggestion will most likely fit our solution.
/V

On Fri, Jan 8, 2016 at 4:42 PM, Alex Balashov 
wrote:

> On 01/08/2016 04:40 PM, Vik Killa wrote:
>
> That last statement was in-accurate. Im not trying to modify the R-URI
>> at all actually.
>> I'd like to create a variable.
>>
>
> Right, you're trying to extract a value from the RURI, transform it, and
> copy the transformed value into something else.
>
> I think my last suggestion would serve that aim, if I understood the
> objective correctly.
>
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Panning next major release - v4.4 - ds_ping_interval

2016-01-08 Thread Daniel-Constantin Mierla
It is always possible to propose new feature, but not guaranteed they
will be in a release.

Usually, not to forget about them, we used issue tracker to collect
these proposals. However, if there are going to be many of them, we may
end up with a overloaded tracker with new feature requests. In that case
we should consider using a wiki page where anyone can add content.

But probably at this moment it is still ok to use the tracker on github,
not having too many items in it.

Cheers,
Daniel

On 08/01/16 11:54, Sven Neuhaus wrote:
> Oh, is it time to wish for things? :-)
>
> What we would like to see is the ability to globally pause all OPTIONs
> checks (set ds_ping_interval temporarily to 0 at runtime).
>
> We have a master/slave setup and the slave is failing its pings because
> it has no network access and it fills the log with errors.
>
> In the long term it would be really nice to be able to share ping status
> between multiple instances of Kamailio servers so when the slave takes
> over for the former master it already knows the status of all remote hosts.
>
> -Sven
>
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio - Asterisk: Handling loss of SIP BYE and dangling channels

2016-01-08 Thread Alex Balashov

On 01/08/2016 04:32 PM, Benjamin Fitzgerald wrote:


I think #1 fixed it for me! Thank you so much! I changed the RTP timeout
on a test account SIP account and immediately it resolved the issue.


Excellent! Happy to help.


You're right, sending a BYE would effectively synchronize them
however I did not think keepalive using OPTIONS scheme would send a
BYE message in the event of a dead RTP session. That's why I thought
this scheme may not work.


No, indeed it would not; Kamailio has no awareness of RTP whatsoever. 
All such schemes, including this one, as well as SSTs, are aimed at 
detecting dead peers purely from signalling (that is, SIP) alone.


The way the OPTIONS keepalive flow works, for example, is:

UA A  Proxy   UA B
==
    OPTIONS >
   < 200 OK -
<--- OPTIONS 
--- 200 OK >

If UA B goes away:

UA A ProxyUA B
==
   OPTIONS >
  [no response]
  ...

  --- BYE --->
< BYE -
--- 200 OK --->

The BYEs are crafted by Kamailio to (a) look to UA A like they came from 
UA B and (b) to look to UA B like they came from UA A. This is because a 
proxy cannot, formally speaking, endogenously originate in-dialog 
requests. So, it's definitely a spoof-hack, but it works.


This mimics the more typical B2BUA-based approach of periodically 
hitting both ends with empty reinvites whose effect is nullary (i.e. no 
SDP amendments or remote dialog URI changes), and whose sole purpose is 
to see if a 200 OK response is returned. If not, you can assume the 
endpoint's dead or unreachable.


All proxy-side measures are going to operate on SIP solely.


I suppose I phrased this incorrectly as Kamailio thinks the endpoint
is in a call, when really it is just Asterisk and I am personally
associating the state with these transactions.


Well, it's understandable that you think in call-centric terms; we all 
do. It just becomes important when illuminating distinctions tied up in 
protocol semantics. It's a task requiring some pedantry.


-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Example kamailio.cfg t_check_trans()

2016-01-08 Thread Daniel-Constantin Mierla
Welcome - enhancements to the docs are always more than welcome!

Cheers,
Daniel

On 04/01/16 09:29, Phil Lavin wrote:
>
> Thanks, Daniel. I’ll update the docs to clarify this, if I get a moment.
>
>  
>
>  
>
> Cheers
>
>  
>
> Phil
>
>  
>
> *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
> Behalf Of *Daniel-Constantin Mierla
> *Sent:* 04 January 2016 08:06
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Example kamailio.cfg t_check_trans()
>
>  
>
> Hello,
>
> On 31/12/15 12:39, Phil Lavin wrote:
>
> Hi there,
>
>  
>
> The example config that Kamailio ships with contains this block of
> code in request_route:
>
>  
>
> # handle retransmissions
>
> if(t_precheck_trans()) {
>
>  t_check_trans();
>
>  exit;
>
> }
>
> t_check_trans();
>
>  
>
> I am not fully understanding the requirement for either of the
> t_check_trans() here. As far as I can see from the documentation,
> t_check_trans() returns a boolean value and does not modify any
> data internally.
>
>  
>
> Can anyone help me find out what the relevance of the
> t_check_trans() calls is?
>
>  
>
> t_check_trans() is used to detect retransmissions. If a retransmission
> is received, then the last reply (if any) needs to be sent back, then
> t_check_trans() does an 'exit' internally.
>
> Cheers,
> Daniel
>
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
> Book: SIP Routing With Kamailio - http://www.asipto.com
> http://miconda.eu

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] Fosdem 2016

2016-01-08 Thread Daniel-Constantin Mierla
Hello,

as a intermediary summary, so far the upper limit is like 18 people
(announced as possible participants directly or indirectly on mailing
lists) and probably at least 10.

So maybe we should try to get a reservation in advance -- we will wait
more to see if others intend to join, but we need to find someone,
preferably living in Brussels, or at least speak French/Dutch, to
propose a place and deal with the reservation.

Cheers,
Daniel

On 07/01/16 19:16, Camille Oudot wrote:
> Le Tue, 5 Jan 2016 20:06:19 +0100,
> Daniel-Constantin Mierla  a écrit :
>
>> anyone going to Fosdem?
> Hi,
>
> I'll be there too, up for any chat / dinner / drink event.
>
> See you
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio IMS deployment

2016-01-08 Thread Franz Edler
Hello Daniel,

 

the short description is as follows:

 

It is an "IMS in one box" configuration, where I re-built the default
configuration of the original OpenIMSCore.

The configuration uses only the core-functions of the IMS. I omitted
(disabled) advanced functions like NAT, RTP-relay, antiflood, capturing,
etc. and created a VMware image for this configuration.

It is a good starting point for educational purpose. All three servers
(P-CSCF, I-CSCF and S-CSCF) and the HSS (from Fraunhofer) are running on one
machine. The clients are typically provided by the host system.

The additional functions which are provided by the config-files but disabled
in a first step may be added (enabled) gradually. Also an application
(IMS-AS) may be easily added as a further Kamailio instance.

The benefit is that all these servers and function are running on one
physical machine (e.g. a notebook). 

 

I also made a quick drawing of the architecture (attached).

 

Cheers Franz

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, January 7, 2016 10:16 AM
To: franz.ed...@technikum-wien.at; Kamailio (SER) - Users Mailing List

Subject: Re: [SR-Users] Kamailio IMS deployment

 

Hello,

thanks for sharing these, I expect to help a lot the people starting to
build an IMS core with Kamailio.

If you can send me a short description of the IMS network you built with
these configs, I would like to post a news article on kamailio.org to make
it more visible.

Cheers,
Daniel

On 06/01/16 16:09, Franz Edler wrote:

Hi Ramya,

 

I now succeeded to configure a stripped down version of Kamilio IMS.

 

Here is my log-file and the config-files used:
https://www.dropbox.com/s/ehkzi9pbhlp7njc/Kamailio-IMS%20config-files.zip?dl
=0

As you can see in the log-file I used several steps to configure the IMS
platform. The last step (step 5) contains basic Kamailio and basic IMScore.

For the configuration of the IMS core I disabled all additional functions
(NAT, dispatcher, SBC .etc) which are not necessary for the core function. 

I kept the configuration scheme of the original OpenIMSCore using same
IP-address but different ports for P-CSCF (4060), I-CSCF (5060) and S-CSCF
(6060).

I hope I have included all relevant files.

 

And here is the VMware-image of the last step 5:
https://www.dropbox.com/s/pwwx009hiigt27v/Debian_8.2-step5-basicKamailio%26b
asicIMScore.zip?dl=0 

For the VMware configuration I used the following IP addresses:

10.0.0.9the Kamailio guest system

10.0.0.10 the host system (Windows Notebook)

 

I hope that fits for you. In case of any questions you may ask.

BR Franz

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Ramya Y
Sent: Wednesday, December 2, 2015 10:46 AM
To: sr-users@lists.sip-router.org  
Subject: [SR-Users] Kamailio IMS deployment

 

Hi,

 

I am newbie to kamailio world and we would like to deploy Kamailio based IMS
platform. Can any body share the link or Step by step procedure(user Guide)
to deploy Kamailio IMS. 

 

Regards,

Ramya






___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org  
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu


Kamailio-IMS test-architecture.docx
Description: MS-Word 2007 document
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Audio issue when using 2 port ATA

2016-01-08 Thread Daniel W. Graham
I follow now :) tested and working.

Thanks Daniel for the help!

-Dan

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, January 8, 2016 3:33 AM
To: Daniel W. Graham ; Kamailio (SER) - Users Mailing List 

Subject: Re: [SR-Users] Audio issue when using 2 port ATA

You need to engage branch route again in failure route. All those tm route 
blocks need to be re-engaged for each t_relay().

Cheers,
Daniel
On 07/01/16 22:09, Daniel W. Graham wrote:
The SDP was updated with RTPProxy IP.

Yes, config was written around the default config, here are some snippets of 
the config that is related. Do I just need to call branch route in the failure 
route?

if ($branch(count) > 0) {
t_load_contacts();
t_next_contacts();
t_on_failure("HUNT_FAIL");
}

route(RELAY);

--

route[RELAY] {

if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
}
if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
}
if (is_method("INVITE")) {
if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
}

if (!t_relay()) {
sl_reply_error();
}
exit;
}

branch_route[MANAGE_BRANCH] {
xlogl("L_INFO", "$ci : New branch [$T_branch_idx] to $ru\n");
route(NATMANAGE);
}

failure_route["HUNT_FAIL"] {
  if (!t_next_contacts()) {
exit;
  }

  t_on_failure("HUNT_FAIL");
  t_relay();
}
[dan-signature]

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Thursday, January 7, 2016 4:24 AM
To: Daniel W. Graham ; Kamailio 
(SER) - Users Mailing List 

Subject: Re: [SR-Users] Audio issue when using 2 port ATA


On 06/01/16 21:28, Daniel W. Graham wrote:
I did more experimenting and seams the issue only exists in two of three 
configurations. If I can fix the first I think it will fix the second as well.

If both ATA ports share the same username and serial forking is used, the issue 
as described below happens. Looks like the issue is that I never called 
route(NATMANAGE) in the serial forking failure route.

If you are having your config based on default kamailio.cfg, then you should 
engage the branch route before sending out any invite.

Cheers,
Daniel




-Dan

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel W. Graham
Sent: Wednesday, January 6, 2016 3:06 PM
To: mico...@gmail.com; Kamailio (SER) - Users Mailing 
List 
Subject: Re: [SR-Users] Audio issue when using 2 port ATA

I do control, this particular setup is in my lab. I just took another look at 
the captures and see both RTP streams (viewing in front of firewall). First 
call rtp is sourced from Kamailio(rtpproxy) second call rtp is sourced from one 
of the backend asterisk servers (which is where the issue is, should also be 
from rtpproxy).

-Dan

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Wednesday, January 6, 2016 8:09 AM
To: Daniel W. Graham >; Kamailio 
(SER) - Users Mailing List 
>
Subject: Re: [SR-Users] Audio issue when using 2 port ATA

Is the firewall a system that you control and can do traces on it? Can you see 
rtp coming to it? Is it forwarded?

Cheers,
Daniel
On 06/01/16 13:40, Daniel W. Graham wrote:
Firewall is not doing sip alg, I have compared traces and they are the same.

Daniel W. Graham
CMSInter.net LLC
989.400.4230

On Jan 6, 2016, at 3:05 AM, Daniel-Constantin Mierla 
> wrote:
Hello,

is the firewall doing SIP ALG?

Can you get a SIP network trace on UA? If yes, compare it with the one captured 
on server.

Cheers,
Daniel
On 06/01/16 01:50, Daniel W. Graham wrote:
Setup is -

2 port ATA <> FIREWALL <> KAMAILIO / RTPPROXY <> ASTERISK

If I have a single port in use behind the firewall, all NAT functions work 
properly and media is relayed through rtpproxy.

If I have both ports in use behind the firewall, when outbound calls from UA 
are placed there is two way audio on both calls. However if inbound calls are 
placed to UA, the first call works, second call only has outbound audio.

Different SIP URI is used for each port.

If the firewall is eliminated everything works fine.

Anyone have an idea how to troubleshoot or what could be missing? I have done 
packet captures on both the UA side and Kamailio side, and I see two RTP flows 
(rtp ports match on both sides as well) despite lack of inbound audio on the