SOLVED Call forwarding issues

Status
Not open for further replies.

albert-g

Member
Aug 11, 2020
86
2
8
45
There are problems with call forwarding (extension forwarding and ring group forwarding). I set to forward call to external number, when I calling to this ring-group extension from inside (from other extension), forwarding is working, but when I am calling from outside number to the number which should go to ring-group, which will redirect to another external number, it is not working. So when it is:
local extension, calling -> ring-group extension -> redirect to external : is ok
outside number, calling -> outside number which direct to ring-group -> redirect to external: is not working

Ring group config looks like this:
1608119603157.png

The log contains "CALL_REJECTED"

Less:
c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_core_state_machine.c:40 sofia/external/EXTERNAL_NUMBER Standard INIT
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_core_state_machine.c:48 (sofia/external/EXTERNAL_NUMBER) State Change CS_INIT -> CS_ROUTING
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_core_state_machine.c:628 (sofia/external/EXTERNAL_NUMBER) State INIT going to sleep
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_core_state_machine.c:585 (sofia/external/EXTERNAL_NUMBER) Running State Change CS_ROUTING (Cur 2 Tot 116)
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] sofia.c:7326 Channel sofia/external/EXTERNAL_NUMBER entering state [calling][0]
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_core_state_machine.c:644 (sofia/external/EXTERNAL_NUMBER) State ROUTING
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] mod_sofia.c:154 sofia/external/EXTERNAL_NUMBER SOFIA ROUTING
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_ivr_originate.c:67 (sofia/external/EXTERNAL_NUMBER) State Change CS_ROUTING -> CS_CONSUME_MEDIA
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_core_state_machine.c:644 (sofia/external/EXTERNAL_NUMBER) State ROUTING going to sleep
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_core_state_machine.c:585 (sofia/external/EXTERNAL_NUMBER) Running State Change CS_CONSUME_MEDIA (Cur 2 Tot 116)
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_core_state_machine.c:663 (sofia/external/EXTERNAL_NUMBER) State CONSUME_MEDIA
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.683675 [DEBUG] switch_core_state_machine.c:663 (sofia/external/EXTERNAL_NUMBER) State CONSUME_MEDIA going to sleep
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.743679 [DEBUG] sofia.c:7326 Channel sofia/external/EXTERNAL_NUMBER entering state [calling][0]
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] sofia.c:6501 Remote Reason: 21
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] sofia.c:7326 Channel sofia/external/EXTERNAL_NUMBER entering state [terminated][403]
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [NOTICE] sofia.c:8559 Hangup sofia/external/EXTERNAL_NUMBER [CS_CONSUME_MEDIA] [CALL_REJECTED]
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:585 (sofia/external/EXTERNAL_NUMBER) Running State Change CS_HANGUP (Cur 2 Tot 116)
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:848 (sofia/external/EXTERNAL_NUMBER) Callstate Change DOWN -> HANGUP
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:850 (sofia/external/EXTERNAL_NUMBER) State HANGUP
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] mod_sofia.c:453 Channel sofia/external/EXTERNAL_NUMBER hanging up, cause: CALL_REJECTED
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:60 sofia/external/EXTERNAL_NUMBER Standard HANGUP, cause: CALL_REJECTED
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:850 (sofia/external/EXTERNAL_NUMBER) State HANGUP going to sleep
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:620 (sofia/external/EXTERNAL_NUMBER) State Change CS_HANGUP -> CS_REPORTING
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:585 (sofia/external/EXTERNAL_NUMBER) Running State Change CS_REPORTING (Cur 2 Tot 116)
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:936 (sofia/external/EXTERNAL_NUMBER) State REPORTING
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:174 sofia/external/EXTERNAL_NUMBER Standard REPORTING, cause: CALL_REJECTED
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:936 (sofia/external/EXTERNAL_NUMBER) State REPORTING going to sleep
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:611 (sofia/external/EXTERNAL_NUMBER) State Change CS_REPORTING -> CS_DESTROY
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_session.c:1726 Session 116 (sofia/external/EXTERNAL_NUMBER) Locked, Waiting on external entities
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_ivr_originate.c:3995 Originate Resulted in Error Cause: 21 [CALL_REJECTED]
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [NOTICE] switch_core_session.c:1744 Session 116 (sofia/external/EXTERNAL_NUMBER) Ended
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [NOTICE] switch_core_session.c:1748 Close Channel sofia/external/EXTERNAL_NUMBER [CS_DESTROY]
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:739 (sofia/external/EXTERNAL_NUMBER) Running State Change CS_DESTROY (Cur 1 Tot 116)
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:749 (sofia/external/EXTERNAL_NUMBER) State DESTROY
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] mod_sofia.c:364 sofia/external/EXTERNAL_NUMBER SOFIA DESTROY
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:181 sofia/external/EXTERNAL_NUMBER Standard DESTROY
9c54ffdc-4a6f-4014-8598-cdc9de88961b 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:749 (sofia/external/EXTERNAL_NUMBER) State DESTROY going to sleep
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [INFO] mod_dptools.c:3631 Originate Failed.  Cause: CALL_REJECTED
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [NOTICE] switch_core_state_machine.c:386 sofia/external/anonymous@anonymous.invalid has executed the last dialplan instruction, hanging up.
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [NOTICE] switch_core_state_machine.c:388 Hangup sofia/external/anonymous@anonymous.invalid [CS_EXECUTE] [NORMAL_CLEARING]
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:651 (sofia/external/anonymous@anonymous.invalid) State EXECUTE going to sleep
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:585 (sofia/external/anonymous@anonymous.invalid) Running State Change CS_HANGUP (Cur 1 Tot 116)
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:848 (sofia/external/anonymous@anonymous.invalid) Callstate Change RINGING -> HANGUP
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:850 (sofia/external/anonymous@anonymous.invalid) State HANGUP
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] mod_sofia.c:447 sofia/external/anonymous@anonymous.invalid Overriding SIP cause 480 with 403 from the other leg
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] mod_sofia.c:453 Channel sofia/external/anonymous@anonymous.invalid hanging up, cause: NORMAL_CLEARING
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] mod_sofia.c:598 Responding to INVITE with: 403
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:60 sofia/external/anonymous@anonymous.invalid Standard HANGUP, cause: NORMAL_CLEARING
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:850 (sofia/external/anonymous@anonymous.invalid) State HANGUP going to sleep
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:620 (sofia/external/anonymous@anonymous.invalid) State Change CS_HANGUP -> CS_REPORTING
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:585 (sofia/external/anonymous@anonymous.invalid) Running State Change CS_REPORTING (Cur 1 Tot 116)
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.783679 [DEBUG] switch_core_state_machine.c:936 (sofia/external/anonymous@anonymous.invalid) State REPORTING
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [DEBUG] switch_core_state_machine.c:174 sofia/external/anonymous@anonymous.invalid Standard REPORTING, cause: NORMAL_CLEARING
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [DEBUG] switch_core_state_machine.c:936 (sofia/external/anonymous@anonymous.invalid) State REPORTING going to sleep
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [DEBUG] switch_core_state_machine.c:611 (sofia/external/anonymous@anonymous.invalid) State Change CS_REPORTING -> CS_DESTROY
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [DEBUG] switch_core_session.c:1726 Session 115 (sofia/external/anonymous@anonymous.invalid) Locked, Waiting on external entities
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [NOTICE] switch_core_session.c:1744 Session 115 (sofia/external/anonymous@anonymous.invalid) Ended
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [NOTICE] switch_core_session.c:1748 Close Channel sofia/external/anonymous@anonymous.invalid [CS_DESTROY]
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [DEBUG] switch_core_state_machine.c:739 (sofia/external/anonymous@anonymous.invalid) Running State Change CS_DESTROY (Cur 0 Tot 116)
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [DEBUG] switch_core_state_machine.c:749 (sofia/external/anonymous@anonymous.invalid) State DESTROY
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [DEBUG] mod_sofia.c:364 sofia/external/anonymous@anonymous.invalid SOFIA DESTROY
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [DEBUG] switch_core_state_machine.c:181 sofia/external/anonymous@anonymous.invalid Standard DESTROY
ed565dd1-1026-4eb5-9c94-3a076c8fdb1f 2020-12-16 12:49:55.843681 [DEBUG] switch_core_state_machine.c:749 (sofia/external/anonymous@anonymous.invalid) State DESTROY going to sleep
P.S. I masked external forwarding number with "EXTERNAL_NUMBER"
 
