[Freeswitch-users] Dialplan variables

Brian West brian at freeswitch.org
Thu Feb 5 12:45:22 PST 2009


Nik,
	We did answer you twice.  ${destination_number}, But you need to not  
approach this with an Asterisk mindset.

Example:

<extension name="dial_my_mobile">
       <condition field="destination_number" expression="^(0\d+)$">
             <action application="bridge" data="sofia/default/$1 at 21X.XXX.XXX 
/XXX"/>
       </condition>
     </extension>

In this example the regular expression would match everything start  
with a 0 and capture the zero plus all digits and put it into $1, Then  
in the next line you use $1 to pass what the regular expression matched.

This concept is a bit different vs Asterisk.

/b


On Feb 5, 2009, at 2:36 PM, Nik Middleton wrote:

> Hi Guys,
>
> Simple question, tried asking on IRC but no joy, they’re too busy  
> slating other systems.
>
> I’m trying to dial out via a remote sip gateway via the dial plan
>
> <extension name="dial_my_mobile">
>       <condition field="destination_number" expression="^0773400000$">
>             <action application="bridge" data="sofia/${use_profile}/0773400000 at 21X.XXX.XXX 
> /XXX"/>
>       </condition>
>     </extension>
>
> This works fine, but I’d like to wild card the extension so it  
> matches on anything starting with a 0 the a number > 0
>
> How do I pass the number dialed using a variable?  In asterisk I  
> would put ${EXTEN}
>
> Finally I also have the sip gateway registered
>
> Mag       gateway         sip:xxx at hostname.net      REGED
>
> Is it possible to use the name of this gateway instead of the IP  
> address as in 21X.XXX.XXX/XXX ?
>
> Regards
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090205/d4836e77/attachment-0002.html 


More information about the FreeSWITCH-users mailing list