<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Trebuchet MS" size="2"><span style="font-size:10pt;">
<div>Hello all,</div>
<div> </div>
<div>There is something I can’t understand using Kamailio as proxy to route SUBSCRIBE/NOTIFY dialogs between a client and a server</div>
<div> </div>
<div>I do record_route() on the first SUBSCRIBE received by Kamailio</div>
<div>The next SUBSCRIBE is well handled by Kamailio in the [WITHIN_DIALOG] bloc but the 200/OK no more contains record-route header</div>
<div>So the 3<font size="1"><span style="font-size:6.65pt;"><sup>rd</sup></span></font> SUBSCRIBE no more sets a relevant route and Kamailio rejets it with a 404 ?</div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div>How to proceed so that 200/Ok within dialog still contains Record-route header ?</div>
<div> </div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div>Here are the piece of routing logic involved</div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div>        if (is_method("PUBLISH|SUBSCRIBE")) {</div>
<div>                record_route();</div>
<div style="text-indent:35.4pt;">  $ru = "sip:192.168.0.250:6070";</div>
<div style="text-indent:35.4pt;">  route(RELAY);</div>
<div style="text-indent:35.4pt;">  exit;</div>
<div>      }</div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div>And the as-is route[WITHINDLG] function</div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div>route[WITHINDLG] {</div>
<div>        if (has_totag()) {</div>
<div>                # sequential request withing a dialog should</div>
<div>                # take the path determined by record-routing</div>
<div>                if (loose_route()) {</div>
<div>#!ifdef WITH_WEBSOCKETS</div>
<div>                        if ($du == "") {</div>
<div>                                if (!handle_ruri_alias()) {</div>
<div>                                        xlog("L_ERR", "Bad alias <$ru>\n");</div>
<div>                                        sl_send_reply("400", "Bad Request");</div>
<div>                                        exit;</div>
<div>                                }</div>
<div>                        }</div>
<div>#!endif</div>
<div>                        route(RELAY);</div>
<div>                }</div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div>Thanks for your help</div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div>Olivier </div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
</span></font>
</body>
</html>