SOLVED Remove the + sign on inbound calls

Status
Not open for further replies.

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
Can someone point me in the right direction of removing the + sign on inbound calls to the pbx?

Instead of +17704561234

I would like it to read: 177045461234
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
I cut/paste a sample of one of the calls below. 770-827-4079 is calling 678-928-9100. There is a + sign in front of the 770-827-4079 number. That is what I want to try and remove


2019-07-19 21:20:57.976481 [DEBUG] switch_core_session.c:2905 sofia/external/+17708274079@50.17.48.216 skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:935 (sofia/internal/1001@192.168.5.41:12649) State REPORTING
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:174 sofia/internal/1001@192.168.5.41:12649 Standard REPORTING, cause: ORIGINATOR_CANCEL
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:935 (sofia/internal/1001@192.168.5.41:12649) State REPORTING going to sleep
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:738 (sofia/internal/1001@192.168.100.96:11859) Running State Change CS_DESTROY (Cur 2 Tot 747)
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:610 (sofia/internal/1001@192.168.5.41:12649) State Change CS_REPORTING -> CS_DESTROY
2019-07-19 21:20:57.976481 [DEBUG] switch_core_session.c:1726 Session 747 (sofia/internal/1001@192.168.5.41:12649) Locked, Waiting on external entities
2019-07-19 21:20:57.976481 [NOTICE] switch_core_session.c:1744 Session 747 (sofia/internal/1001@192.168.5.41:12649) Ended
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:748 (sofia/internal/1001@192.168.100.96:11859) State DESTROY
2019-07-19 21:20:57.976481 [NOTICE] switch_core_session.c:1748 Close Channel sofia/internal/1001@192.168.5.41:12649 [CS_DESTROY]
2019-07-19 21:20:57.976481 [DEBUG] mod_sofia.c:365 sofia/internal/1001@192.168.100.96:11859 SOFIA DESTROY
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:181 sofia/internal/1001@192.168.100.96:11859 Standard DESTROY
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:748 (sofia/internal/1001@192.168.100.96:11859) State DESTROY going to sleep
2019-07-19 21:20:57.976481 [DEBUG] switch_cpp.cpp:1187 sofia/external/+17708274079@50.17.48.216 destroy/unlink session from object
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:738 (sofia/internal/1001@192.168.5.41:12649) Running State Change CS_DESTROY (Cur 1 Tot 747)
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:748 (sofia/internal/1001@192.168.5.41:12649) State DESTROY
2019-07-19 21:20:57.976481 [DEBUG] mod_sofia.c:365 sofia/internal/1001@192.168.5.41:12649 SOFIA DESTROY
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:181 sofia/internal/1001@192.168.5.41:12649 Standard DESTROY
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:748 (sofia/internal/1001@192.168.5.41:12649) State DESTROY going to sleep
2019-07-19 21:20:57.976481 [DEBUG] switch_core_session.c:2905 sofia/external/+17708274079@50.17.48.216 skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:650 (sofia/external/+17708274079@50.17.48.216) State EXECUTE going to sleep
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+17708274079@50.17.48.216) Running State Change CS_HANGUP (Cur 1 Tot 747)
2019-07-19 21:20:57.976481 [DEBUG] switch_ivr_async.c:1441 Stop recording file /var/lib/freeswitch/recordings/fpbx1.npusa.us/archive/2019/Jul/19/813749c7-d4a2-448e-94df-261ede231333.wav
2019-07-19 21:20:57.976481 [DEBUG] switch_ivr_async.c:1516 Channel is hung up
2019-07-19 21:20:57.976481 [DEBUG] switch_core_media_bug.c:1276 Removing BUG from sofia/external/+17708274079@50.17.48.216
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:847 (sofia/external/+17708274079@50.17.48.216) Callstate Change RING_WAIT -> HANGUP
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:849 (sofia/external/+17708274079@50.17.48.216) State HANGUP
2019-07-19 21:20:57.976481 [DEBUG] mod_sofia.c:460 Channel sofia/external/+17708274079@50.17.48.216 hanging up, cause: NORMAL_CLEARING
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:60 sofia/external/+17708274079@50.17.48.216 Standard HANGUP, cause: NORMAL_CLEARING
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:849 (sofia/external/+17708274079@50.17.48.216) State HANGUP going to sleep
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:619 (sofia/external/+17708274079@50.17.48.216) State Change CS_HANGUP -> CS_REPORTING
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+17708274079@50.17.48.216) Running State Change CS_REPORTING (Cur 1 Tot 747)
2019-07-19 21:20:57.976481 [DEBUG] switch_core_state_machine.c:935 (sofia/external/+17708274079@50.17.48.216) State REPORTING
2019-07-19 21:20:57.996443 [DEBUG] switch_core_state_machine.c:174 sofia/external/+17708274079@50.17.48.216 Standard REPORTING, cause: NORMAL_CLEARING
2019-07-19 21:20:57.996443 [DEBUG] switch_core_state_machine.c:935 (sofia/external/+17708274079@50.17.48.216) State REPORTING going to sleep
2019-07-19 21:20:57.996443 [DEBUG] switch_core_state_machine.c:610 (sofia/external/+17708274079@50.17.48.216) State Change CS_REPORTING -> CS_DESTROY
2019-07-19 21:20:57.996443 [DEBUG] switch_core_session.c:1726 Session 745 (sofia/external/+17708274079@50.17.48.216) Locked, Waiting on external entities
2019-07-19 21:20:57.996443 [NOTICE] switch_core_session.c:1744 Session 745 (sofia/external/+17708274079@50.17.48.216) Ended
2019-07-19 21:20:57.996443 [NOTICE] switch_core_session.c:1748 Close Channel sofia/external/+17708274079@50.17.48.216 [CS_DESTROY]
2019-07-19 21:20:57.996443 [DEBUG] switch_core_state_machine.c:738 (sofia/external/+17708274079@50.17.48.216) Running State Change CS_DESTROY (Cur 0 Tot 747)
2019-07-19 21:20:57.996443 [DEBUG] switch_core_state_machine.c:748 (sofia/external/+17708274079@50.17.48.216) State DESTROY
2019-07-19 21:20:57.996443 [DEBUG] mod_sofia.c:365 sofia/external/+17708274079@50.17.48.216 SOFIA DESTROY
2019-07-19 21:20:57.996443 [DEBUG] switch_core_state_machine.c:181 sofia/external/+17708274079@50.17.48.216 Standard DESTROY
2019-07-19 21:20:57.996443 [DEBUG] switch_core_state_machine.c:748 (sofia/external/+17708274079@50.17.48.216) State DESTROY going to sleep
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
A touch of regex will remove it. Add this to you inbound route before the final destination
action set effective_caller_id_number=${regex(${caller_id_number}|^\+1([0-9]{10})$|%1)}
 
  • Like
Reactions: ricktendo

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
I was able to remove the + sign last year with no issues. The + sign came back. Can anyone help me with this?
 

Attachments

  • 4862926165639168.png
    4862926165639168.png
    87.4 KB · Views: 39
Status
Not open for further replies.