[SR-Users] SIP re-invite Packets
Ali Taher
ataher at vanrise.com
Tue Jul 17 15:21:25 CEST 2018
Hi Alex,
So loose_route() is only responsible of In-dialog requests ?
Can you please send me a simplified config that suit my case ?
Noting that I'm using Kamailio only as proxy between my customer and my supplier.
Much appreciated.
Ali Taher
-----Original Message-----
From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Alex Balashov
Sent: Tuesday, July 17, 2018 3:44 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
Hi,
In-dialog requests must be handled using loose_route(). You can find the proper boilerplate in the stock configuration file:
https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg#L587
To note, your config is not sufficient to handle all aspects of a call between endpoints in an adequate way. You will want to consider the main request_route in the main config file and adapt its most essential aspects accordingly:
https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg#L455
-- Alex
On Tue, Jul 17, 2018 at 03:40:58PM +0300, Ali Taher wrote:
> 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
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
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
More information about the sr-users
mailing list