[SR-Users] Apply changes made to sip reply in onreply_route

Grant Bagdasarian GB at cm.nl
Tue Oct 8 13:10:29 CEST 2013


That's some good news =).

I'll just wait for the 4.1 release then.

Thanks!

From: sr-users-bounces at lists.sip-router.org [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla
Sent: Tuesday, October 8, 2013 1:05 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Apply changes made to sip reply in onreply_route

Hello,

upcoming 4.1 (still master branch now, but feature freeze phase) has msg_apply_changes() working for reply routes.

Cheers,
Daniel
On 10/8/13 12:14 PM, Grant Bagdasarian wrote:
Hello,

I've setup two Kamailio machines, one which does all the processing and the second one which always replies with a 500 Server Internal Error, to test my Dispatcher fail-over.
When routing a call, the call is always routed to the second Kamailio first, to test the fail-over.

What happens in this scenario is the 500 is received by the main Kamailio and the 500 message is duplicated to the capture server. After this the failure_route kicks in and the 500 is obviously never sent back to the initiator.
The changes made to the 500 message  (adding a new header), in onreply_route, aren't present when the message is duplicated to the capture server, because the original 500 message is duplicated instead of the modified one.

I tried the following things, but none of them worked:

-          Adding the header and calling sip_trace();, but this doesn't work since sip_trace() duplicated the message prior to changes made to it.

-          Msg_apply_changes(), doesn't work either, since I can't use it in onreply_route

-          Append_to_reply(), cannot be used from onreply_route

Appending new headers to replies works, but only when the reply is also sent back to the initiator, since I have the setflag(22) set. This makes sure the processed messages are also duplicated.
In this case the 500 is never sent back.

Anyone have an idea how to solve this?

Regards,

Grant




_______________________________________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--

Daniel-Constantin Mierla - http://www.asipto.com

http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

Kamailio Advanced Trainings - Berlin, Nov 25-28; Miami, Nov 18-20, 2013

  - more details about Kamailio trainings at http://www.asipto.com -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131008/3b268067/attachment-0001.html>


More information about the sr-users mailing list