[SR-Users] SIP re-invite Packets

Ali Taher ataher at vanrise.com
Tue Jul 17 14:40:58 CEST 2018


Hello,

 

I'm using below routing logic to change the 183 reply to 180 and send it
back to the origination.

 

Noting that Kamailio is listening on 5065.

route{

if (is_method("INVITE")) {

        xlog("L_INFO","INSIDE request route $si \n");

          insert_hf("X-AUTH-IP: $si\r\n");

}

route(FWD);

}

 

reply_route {

#xlog("L_INFO","INSDE reply \n");

    if (status == "183") {

        change_reply_status(180, "Ringing");

        exit;

    }

}

 

route[FWD] {

#xlog("L_INFO","INSIDE FWD \n");

forward(x.x.x.x,5060);

}

 

 

Below is the scenario , where the customer is sending packets to Kamailio ,
and Kamailio is forwarding them the supplier (with IP x.x.x.x) , then the
supplier reply back to kamailio  and kamailio relay the reply to the
customer 

 

----Customer---- --> ----Kamailio ---> ---Supplier---

 

I have a case where the supplier sends in some cases an in-dialog invite
(Re-Invite) , which is considered I think as SIP-Request and thus as per
above routing logic , kamailio is sending it back to the supplier , yet I
need to send it to the customer.

 

How can I solve this issue?

 

Thanks

Ali Taher

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180717/d035f10e/attachment-0001.html>


More information about the sr-users mailing list