I have 3 gateways: Telecom Italia on an analogue adapter MessageNet (sip provider) Skype How can I select gateway by a prefix THAT THEN GETS DROPPED before Dialing.. Example I would like to have All calls beginning with 9 Sent to MessageNet , DROPPING THE "9" All calls beginning with 7 sent to Skype, dropping the "7" Otherwise use telecom
Hi, You can do that with this dialplan : <extension name='MessageNet'> <condition field='${destination_number}' expression='^9(\d+)'> <action application='bridge' data='sofia/gateway/your MessageNet gateway name/$1'/> </condition> </extension> <extension name='Skype'> <condition field='${destination_number}' expression='^7(\d+)'> <action application='bridge' data='sofia/gateway/your Skype gateway name/$1'/> </condition> </extension> <extension name='TelecomItalia'> <condition> <action application='bridge' data='sofia/gateway/your TelecomItalia gateway name/${destination_number}'/> </condition> </extension> You can find more informations here : https://freeswitch.org/confluence/display/FREESWITCH/Regular+Expression#Regu... And this page give you exactly what you want : https://freeswitch.org/confluence/display/FREESWITCH/XML+Dialplan#XMLDialpla... ("Example 1: Capturing Digits") Alexis Le 19/06/2018 à 13:07, Francesco Facco de Lagarda a écrit :
I have 3 gateways: Telecom Italia on an analogue adapter
MessageNet (sip provider) Skype
How can I select gateway by a prefix THAT THEN GETS DROPPED before Dialing..
Example I would like to have
All calls beginning with 9 Sent to MessageNet , DROPPING THE “9”
All calls beginning with 7 sent to Skype, dropping the “7”
Otherwise use telecom
participants (2)
-
Alexis
-
Francesco Facco de Lagarda