<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 27, 2016 at 8:24 AM, mayamatakeshi <span dir="ltr"><<a href="mailto:mayamatakeshi@gmail.com" target="_blank">mayamatakeshi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hello, </div><div>I have this scenario:</div><div> - subscriber registers using TLS</div><div> - call arrives from PSTN gateway (in UDP) to subscriber</div><div> - I relay the INVITE to subscriber but it doesn't answer the call</div><div> - the subscriber has callforward enabled</div><div> - we send the call to PSTN callforward destination using carrierroute</div><div><br></div><div>In the above, after calling cr_route I use this:</div><div> $du = "sip:" + $rd + ":" + $rp + ";transport=udp";<br></div><div>to force the call to PSTN gateway to go out as UDP because after trying to call the subscriber, the transport changes and stays as TLS.</div><div><br></div><div>However, if instead of callforward the user has voicemail enabled, we use dispatcher to send the call to a cluster of media servers.</div><div>So, after calling ds_select_dst()</div><div>I call</div><div>  $du = "sip:" + $dd + ":" + $dp + ";transport=udp";</div><div>but this is unable to force the call to go as UDP but it still goes as in TLS</div><div><br></div><div>In both cases I see this in the log files:</div><div><div><br></div><div>/usr/local/src/git/kamailio-4.3/kamailio[19277]: WARNING: <core> [forward.c:231]: get_send_socket2(): protocol/port mismatch (forced tls:XXX.XXX.XXX.XXX:5061, to udp:YYY.YYY.YYY.YYY:5060)</div></div><div><br></div><div>But it only works for carrierroute, not for dispatcher.</div><div>I am not sure if this is a bug in dispatcher.</div><div>But anyway, is there any other way I could try to force transport=UDP?</div><div><br></div></div></blockquote><div><br></div><div>My mistake. Actually it works.</div><div>I have left an extra call to</div><div> $du = "sip:" + $rd + ":" + $rp + ";transport=udp";<br></div><div>later in my script and since ds_select_dst() changes the $du but not the $ru, I was actually messing with the value of $du by doing:<br></div><div> ds_select_dst()<br></div><div> $du = "sip:" + $dd + ":" + $dp + ";transport=udp";<br></div><div> $du = "sip:" + $rd + ":" + $rp + ";transport=udp";<br></div><div><br></div><div>Sorry for the wrong report.</div><div>Regards,</div><div>Takeshi</div><div> </div></div></div></div>