Allow international calling

Status
Not open for further replies.

Artesia

New Member
Aug 26, 2020
3
0
1
24
Hi lads,

I've been searching for a while, and for some reason the things I find on allowing international calling all seem to not work. I have tried over 20 regex expressions, including the ones in fusionpbx's documentation, every time I try to call an international number with +47 or +49 (Norwegian and German respectively) it doesn't work.

We have set the same conditions for our local numbers, and this does work.
What am I doing wrong?

Here's an example that's working:
1598520340662.png
 

Artesia

New Member
Aug 26, 2020
3
0
1
24
The RegEx I have used:
Code:
^((00|\+)49)?(0?[2-9][0-9]{1,})$
(Germany)
Code:
 ^(00\d{9,17})$
Link
And an edited version
Code:
^((00|\+)\d{9,17})$
And a plethora more that I can't really find right now.
 
Last edited:

mat1010

Member
Jun 8, 2019
56
13
8
Germany
I'm missing the most important piece in your dialplan screenshot: the bridge part. Usually $1 is used to reference the first matchgroup of you regex. If you just use $1 and use multiple matchgroups, you will never transmit the whole number to your gateway.

Could you please just try to start with ^(0049\d+)$ to keep the regex simple, call 0049... and see if it works? Afterwards you can extend it and limit it to specific countries as you like. It's also worth to mention that this rule has to apply BEFORE other rules that match numbers starting with 0, so the "order" has to be lower than this other rule e.g. 99.

Also, what does "not work" mean? What kind of behaviour do you see? Do you have any logs network traces to check what happens?
 
Last edited:

Artesia

New Member
Aug 26, 2020
3
0
1
24
I'm missing the most important piece in your dialplan screenshot: the bridge part. Usually $1 is used to reference the first matchgroup of you regex. If you just use $1 and use multiple matchgroups, you will never transmit the whole number to your gateway.

Could you please just try to start with ^(0049\d+)$ to keep the regex simple, call 0049... and see if it works? Afterwards you can extend it and limit it to specific countries as you like. It's also worth to mention that this rule has to apply BEFORE other rules that match numbers starting with 0, so the "order" has to be lower than this other rule e.g. 99.

Also, what does "not work" mean? What kind of behaviour do you see? Do you have any logs network traces to check what happens?

Apologies, I'm rather new to troubleshooting a PBX, I was unsure what to post, thank you for being so hospitable!

Would you be able to expand on what you mean with the matchgroups?

Here's an example of the bridge, I have $2 in this case, we did this because otherwise we weren't able to call.

1598538119274.png

I'm also using your mentioned example, however I am now getting the following:

