Dial Application - Different Syntax Question

General discussions about Asterisk.

Moderators: Moderator, Support

Dial Application - Different Syntax Question

Postby g9s0x » Fri Jul 31, 2015 10:55 am

I've seen a couple different ways that Dial() has been laid out in both test and production dialplans. I wanted to ask some of the more versed users here to explain the differences and when/where each, or both, is appropriate.

The fundamental definition of the syntax from the O'Reilly book states:
Dial(technology/user[:password]@remote_host[:port][/remote_extension])

Let's say in sip.conf I have a context [test] and I want a particular extension to dial out to this. I have seen the following two representations:

Dial(SIP/{EXTEN}@test)
Dial(SIP/test/${EXTEN})

I will say, in my own dialplans, I have only used the first case without issue for calls to a remote host. I have used the second case structure for TDM calls when using a DAHDI T1/E1 card, for example Dial(DAHDI/g1/${EXTEN}).

Thanks in advance!
g9s0x
Newsterisk
 
Posts: 28
Joined: Wed Jul 28, 2010 3:08 pm

Re: Dial Application - Different Syntax Question

Postby ambiorixg12 » Sat Aug 01, 2015 12:15 am

These 2 are diffents syntax but the final result is the same.

Dial(SIP/{EXTEN}@test)
Dial(SIP/test/${EXTEN})


Also check
SIP dial strings
-----------------------------------------------------------
In the dialplan (extensions.conf) you can use several
syntaxes for dialing SIP devices.
SIP/devicename
SIP/username@domain (SIP uri)
SIP/username[:password[:md5secret[:authname[:transport]]]]@host[:port]
SIP/devicename/extension
SIP/devicename/extension/IPorHost
SIP/username@domain//IPorHost
ambiorixg12
Astmaster
 
Posts: 967
Joined: Sun Mar 04, 2007 9:32 pm
Location: Dominican Republic


Return to Asterisk General

Who is online

Users browsing this forum: No registered users and 1 guest