[SR-Users] SIP re-invite Packets

yu at yu-boot.ru yu at yu-boot.ru
Tue Jul 17 20:40:58 CEST 2018


ReInvites like all in-dialog requests are processed in has_totag()/loose_route part. Default kamailio.cfg has almost identical part for this purpose.
Main idea is that an initial request (non in-dialog) hasn't To tag already. It appears only when your request "hits" remote side (called or callee, as you wish) and goes back to you. Simplified, but I hope you got an idea :)
--
sent from myMail for Android вторник, 17 июля 2018г., 17:16 +03:00 от Ali Taher  ataher at vanrise.com :

>Hi Alex,
>
>Thank you for your reply.
>
>Does below config  forward all sip requests coming from the customer to the supplier , and relay sip replies back to customer ?
>
>Where re-invite packets are handled in the below config file?
>
>Thank you 
>Ali Taher
>
>-----Original Message-----
>From: sr-users < sr-users-bounces at lists.kamailio.org> On Behalf Of Alex Balashov
>Sent: Tuesday, July 17, 2018 4:25 PM
>To: Kamailio (SER) - Users Mailing List < sr-users at lists.kamailio.org>
>Cc:  sr-users at lists.sip-router.org
>Subject: Re: [SR-Users] SIP re-invite Packets
>
>On Tue, Jul 17, 2018 at 04:21:25PM +0300, Ali Taher wrote:
>
> Can you please send me a simplified config that suit my case ?
>
>Try this for a main request route:
>
>---
>
>route {
>if(!mf_process_maxfwd_header("10")) {
>sl_send_reply("483", "Too Many Hops");
>exit;
>}
>
># Maybe some sanity_check() here. 
>
>if(has_totag()) {
>if(loose_route()) {
>if(!t_relay())
>sl_reply_error();
>
>exit;
>} else {
>if(is_method("ACK")) {
>if(t_check_trans())
>t_relay();
>} else
>sl_send_reply("403", "Forbidden");
>}
>
>exit;
>}
>
># CANCELs / branches.
>
>if(is_method("CANCEL")) {
>if(!t_relay_cancel()) {
>sl_send_reply("500", "Server Internal Error");
>exit;
>}
>
>exit;
>}
>
>t_check_trans();
>
>if(is_method("OPTIONS")) {
>sl_send_reply("200", "OK");
>exit;
>} 
>
>else if(is_method("INVITE")) {
># Route your calls.
>
>exit;
>}
>
>sl_send_reply("403", "Method unsupported");
>exit;
>}
>
>
>-- 
>Alex Balashov | Principal | Evariste Systems LLC
>
>Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
>Web:  http://www.evaristesys.com/ ,  http://www.csrpswitch.com/
>
>_______________________________________________
>Kamailio (SER) - Users Mailing List
>sr-users at lists.kamailio.org
>https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>_______________________________________________
>Kamailio (SER) - Users Mailing List
>sr-users at lists.kamailio.org
>https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180717/f4fa3b62/attachment-0001.html>


More information about the sr-users mailing list