Code:
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Regex (PASS) [+49] ${user_exists}(false) =~ /false/ break=on-false
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Regex (PASS) [+49] destination_number(00494919711650) =~ /^(0049\d+)$/ break=on-false
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action set(sip_h_X-accountcode=${accountcode})
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action export(call_direction=outbound)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action unset(call_timeout)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action set(hangup_after_bridge=true)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action set(effective_caller_id_name=${outbound_caller_id_name})
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action set(effective_caller_id_number=${outbound_caller_id_number})
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action set(inherit_codec=true)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action set(ignore_display_updates=true)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action set(callee_id_number=00494919711650)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action set(continue_on_fail=true)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action bridge(sofia/gateway/fbb698d7-5c84-4104-a250-6bf9e556a5af/32)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 Dialplan: sofia/internal/101@example.nl Action bridge(sofia/gateway/36119656-296c-4e1d-9ba5-ac33d87d6498/32)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:287 (sofia/internal/101@example.nl) State Change CS_ROUTING -> CS_EXECUTE
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:644 (sofia/internal/101@example.nl) State ROUTING going to sleep
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/101@example.nl) Running State Change CS_EXECUTE (Cur 1 Tot 716)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:651 (sofia/internal/101@example.nl) State EXECUTE
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_sofia.c:209 sofia/internal/101@example.nl SOFIA EXECUTE
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:329 sofia/internal/101@example.nl Standard EXECUTE
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(caller_id_number=101)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [caller_id_number]=[101]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(RFC2822_DATE=Thu, 27 Aug 2020 16:09:39 +0200)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [RFC2822_DATE]=[Thu, 27 Aug 2020 16:09:39 +0200]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl export(origination_callee_id_name=00494919711650)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_channel.c:1310 EXPORT (export_vars) [origination_callee_id_name]=[00494919711650]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl hash(insert/example.nl-last_dial/101/00494919711650)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(sip_h_X-accountcode=)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [sip_h_X-accountcode]=[UNDEF]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl export(call_direction=outbound)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_channel.c:1310 EXPORT (export_vars) [call_direction]=[outbound]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl unset(call_timeout)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1817 UNSET [call_timeout]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(hangup_after_bridge=true)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [hangup_after_bridge]=[true]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(effective_caller_id_name=WerkplekCloud)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [effective_caller_id_name]=[WerkplekCloud]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(effective_caller_id_number=+31852105188)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [effective_caller_id_number]=[+31852105188]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(inherit_codec=true)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [inherit_codec]=[true]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(ignore_display_updates=true)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [ignore_display_updates]=[true]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(callee_id_number=00494919711650)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [callee_id_number]=[00494919711650]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl set(continue_on_fail=true)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_dptools.c:1672 SET sofia/internal/101@example.nl [continue_on_fail]=[true]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl bridge(sofia/gateway/fbb698d7-5c84-4104-a250-6bf9e556a5af/32)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_channel.c:1264 sofia/internal/101@example.nl EXPORTING[export_vars] [domain_name]=[example.nl] to event
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_channel.c:1264 sofia/internal/101@example.nl EXPORTING[export_vars] [call_direction]=[outbound] to event
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_channel.c:1264 sofia/internal/101@example.nl EXPORTING[export_vars] [origination_callee_id_name]=[00494919711650] to event
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_channel.c:1264 sofia/internal/101@example.nl EXPORTING[export_vars] [call_direction]=[outbound] to event
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] switch_ivr_originate.c:2242 Parsing global variables
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [NOTICE] switch_channel.c:1118 New Channel sofia/internal/32 [88ea7f65-7f8d-48fe-a3ed-218912e035a1]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.628183 [DEBUG] mod_sofia.c:5073 sofia/internal/32 setting variable [sip_cid_type]=[pid]
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] mod_sofia.c:5089 (sofia/internal/32) State Change CS_NEW -> CS_INIT
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_INIT (Cur 2 Tot 717)
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:628 (sofia/internal/32) State INIT
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] mod_sofia.c:93 sofia/internal/32 SOFIA INIT
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] sofia_glue.c:1618 sofia/internal/32 sending invite version: 1.10.3 -release-15-129de34d84 64bit
88ea7f65-7f8d-48fe-a3ed-218912e035a1 Local SDP:
88ea7f65-7f8d-48fe-a3ed-218912e035a1 v=0
88ea7f65-7f8d-48fe-a3ed-218912e035a1 o=FreeSWITCH 1598511087 1598511088 IN IP4 {eradicatedforprivacy}
88ea7f65-7f8d-48fe-a3ed-218912e035a1 s=FreeSWITCH
88ea7f65-7f8d-48fe-a3ed-218912e035a1 c=IN IP4 {eradicatedforprivacy}
88ea7f65-7f8d-48fe-a3ed-218912e035a1 t=0 0
88ea7f65-7f8d-48fe-a3ed-218912e035a1 m=audio 26292 RTP/AVP 9 0 8 101 13
88ea7f65-7f8d-48fe-a3ed-218912e035a1 a=rtpmap:9 G722/8000
88ea7f65-7f8d-48fe-a3ed-218912e035a1 a=rtpmap:0 PCMU/8000
88ea7f65-7f8d-48fe-a3ed-218912e035a1 a=rtpmap:8 PCMA/8000
88ea7f65-7f8d-48fe-a3ed-218912e035a1 a=rtpmap:101 telephone-event/8000
88ea7f65-7f8d-48fe-a3ed-218912e035a1 a=fmtp:101 0-16
88ea7f65-7f8d-48fe-a3ed-218912e035a1 a=rtpmap:13 CN/8000
88ea7f65-7f8d-48fe-a3ed-218912e035a1 a=ptime:20
88ea7f65-7f8d-48fe-a3ed-218912e035a1 a=sendrecv
88ea7f65-7f8d-48fe-a3ed-218912e035a1
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:40 sofia/internal/32 Standard INIT
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:48 (sofia/internal/32) State Change CS_INIT -> CS_ROUTING
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:628 (sofia/internal/32) State INIT going to sleep
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_ROUTING (Cur 2 Tot 717)
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] sofia.c:7325 Channel sofia/internal/32 entering state [calling][0]
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:644 (sofia/internal/32) State ROUTING
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] mod_sofia.c:154 sofia/internal/32 SOFIA ROUTING
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_ivr_originate.c:67 (sofia/internal/32) State Change CS_ROUTING -> CS_CONSUME_MEDIA
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:644 (sofia/internal/32) State ROUTING going to sleep
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_CONSUME_MEDIA (Cur 2 Tot 717)
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:663 (sofia/internal/32) State CONSUME_MEDIA
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.628183 [DEBUG] switch_core_state_machine.c:663 (sofia/internal/32) State CONSUME_MEDIA going to sleep
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.648176 [DEBUG] sofia.c:7325 Channel sofia/internal/32 entering state [calling][0]
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] sofia.c:7325 Channel sofia/internal/32 entering state [terminated][484]
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [NOTICE] sofia.c:8558 Hangup sofia/internal/32 [CS_CONSUME_MEDIA] [INVALID_NUMBER_FORMAT]
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_HANGUP (Cur 2 Tot 717)
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:848 (sofia/internal/32) Callstate Change DOWN -> HANGUP
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:850 (sofia/internal/32) State HANGUP
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] mod_sofia.c:453 Channel sofia/internal/32 hanging up, cause: INVALID_NUMBER_FORMAT
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:60 sofia/internal/32 Standard HANGUP, cause: INVALID_NUMBER_FORMAT
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:850 (sofia/internal/32) State HANGUP going to sleep
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:620 (sofia/internal/32) State Change CS_HANGUP -> CS_REPORTING
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_REPORTING (Cur 2 Tot 717)
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:936 (sofia/internal/32) State REPORTING
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:174 sofia/internal/32 Standard REPORTING, cause: INVALID_NUMBER_FORMAT
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:936 (sofia/internal/32) State REPORTING going to sleep
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:611 (sofia/internal/32) State Change CS_REPORTING -> CS_DESTROY
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_session.c:1726 Session 717 (sofia/internal/32) Locked, Waiting on external entities
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.668175 [DEBUG] switch_ivr_originate.c:3995 Originate Resulted in Error Cause: 28 [INVALID_NUMBER_FORMAT]
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [NOTICE] switch_core_session.c:1744 Session 717 (sofia/internal/32) Ended
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [NOTICE] switch_core_session.c:1748 Close Channel sofia/internal/32 [CS_DESTROY]
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:739 (sofia/internal/32) Running State Change CS_DESTROY (Cur 1 Tot 717)
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:749 (sofia/internal/32) State DESTROY
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] mod_sofia.c:364 sofia/internal/32 SOFIA DESTROY
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:181 sofia/internal/32 Standard DESTROY
88ea7f65-7f8d-48fe-a3ed-218912e035a1 2020-08-27 16:09:39.668175 [DEBUG] switch_core_state_machine.c:749 (sofia/internal/32) State DESTROY going to sleep
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.668175 [INFO] mod_dptools.c:3631 Originate Failed. Cause: INVALID_NUMBER_FORMAT
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 EXECUTE [depth=0] sofia/internal/101@example.nl bridge(sofia/gateway/36119656-296c-4e1d-9ba5-ac33d87d6498/32)
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.688179 [DEBUG] switch_channel.c:1264 sofia/internal/101@example.nl EXPORTING[export_vars] [domain_name]=[example.nl] to event
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.688179 [DEBUG] switch_channel.c:1264 sofia/internal/101@example.nl EXPORTING[export_vars] [call_direction]=[outbound] to event
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.688179 [DEBUG] switch_channel.c:1264 sofia/internal/101@example.nl EXPORTING[export_vars] [origination_callee_id_name]=[00494919711650] to event
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.688179 [DEBUG] switch_channel.c:1264 sofia/internal/101@example.nl EXPORTING[export_vars] [call_direction]=[outbound] to event
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.688179 [DEBUG] switch_ivr_originate.c:2242 Parsing global variables
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [NOTICE] switch_channel.c:1118 New Channel sofia/internal/32 [80b10565-cf4e-44c2-a080-998d0d1f2db2]
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.688179 [DEBUG] mod_sofia.c:5073 sofia/internal/32 setting variable [sip_cid_type]=[pid]
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] mod_sofia.c:5089 (sofia/internal/32) State Change CS_NEW -> CS_INIT
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_INIT (Cur 2 Tot 718)
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:628 (sofia/internal/32) State INIT
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] mod_sofia.c:93 sofia/internal/32 SOFIA INIT
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] sofia_glue.c:1618 sofia/internal/32 sending invite version: 1.10.3 -release-15-129de34d84 64bit
80b10565-cf4e-44c2-a080-998d0d1f2db2 Local SDP:
80b10565-cf4e-44c2-a080-998d0d1f2db2 v=0
80b10565-cf4e-44c2-a080-998d0d1f2db2 o=FreeSWITCH 1598507419 1598507420 IN IP4 {eradicatedforprivacy}
80b10565-cf4e-44c2-a080-998d0d1f2db2 s=FreeSWITCH
80b10565-cf4e-44c2-a080-998d0d1f2db2 c=IN IP4 {eradicatedforprivacy}
80b10565-cf4e-44c2-a080-998d0d1f2db2 t=0 0
80b10565-cf4e-44c2-a080-998d0d1f2db2 m=audio 29960 RTP/AVP 9 0 8 101 13
80b10565-cf4e-44c2-a080-998d0d1f2db2 a=rtpmap:9 G722/8000
80b10565-cf4e-44c2-a080-998d0d1f2db2 a=rtpmap:0 PCMU/8000
80b10565-cf4e-44c2-a080-998d0d1f2db2 a=rtpmap:8 PCMA/8000
80b10565-cf4e-44c2-a080-998d0d1f2db2 a=rtpmap:101 telephone-event/8000
80b10565-cf4e-44c2-a080-998d0d1f2db2 a=fmtp:101 0-16
80b10565-cf4e-44c2-a080-998d0d1f2db2 a=rtpmap:13 CN/8000
80b10565-cf4e-44c2-a080-998d0d1f2db2 a=ptime:20
80b10565-cf4e-44c2-a080-998d0d1f2db2 a=sendrecv
80b10565-cf4e-44c2-a080-998d0d1f2db2
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:40 sofia/internal/32 Standard INIT
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:48 (sofia/internal/32) State Change CS_INIT -> CS_ROUTING
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:628 (sofia/internal/32) State INIT going to sleep
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_ROUTING (Cur 2 Tot 718)
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] sofia.c:7325 Channel sofia/internal/32 entering state [calling][0]
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:644 (sofia/internal/32) State ROUTING
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] mod_sofia.c:154 sofia/internal/32 SOFIA ROUTING
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_ivr_originate.c:67 (sofia/internal/32) State Change CS_ROUTING -> CS_CONSUME_MEDIA
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:644 (sofia/internal/32) State ROUTING going to sleep
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_CONSUME_MEDIA (Cur 2 Tot 718)
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:663 (sofia/internal/32) State CONSUME_MEDIA
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] switch_core_state_machine.c:663 (sofia/internal/32) State CONSUME_MEDIA going to sleep
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.688179 [DEBUG] sofia.c:7325 Channel sofia/internal/32 entering state [calling][0]
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] sofia.c:7325 Channel sofia/internal/32 entering state [terminated][484]
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [NOTICE] sofia.c:8558 Hangup sofia/internal/32 [CS_CONSUME_MEDIA] [INVALID_NUMBER_FORMAT]
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_HANGUP (Cur 2 Tot 718)
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:848 (sofia/internal/32) Callstate Change DOWN -> HANGUP
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:850 (sofia/internal/32) State HANGUP
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] mod_sofia.c:453 Channel sofia/internal/32 hanging up, cause: INVALID_NUMBER_FORMAT
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:60 sofia/internal/32 Standard HANGUP, cause: INVALID_NUMBER_FORMAT
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:850 (sofia/internal/32) State HANGUP going to sleep
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:620 (sofia/internal/32) State Change CS_HANGUP -> CS_REPORTING
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/32) Running State Change CS_REPORTING (Cur 2 Tot 718)
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:936 (sofia/internal/32) State REPORTING
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:174 sofia/internal/32 Standard REPORTING, cause: INVALID_NUMBER_FORMAT
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:936 (sofia/internal/32) State REPORTING going to sleep
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_state_machine.c:611 (sofia/internal/32) State Change CS_REPORTING -> CS_DESTROY
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.708177 [DEBUG] switch_core_session.c:1726 Session 718 (sofia/internal/32) Locked, Waiting on external entities
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.728172 [DEBUG] switch_ivr_originate.c:3995 Originate Resulted in Error Cause: 28 [INVALID_NUMBER_FORMAT]
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.728172 [NOTICE] switch_core_session.c:1744 Session 718 (sofia/internal/32) Ended
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.728172 [NOTICE] switch_core_session.c:1748 Close Channel sofia/internal/32 [CS_DESTROY]
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.728172 [DEBUG] switch_core_state_machine.c:739 (sofia/internal/32) Running State Change CS_DESTROY (Cur 1 Tot 718)
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.728172 [DEBUG] switch_core_state_machine.c:749 (sofia/internal/32) State DESTROY
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.728172 [DEBUG] mod_sofia.c:364 sofia/internal/32 SOFIA DESTROY
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.728172 [DEBUG] switch_core_state_machine.c:181 sofia/internal/32 Standard DESTROY
80b10565-cf4e-44c2-a080-998d0d1f2db2 2020-08-27 16:09:39.728172 [DEBUG] switch_core_state_machine.c:749 (sofia/internal/32) State DESTROY going to sleep
4d540a2e-0695-41c8-b1e5-987a5bfcc8f2 2020-08-27 16:09:39.728172 [INFO] mod_dptools.c:3631 Originate Failed. Cause: INVALID_NUMBER_FORMAT

Which I think I should be asking my SIP provider on why this is happening?
Regex is passing, however the number is now being seen as invalid, and this happens with multiple random numbers and selective numbers.

Thanks again for taking the time.
 

mat1010

Member
Jun 8, 2019
56
13
8
Germany
Perfect, thanks for the log. That makes debugging a lot easier.

Would you be able to expand on what you mean with the matchgroups?
Matchgroups are the parts of your regex wrapped in brackets. With (0049)(\d+) you would have 2 matchgroups. Given a number of 0049123456 will result in $1 to expand to 0049 and $2 to expand to 123456. If you have only ^(0049\d+)$ the whole number will be in $1 and $2 will be left empty / does not exist. So you are now sending a call with the number 32 to your gateway since $2 does not contain anything, due to this your provider is not able to process the call since 32 is an invalid number in the PSTN. If you just use $1 without the 32 in your bridge action, it should work.

sofia/internal/32 should become sofia/internal/00494919711650 in your log like it is already correctly expanded in the callee_id_number where $1 is being used already.
 
Last edited:
Status
Not open for further replies.