Question

I am trying to configure call intercept groups and I am having a hard time finding what is wrong with my config. When I dial the feature code to intercept *110(interceptgroup no) (in this case *110101) the dialplan doesn't match and fails. The hash is inserted successfully, I can see it in the cli via hash select/intercept_2/101. What am I missing here?

Here is my user config from directory/default.xml:

      <user bluebox_id="3" id="1001">
        <variables>
          <variable name="internal_caller_id_number" value="1001"/>
          <variable name="user_context" value="context_4"/>
          <variable name="force_transfer_context" value="context_4"/>
          <variable name="user_originated" value="true"/>
          <variable name="toll_allow" value="domestic"/>
          <variable name="accountcode" value="1001"/>
          <variable name="callrecord_inbound" value="1"/>
          <variable name="callrecord_outbound" value="1"/>
          <variable name="interceptgroup" value="101"/>
        </variables>
        <params>
          <param name="password" value="removed"/>
          <param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
        </params>
      </user>
      <user bluebox_id="5" id="1238">
        <variables>
          <variable name="internal_caller_id_number" value="1238"/>
          <variable name="user_context" value="context_4"/>
          <variable name="force_transfer_context" value="context_4"/>
          <variable name="user_originated" value="true"/>
          <variable name="toll_allow" value="domestic"/>
          <variable name="accountcode" value="1238"/>
          <variable name="callrecord_inbound" value="1"/>
          <variable name="callrecord_outbound" value="1"/>
          <variable name="interceptgroup" value="101"/>
        </variables>
        <params>
          <param name="password" value="removed"/>
          <param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
        </params>
      </user>

Here is my dialplan config from dialplan.xml:

<extension name="main_number_43" continue="true">
  <condition field="destination_number" expression="^1238$">
    <action application="hash" data="insert/intercept_2/101/${uuid}"/>
    <action application="set" bluebox="settingTimeout" data="call_timeout=30"/>
    <action application="set" bluebox="settingRing" data="ringback=${us-ring}"/>
    <action application="set" bluebox="settingRingXfer" data="transfer_ringback=${us-ring}"/>
    <action application="export" bluebox="sipCalleeIdName" data="sip_callee_id_name=linksys"/>
    <action application="export" bluebox="sipCalleeIdNumber" data="sip_callee_id_number=1238"/>
    <action application="bridge" data="user/1238@$${location_4}"/>
    <action application="hangup"/>
  </condition>
</extension>
<extension name="main_number_45" continue="true">
  <condition field="${regex(m:/${destination_number}/^\*110([0-9]+)$/$1)}" expression="^${interceptgroup}$"/>
  <condition field="destination_number" expression="^\*110([0-9]+)$">
    <action application="answer"/>
    <action application="set" data="intercept_unanswered_only=true"/>
    <action application="intercept" data="${hash(select/intercept_2/$1)}"/>
    <action application="sleep" data="2000"/>
    <action application="hangup"/>
  </condition>
</extension>
Était-ce utile?

La solution

After some headache I discovered that you cannot prepend this particular feature code with a *, it causes freeswitch to parse the digits differently by separating the feature code itself (*110 in this case) from the digits you enter as an argument, which in this case is the intercept group number. Removing the * fixed it.

   <extension name="main_number_45" continue="true">
     <condition field="${regex(m:/${destination_number}/^\110([0-9]+)$/$1)}" expression="^${interceptgroup}$"/>
     <condition field="destination_number" expression="^\110([0-9]+)$">
       <action application="answer"/>
       <action application="set" data="intercept_unanswered_only=true"/>
       <action application="intercept" data="${hash(select/intercept_2/$1)}"/>
       <action application="sleep" data="2000"/>
       <action application="hangup"/>
     </condition>
   </extension>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top