0

Okay so the problem here is I've been trying to find a dialplan for call forwarding but so far I've found only one on the official site, I configured it according to my requirement but it doesn't work, the call forward number is set but, the call doesn't get forwarded. Could you take a look at the code and tell me what's wrong?
Made some addition in default.xml in the dialplan folder as follows:
<extension name="call_forwarding_activativation">

 <condition field="destination_number" expression="^\*72$">

    <action application="play_and_get_digits" data="3 12 1 14000 # tone_stream://%(10000,0,350,440) silence_stream://250 cfwd_num \d+"/>     

    <action application="hash" data="insert/${domain_name}-call_forward/${caller_id_number}/${cfwd_num}"/>

    <action application="playback" data="tone_stream://${bong-ring}"/>

    <action application="hangup"/>

 </condition>

</extension>

  

<extension name="call_forwarding_deactivation">

 <condition field="destination_number" expression="^\*73$">       

    <action application="hash" data="delete/${domain_name}-call_forward/${caller_id_number}/${destination_number}"/>

    <action application="playback" data="tone_stream://${bong-ring}"/>

    <action application="hangup"/>

 </condition>

</extension>

  

<extension name="call_forwarding_number" continue="true">

 <condition>

    <action application="set" data="call_forwarding_number=${hash(select/${domain_name}-call_forward/${destination_number})}"/>

 </condition>

</extension>

And then added this part of the code to features.xml

<extension name="call_forwarding_activativation">

 <condition field="destination_number" expression="^\*72$">

    <action application="play_and_get_digits" data="3 12 1 14000 # tone_stream://%(10000,0,350,440) silence_stream://250 cfwd_num \d+"/>     

    <action application="hash" data="insert/${domain_name}-call_forward/${caller_id_number}/${cfwd_num}"/>

    <action application="playback" data="tone_stream://${bong-ring}"/>

    <action application="hangup"/>

 </condition>

</extension>

  

<extension name="call_forwarding_deactivation">

 <condition field="destination_number" expression="^\*73$">       

    <action application="hash" data="delete/${domain_name}-call_forward/${caller_id_number}/${destination_number}"/>

    <action application="playback" data="tone_stream://${bong-ring}"/>

    <action application="hangup"/>

 </condition>

</extension>

  

<extension name="call_forwarding_number" continue="true">

 <condition>

    <action application="set" data="call_forwarding_number=${hash(select/${domain_name}-call_forward/${destination_number})}"/>

 </condition>

</extension>

<extension name="check_call_forwarding" condition="true">

<!-- change the following regular expression to match the numbers that will utilize call forwarding-->

 <condition field="destination_number" expression="^(\d+)$">

  <action application="execute_extension" data="is_forward XML features"/>

  <action application="bridge" data="sofia/internal/$1@{domain_name}"/>

 </condition>

</extension>

I tried the code above to implement call forwarding, the forwarding number gets assigned but the call doesn't forward

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 27 '22 at 11:00

0 Answers0