[asterisk-users] Dial command for SIP driver with To-header config

Matthew Jordan mjordan at digium.com
Tue Apr 26 07:45:30 CDT 2016


On Fri, Apr 22, 2016 at 11:04 AM, Nitesh Bansal <nitesh.bansal at gmail.com>
wrote:

> Hello,
>
> I'm using the following Dial command syntax:
> Dial*(SIP/peer/exten!sip:xyz at xyz.com <sip%3Axyz at xyz.com>*), the SIP URI
> after the '!' mark should be set as To-URI in outgoing INVITE
> from Asterisk.
> It works, but problem is that To-URI formatting is a bit messed up,
> It looks as follows:
> *sip:sip:xyz at xyz.com <sip%3Asip%3Axyz at xyz.com>*, it seems that Asterisk
> added an extra '*sip:'* in the
> To-header and it breaks.
>
> I'm using Asterisk 13.
> I'm wondering if this behaviour is intended or a potential bug?
>
>
I would think that it isn't a bug. If you look at the documentation of that
dial string option for the chan_sip channel driver in sip.conf.sample, you
can see that the URI scheme is left off:

  54 ; All of these dial strings specify the SIP request URI.
  55 ; In addition, you can specify a specific To: header by adding an
  56 ; exclamation mark after the dial string, like
  57 ;
  58 ;         SIP/sales at mysipproxy!sales at edvina.net

While it might be nice if it didn't always use a scheme of 'sip', that'd
probably be categorized as an improvement to this option.

-- 
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160426/33afd017/attachment.html>


More information about the asterisk-users mailing list