Is it possible to use different profile based on a padded phone number? Reminiscent of the 'Dial 9 to get out'
i.e. 812345678901
8 = a routing number
12345678901 the phone to call.
I tried changing my workflow.xml without luck
<Context name="rtmp">
<Condition variable="destNum" value="^8.*$">
<AppNode sequence="1" app="bridge" args="sip|${destNum}@myContext8"/>
<AppNode sequence="2" app="hangup" args="null"/>
</Condition>
</Context>
<Context name="rtmp">
<Condition variable="destNum" value="^9.*$">
<AppNode sequence="1" app="bridge" args="sip|${destNum}@myContext9"/>
<AppNode sequence="2" app="hangup" args="null"/>
</Condition>
</Context>
All conditions need to go into one context node (e.g. rtmp in your case). See changed node after strikethrough.
<Context name="rtmp">
<Condition variable="destNum" value="^8(.*)$">
<AppNode sequence="1" app="bridge" args="sip|$1@myContext8"/>
<AppNode sequence="2" app="hangup" args="null"/>
</Condition>
</Context>
<Context name="rtmp">
<Condition variable="destNum" value="^9(.*)$">
<AppNode sequence="1" app="bridge" args="sip|$1@myContext9"/>
<AppNode sequence="2" app="hangup" args="null"/>
</Condition>
</Context>
There must be a SIP profileID myContext8 & myContext9 in sip.xml to point to your sip gateway.
Thanks Pankaj, but I am sorry I typed my example wrong. My XML does look like your striked out example.
My main question is can I get a substring from destNum? If I could send "812345678901" to my application and use "8" for routing and then send "12345678901" to my SIP provider, I could route calls based on location easier.
North America
Europe, Middle East and Africa
Asia Pacific