Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

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


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
nitesh.bansal at gmail...
Guest





PostPosted: Fri Apr 22, 2016 11:05 am    Post subject: [asterisk-users] Dial command for SIP driver with To-header Reply with quote

Hello,


I'm using the following Dial command syntax:

Dial(SIP/peer/exten!sip:xyz@xyz.com ([email]sip%3Axyz@xyz.com[/email])), 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@xyz.com ([email]sip%3Asip%3Axyz@xyz.com[/email]), 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?


Thanks,

Nitesh
Back to top
mjordan at digium.com
Guest





PostPosted: Tue Apr 26, 2016 7:47 am    Post subject: [asterisk-users] Dial command for SIP driver with To-header Reply with quote

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


I'm using the following Dial command syntax:

Dial(SIP/peer/exten!sip:xyz@xyz.com ([email]sip%3Axyz@xyz.com[/email])), 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@xyz.com ([email]sip%3Asip%3Axyz@xyz.com[/email]), 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@mysipproxy!sales@edvina.net (sales@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
Back to top
nitesh.bansal at gmail...
Guest





PostPosted: Wed Apr 27, 2016 6:34 am    Post subject: [asterisk-users] Dial command for SIP driver with To-header Reply with quote

Thanks Matt, I adjusted my code to trim the URI scheme.


Regards,

Nitesh


On Tue, Apr 26, 2016 at 2:45 PM, Matthew Jordan <mjordan@digium.com (mjordan@digium.com)> wrote:
Quote:

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


I'm using the following Dial command syntax:

Dial(SIP/peer/exten!sip:xyz@xyz.com ([email]sip%3Axyz@xyz.com[/email])), 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@xyz.com ([email]sip%3Asip%3Axyz@xyz.com[/email]), 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@mysipproxy!sales@edvina.net (sales@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







--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services