SOLVED Dialplan number strip not appearing in next dialplan

Status
Not open for further replies.
Jul 15, 2021
102
9
18
34
Newbie alert, I am trying to strip few characters if present in the destination number and updating the destination number inline in a dialplan. However the dialplan which is next in line, doesn't seem to get the updated variable. I am trying to prefix 0 to the destination number but the next dialplan is not getting the updated value. I must be doing something silly, please advise

Code:
Dialplan: sofia/internal/12@192.168.1.2 Regex (PASS) [strip91andaddzero] ${user_exists}(false) =~ /false/ break=on-false
Dialplan: sofia/internal/12@192.168.1.2 Regex (PASS) [strip91andaddzero] destination_number(1273757549) =~ /^(?:\+?44)|(\d{10})$/ break=on-false
Dialplan: sofia/internal/12@192.168.1.2 Action set(destination_number=01273757549) INLINE
EXECUTE [depth=0] sofia/internal/12@192.168.1.2 set(destination_number=01273757549)
2021-08-03 22:58:56.995452 [DEBUG] mod_dptools.c:1672 SET sofia/internal/12@192.168.1.2 [destination_number]=[01273757549]
Dialplan: sofia/internal/12@192.168.1.2 parsing [192.168.1.2->BSNL.11d] continue=false
Dialplan: sofia/internal/12@192.168.1.2 Regex (PASS) [gateway.11d] ${user_exists}(false) =~ /false/ break=on-false
Dialplan: sofia/internal/12@192.168.1.2 Regex (FAIL) [gateway.11d] destination_number(1273757549) =~ /^((\d{11})|(\d{6}))$/ break=on-false
 
Jul 15, 2021
102
9
18
34
<condition field="destination_number" expression="^((\d{11})|(\d{6}))$">


changed to <condition field="$destination_number" expression="^((\d{11})|(\d{6}))$"> and it works

This may be a bug in the fusionpbx UI, when you select destination_number from drop down - it produces a variable without $. However you have to manually edit the XML to introduce the $ for the condition to succeed, ticket raised with fusionpbx.
 
Last edited:
Status
Not open for further replies.