Skip navigation
P.J. Steele 23 posts
Sep 30, 2008
Currently Being Moderated

Routing calls based on a leading number

Feb 7, 2012 6:46 AM

Tags: #fmg #workflow #sip

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>

 
Replies
  • Currently Being Moderated
    Feb 7, 2012 11:35 AM   in reply to P.J. Steele

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 7, 2012 11:41 AM   in reply to P.J. Steele

       $1 variable in below example would contain the substring after removing prefix 8.

        <Condition variable="destNum" value="^8(.*)$">

              <AppNode sequence="1" app="bridge" args="sip|$1@myContext8"/>

              <AppNode sequence="2" app="hangup" args="null"/>

         </Condition>

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points