Hello,

As I understand now , append_hf function must be called from either 
REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE or BRANCH_ROUTE.

I'm not sure if this what I need in my case , where I want to insert a new 
header to the INVITE packet then forward it .

Any help would be appreciated.

Regards,
Ali Taher

-----Original Message-----
From: Ali Taher [mailto:[email protected]] 
Sent: Friday, March 30, 2018 10:02 AM
To: 'Kamailio (SER) - Users Mailing List' <[email protected]>
Cc: 'Ali Taher~Vanrise Technical Support' <[email protected]>
Subject: RE: [SR-Users] 180 and 183 SIP messages

Thank you Alex for your response.

So if I want to add a header to the INVITE packet , and also  detect if the 
message is 183 and then change it to 180 then forward it back , does is do the 
job :

route{
if (is_method("INVITE"))
                {       
append_hf("Test: this is a test");
}
forward(127.0.0.1,5060);
}
reply_route {
    if (status == "183") {
        change_reply_status(180, "Ringing");
        exit;
    }
}

Regards,
Ali Taher
-----Original Message-----
From: sr-users [mailto:[email protected]] On Behalf Of Alex 
Balashov
Sent: Thursday, March 29, 2018 9:02 PM
To: Kamailio (SER) - Users Mailing List <[email protected]>
Subject: Re: [SR-Users] 180 and 183 SIP messages

You can absolutely do it:

https://kamailio.org/docs/modules/5.1.x/modules/textopsx.html#textopsx.f.change_reply_status

You can even remove the embedded SDP if desired, using the various textops 
functions:

https://kamailio.org/docs/modules/5.1.x/modules/textops.html

Whether you _should_ do this just because you _can_, on the other hand, is a 
question I would consider very carefully.

On Thu, Mar 29, 2018 at 06:56:52PM +0300, Ali Taher wrote:

> Hi Arsen,
> 
>  
> 
> I know that such thing can be done through freeswitch , but I need to do it 
> using Kamailio for specific reason.
> 
>  
> 
> Regards,
> 
> Ali Taher
> 
>  
> 
> From: sr-users [mailto:[email protected]] On Behalf 
> Of Arsen
> Sent: Thursday, March 29, 2018 6:49 PM
> To: Kamailio (SER) - Users Mailing List <[email protected]>
> Subject: Re: [SR-Users] 180 and 183 SIP messages
> 
>  
> 
> Hi,
> 
>  
> 
> It should be possible with freeswitch as well, google for freeswitch cause 
> code substitution and you will see example.
> 
>  
> 
>  
> 
> Regards,
> 
>  
> 
> 
> 
> 
>  
> 
> Arsen Semionov
> 
> www.eurolan.info <http://www.eurolan.info>
> 
> cell: +442035198881
> 
>  
> 
> On Thu, Mar 29, 2018 at 6:44 PM, Ali Taher <[email protected] 
> <mailto:[email protected]> > wrote:
> 
> Hello everyone,
> 
>  
> 
> I’m working on freeswitch , where I have SIP calls coming from A-Party to my 
> freeswitch and I’m routing it to B-Party.
> 
>  
> 
> I’m facing an issue , when I’m getting back the 183 message from the 
> supplier(B-Party) and forwarding it to the customer(A-Party); the customer is 
> not hearing the RBT and asking to send 180 rather than 183 . (the supplier is 
> only sending 183 without 180).
> 
>  
> 
> Is it possible using kamailio to replace this 183 message with 180 message , 
> or even add 180 message while keeping the same 183 message ?
> 
>  
> 
> Regards,
> 
> Ali Taher
> 
>  
> 
> 
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> [email protected] <mailto:[email protected]>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
>  
> 

> _______________________________________________
> Kamailio (SER) - Users Mailing List
> [email protected]
> 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
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to