[SR-Users] Force transport from TLS to UDP when using dispatcher

mayamatakeshi mayamatakeshi at gmail.com
Mon Feb 1 23:31:07 CET 2016


On Wed, Jan 27, 2016 at 8:24 AM, mayamatakeshi <mayamatakeshi at gmail.com>
wrote:

> Hello,
> I have this scenario:
>   - subscriber registers using TLS
>   - call arrives from PSTN gateway (in UDP) to subscriber
>   - I relay the INVITE to subscriber but it doesn't answer the call
>   - the subscriber has callforward enabled
>   - we send the call to PSTN callforward destination using carrierroute
>
> In the above, after calling cr_route I use this:
>   $du = "sip:" + $rd + ":" + $rp + ";transport=udp";
> 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.
>
> However, if instead of callforward the user has voicemail enabled, we use
> dispatcher to send the call to a cluster of media servers.
> So, after calling ds_select_dst()
> I call
>    $du = "sip:" + $dd + ":" + $dp + ";transport=udp";
> but this is unable to force the call to go as UDP but it still goes as in
> TLS
>
> In both cases I see this in the log files:
>
> /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)
>
> But it only works for carrierroute, not for dispatcher.
> I am not sure if this is a bug in dispatcher.
> But anyway, is there any other way I could try to force transport=UDP?
>
>
My mistake. Actually it works.
I have left an extra call to
  $du = "sip:" + $rd + ":" + $rp + ";transport=udp";
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:
  ds_select_dst()
  $du = "sip:" + $dd + ":" + $dp + ";transport=udp";
  $du = "sip:" + $rd + ":" + $rp + ";transport=udp";

Sorry for the wrong report.
Regards,
Takeshi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160202/9d9f7135/attachment.html>


More information about the sr-users mailing list