Hey Timo <br><br>Thanks for your email.<br>I apologise i never copied the config properly. I missed a } to close the if statement.<br>You can see that the route(WITHINDLG); is called for all requests from this config.<br>
<br><br><br> # MANAGE ALL DIALOGS<br> #===================================================<br> if (is_method("INVITE"))<br> {<br> if(is_method("INVITE") && !has_totag())<br>
{<br> $dlg_ctx(timeout_route) = 12;<br> $dlg_ctx(timeout_bye) = 1;<br> }<br><br> dlg_manage();<br><br> }<br><br> <br> if(is_method("BYE|CANCEL"))<br><br> {<br>
<br> dlg_manage();<br><br><br> }<br> <br> <br><br> # per request initial checks<br> route(REQINIT);<br><br> # NAT detection<br> route(NAT);<br><br> # handle requests within SIP dialogs<br>
route(WITHINDLG);<br><br> ### only initial requests (no To tag)<br><br> # CANCEL processing<br> if (is_method("CANCEL"))<br> {<br> if (t_check_trans())<br> t_relay();<br>
exit;<br> }<br><br> t_check_trans();<br><br> # authentication<br> route(AUTH);<br><br> # record routing for dialog forming requests (in case they are routed)<br> # - remove preloaded route headers<br>
remove_hf("Route");<br> if (is_method("INVITE|SUBSCRIBE"))<br> record_route(); <br><br><br><br>Thanks again for your help.<br><br>Phillip<br><br><div class="gmail_quote">On Tue, Sep 20, 2011 at 3:06 PM, Timo Reimann <span dir="ltr"><<a href="mailto:timo.reimann@1und1.de">timo.reimann@1und1.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hey Phillip,<br>
<div class="im"><br>
<br>
On 20.09.2011 13:48, Phillman25 Kyriacou wrote:<br>
> Thanks for your email.<br>
><br>
> Yes dlg_manage(); has to now be called on INVITE and BYE/CANCEL messages.<br>
> Where would i have to call loose_route()? Only on INVITE?<br>
<br>
</div>On *all* in-dialog requests, i.e., all requests which contain a To tag.<br>
This may include Re-INVITEs too (but not initial INVITEs).<br>
<div class="im"><br>
<br>
> My configuration did not change between 3.1.2 and 3.1.5.<br>
><br>
> Call flow example:<br>
> ==============<br>
><br>
> Cisco PGW ===> Kamailio 3.1.5 ===> VOIP PROVIDER or ASTERISK PABX<br>
><br>
><br>
> The below is my configuration.<br>
<br>
</div>Let's take a look at it:<br>
<br>
<br>
> #!KAMAILIO<br>
> #<br>
<br>
[...]<br>
<div class="im"><br>
> if(is_method("BYE|CANCEL"))<br>
><br>
> {<br>
><br>
> dlg_manage();<br>
><br>
><br>
><br>
> # per request initial checks<br>
> route(REQINIT);<br>
><br>
> # NAT detection<br>
> route(NAT);<br>
><br>
> # handle requests within SIP dialogs<br>
> route(WITHINDLG);<br>
<br>
</div>[...]<br>
<div class="im"><br>
> # Handle requests within SIP dialogs<br>
> route[WITHINDLG] {<br>
> if (has_totag()) {<br>
> # sequential request withing a dialog should<br>
> # take the path determined by record-routing<br>
> if (loose_route()) {<br>
<br>
</div>[...]<br>
<br>
<br>
So route[WITHINDLG] contains the logic to track in-dialog requests.<br>
However, you seem to call that route only from BYE and CANCEL requests,<br>
missing out ACKs, which is likely the reason why things go wrong. So<br>
make sure you run all in-dialog requests through that route, and you<br>
should be fine (hopefully).<br>
<br>
<br>
Cheers,<br>
<font color="#888888"><br>
--Timo<br>
</font></blockquote></div><br>