Just guessing here. This may be to do with your gateway and what your SIP provider is expecting to see. Sometimes it is necessary to set the sip_invite_domain variable in the outbound route:

Screenshot from 2020-12-16 17-58-40.png
 
Tried with this config, but nothing changed, let me show you SNGREP result, maybe it more informative,
This one, when I am calling from extension 20 to the external number, and which is ok:

INVITE :::: 20@my_internal_domain :::: external_number@my_internal_domain ::: 9 ::: 192.168.11.yy:63020 ::: 192.168.11.xx:5060
INVITE ::: outbound_caller_number@FPBX_public_IP ::: external_number@siptrunk.ov ::: 10 192.168.11.xx:5080 ::: siptrunk_ip:5060

This one, when I am calling from outside, to external number which is target to the same extension 20, which should redirect to the same external number which I used on previous scenario:

INVITE ::: anonymous@anonymous.inval (???) ::: inbound_external_number@10.7.1.60(?? dont know what IP) ::: 4 ::: siptrunk_ip:5060 :: 192.168.11.xx:5080
INVITE ::: anonymous@FPBX_public_IP ::: external_redirectied_number@siptrunk.ov ::: 8 ::: 192.168.11.xx:5080 ::: siptrunk_ip:5060
 
This could be something your SIP Trunk provider doesn't like about the second INVITE. May be it's the "anonymous" As a diagnostic test you could try setting your outbound caller number to anonymous for extension 20 and re-try the first INVITE.

With packet captures it is always helpful to see the entire capture.
 
Anonymous couldn't help. but I found another interesting thing, on sngrep detail I saw this...

1608213175036.png
 
I would definately start by looking at the "403 Too many simultaneous". Again, looking at the headers in that 403 message may help you further.
 
  • Like
Reactions: albert-g
The problem was solved, and it was related to SIP provider, since there was only one channel activated, after activating 2nd one, this was fixed.
Thanks a lot for your advises.
 
Status
Not open for further replies.