[SR-Users] 2 Asterisk servers re-inviting around kamailio even with t_relay being used?

Alex Balashov abalashov at evaristesys.com
Tue Jun 8 23:20:13 CEST 2010


If that's really your complete Kamailio config, it's missing a number 
of critical checks and handlers, such as loose_route(), which handles 
sequential (in-dialog) requests differently from initial requests due 
to the presence of a Route: header and a To header tag.

You can't just stick cr_route() in the main route { ... } block 
without those canonical checks and expect everything to work as desired.

The reason that the proxy is not seeing the sequential requests 
(reinvites, BYE, etc.) is because you don't have a Record-Route 
header, which tells the endpoints to relay sequential requests through 
the proxy on the network and transport level.  Add this to your 
initial request route prior to (cr_route())[1]:

    if(!is_method("REGISTER|OPTIONS|MESSAGE"))
       record_route();

That should take care of it.

-- Alex

[1] And ideally, add quite a few other things as well.  See the
     stock configuration file for more insight.

On 06/08/2010 05:13 PM, JR Richardson wrote:

> Hi All,
>
> I'm using kamailio with carrierroute to load balance calls to other servers.
>
> I have 2 testing scenarios set up:
>
> sipp><kamailio><asterisk server
>
> In the above scenario all SIP transactions, dialogs go through
> kamailio, INVITE, Trying, ACK, OK, BYE, OK
>
> Here is another one:
>
> phone><asterisk><kamailio><asterisk server
>
> In this scenario only the initial INVITE, ACK and OK go through
> kamailio, then the 2 asterisk servers finish the session directly to
> each other with  ACK, BYE and OK
>
> In both asterisk servers, canreinvite=no is set in peers and general
> section in sip.conf.  The kamailio cfg is using t_relay.  No errors
> are coming up anywhere.
>
> Here is a pastebin of the 2 asterisk traces and the kamailio config.
>
> http://pastebin.com/Uk9qVhX2
>
> Any ideas on why the call is not maintaining SIP session through the proxy?
>
> Thanks.
>
> JR


-- 
Alex Balashov - Principal
Evariste Systems LLC
1170 Peachtree Street
12th Floor, Suite 1200
Atlanta, GA 30309
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/



More information about the sr-users mailing list