[Freeswitch-users] How to use $0 in dialplan?

vfclists . vfclists at gmail.com
Mon Mar 28 15:10:17 MSD 2016


This may be due to my ignorance on how regexes are matched to parts of the
dialled number.

I am testing a new trunk in the dialplan by routing a single number through
it. All the other numbers use the existing trunk and will be switched over
later. This means I match the whole number and use it in the dial plan.
However when I use $0 on its on in the dial string it works okay, but when
I prefix it, eg 240$0 the $0 is not translated to the dialled number and is
sent literally to the provider with the obvious results.

    <!-- route 1234 numbers through trunkxxx ->
    <condition field="destination_number"  break="on-true"
          expression="^1234567890$">
          <action application="bridge" data="sofia/gateway/trunkxxx/240$0"/>
    </condition>

What do I need to do to send the whole matched number prefixed or suffixed
with some other numbers?


-- 
Frank Church

=======================
http://devblog.brahmancreations.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160328/919c1c75/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list