<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>It’s for our logging. Each INVITE is pretty much a separate row in our logging table. Responses and in-dialog requests on the INVITE trigger an update on the row, where the state of the row is updated.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>This allows us to see in which (custom) state each call is.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Each time the Dispatcher tries a destination, an INVITE goes out and is also captured. A row is then created in our logging table. When the destination replies with a 500, the state should be changed to “Failed”.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>When the Dispatcher tries the next destination, this should trigger a new row in the table.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I’m using custom headers to store and pass data around, which are used by our services to translate the SIP messages into our own format for logging.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] <b>On Behalf Of </b>Klaus Darilion<br><b>Sent:</b> Tuesday, October 8, 2013 2:51 PM<br><b>To:</b> sr-users@lists.sip-router.org<br><b>Subject:</b> Re: [SR-Users] Apply changes made to sip reply in onreply_route<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Am 08.10.2013 12:14, schrieb Grant Bagdasarian:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal>When routing a call, the call is always routed to the second Kamailio first, to test the fail-over.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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. <o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>Out of curiosity -why do you add a header to the response if it is likely to be dropped (depending of the response in the second branch)? Just to signal data to the capture server?<br><br>klaus<o:p></o:p></span></p></div></body></html>