Route a call from Internal Extension to Ring Group

None of those features are installed Stewart

Error 503 when calling from a Windows PC to the RG

Asterisk*CLI> dialplan show 1010@from-internal
[ Included context ‘bad-number’ created by ‘pbx_config’ ]
‘_X.’ => 1. ResetCDR() [pbx_config]
2. NoCDR() [pbx_config]
3. Progress() [pbx_config]
4. Wait(1) [pbx_config]
5. Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer) [pbx_config]
6. Wait(1) [pbx_config]
7. Congestion(20) [pbx_config]
8. Hangup() [pbx_config]

-= 1 extension (8 priorities) in 1 context. =-

  1. [2021-07-16 11:56:27] VERBOSE[3524] chan_sip.c: Registered SIP ‘1004’ at 192.168.0.10:52920

  2. [2021-07-16 11:56:27] NOTICE[3524] chan_sip.c: Peer ‘1004’ is now Reachable. (4ms / 2000ms)

  3. [2021-07-16 11:56:27] VERBOSE[3524] chan_sip.c: Unregistered SIP ‘1004’

  4. [2021-07-16 11:56:27] VERBOSE[3524] chan_sip.c: Registered SIP ‘1004’ at 192.168.0.10:52920

  5. [2021-07-16 11:56:59] VERBOSE[3524][C-00000003] netsock2.c: Using SIP VIDEO TOS bits 136

  6. [2021-07-16 11:56:59] VERBOSE[3524][C-00000003] netsock2.c: Using SIP VIDEO CoS mark 6

  7. [2021-07-16 11:56:59] VERBOSE[3524][C-00000003] netsock2.c: Using SIP RTP TOS bits 184

  8. [2021-07-16 11:56:59] VERBOSE[3524][C-00000003] netsock2.c: Using SIP RTP CoS mark 5

  9. [2021-07-16 11:56:59] VERBOSE[3826][C-00000003] pbx.c: Executing [1010@from-internal:1] ResetCDR(“SIP/1004-00000006”, “”) in new stack

  10. [2021-07-16 11:56:59] VERBOSE[3826][C-00000003] pbx.c: Executing [1010@from-internal:2] NoCDR(“SIP/1004-00000006”, “”) in new stack

  11. [2021-07-16 11:56:59] VERBOSE[3826][C-00000003] pbx.c: Executing [1010@from-internal:3] Progress(“SIP/1004-00000006”, “”) in new stack

  12. [2021-07-16 11:56:59] VERBOSE[3826][C-00000003] pbx.c: Executing [1010@from-internal:4] Wait(“SIP/1004-00000006”, “1”) in new stack

  13. [2021-07-16 11:57:00] VERBOSE[3826][C-00000003] pbx.c: Executing [1010@from-internal:5] Playback(“SIP/1004-00000006”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack

  14. [2021-07-16 11:57:00] VERBOSE[3826][C-00000003] file.c: <SIP/1004-00000006> Playing ‘silence/1.ulaw’ (language ‘en’)

  15. [2021-07-16 11:57:01] VERBOSE[3826][C-00000003] file.c: <SIP/1004-00000006> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)

  16. [2021-07-16 11:57:04] VERBOSE[3826][C-00000003] file.c: <SIP/1004-00000006> Playing ‘check-number-dial-again.ulaw’ (language ‘en’)

  17. [2021-07-16 11:57:06] VERBOSE[3826][C-00000003] pbx.c: Executing [1010@from-internal:6] Wait(“SIP/1004-00000006”, “1”) in new stack

  18. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx.c: Executing [1010@from-internal:7] Congestion(“SIP/1004-00000006”, “20”) in new stack

  19. [2021-07-16 11:57:07] WARNING[3826][C-00000003] channel.c: Prodding channel ‘SIP/1004-00000006’ failed

  20. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx.c: Spawn extension (from-internal, 1010, 7) exited non-zero on ‘SIP/1004-00000006’

  21. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx.c: Executing [h@from-internal:1] Macro(“SIP/1004-00000006”, “hangupcall”) in new stack

  22. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“SIP/1004-00000006”, “1?theend”) in new stack

  23. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx_builtins.c: Goto (macro-hangupcall,s,3)

  24. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“SIP/1004-00000006”, “0?Set(CDR(recordingfile)=)”) in new stack

  25. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“SIP/1004-00000006”, " monior file= ") in new stack

  26. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx.c: Executing [s@macro-hangupcall:5] AGI(“SIP/1004-00000006”, “attendedtransfer-rec-restart.php,”) in new stack

  27. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php

  28. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] res_agi.c: <SIP/1004-00000006>AGI Script attendedtransfer-rec-restart.php completed, returning 0

  29. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx.c: Executing [s@macro-hangupcall:6] Hangup(“SIP/1004-00000006”, “”) in new stack

  30. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/1004-00000006’ in macro ‘hangupcall’

  31. [2021-07-16 11:57:07] VERBOSE[3826][C-00000003] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/1004-00000006’

  32. [2021-07-16 11:57:07] VERBOSE[3843] chan_sip.c: Unregistered SIP ‘1004’

  33. [2021-07-16 11:57:07] VERBOSE[3843] chan_sip.c: Registered SIP ‘1004’ at 192.168.0.10:52946

  34. [2021-07-16 11:57:07] VERBOSE[3843] chan_sip.c: Unregistered SIP ‘1004’

  35. [2021-07-16 11:57:07] VERBOSE[3843] chan_sip.c: Registered SIP ‘1004’ at 192.168.0.10:52946

  36. [2021-07-16 11:57:14] VERBOSE[3843][C-00000004] netsock2.c: Using SIP VIDEO TOS bits 136

  37. [2021-07-16 11:57:14] VERBOSE[3843][C-00000004] netsock2.c: Using SIP VIDEO CoS mark 6

  38. [2021-07-16 11:57:14] VERBOSE[3843][C-00000004] netsock2.c: Using SIP RTP TOS bits 184

  39. [2021-07-16 11:57:14] VERBOSE[3843][C-00000004] netsock2.c: Using SIP RTP CoS mark 5

  40. [2021-07-16 11:57:14] VERBOSE[3844][C-00000004] pbx.c: Executing [1010@from-internal:1] ResetCDR(“SIP/1004-00000007”, “”) in new stack

  41. [2021-07-16 11:57:14] VERBOSE[3844][C-00000004] pbx.c: Executing [1010@from-internal:2] NoCDR(“SIP/1004-00000007”, “”) in new stack

  42. [2021-07-16 11:57:14] VERBOSE[3844][C-00000004] pbx.c: Executing [1010@from-internal:3] Progress(“SIP/1004-00000007”, “”) in new stack

  43. [2021-07-16 11:57:14] VERBOSE[3844][C-00000004] pbx.c: Executing [1010@from-internal:4] Wait(“SIP/1004-00000007”, “1”) in new stack

  44. [2021-07-16 11:57:15] VERBOSE[3844][C-00000004] pbx.c: Executing [1010@from-internal:5] Playback(“SIP/1004-00000007”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack

  45. [2021-07-16 11:57:15] VERBOSE[3844][C-00000004] file.c: <SIP/1004-00000007> Playing ‘silence/1.ulaw’ (language ‘en’)

  46. [2021-07-16 11:57:16] VERBOSE[3844][C-00000004] file.c: <SIP/1004-00000007> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)

  47. [2021-07-16 11:57:19] VERBOSE[3844][C-00000004] file.c: <SIP/1004-00000007> Playing ‘check-number-dial-again.ulaw’ (language ‘en’)

  48. [2021-07-16 11:57:21] VERBOSE[3844][C-00000004] pbx.c: Executing [1010@from-internal:6] Wait(“SIP/1004-00000007”, “1”) in new stack

  49. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx.c: Executing [1010@from-internal:7] Congestion(“SIP/1004-00000007”, “20”) in new stack

  50. [2021-07-16 11:57:22] WARNING[3844][C-00000004] channel.c: Prodding channel ‘SIP/1004-00000007’ failed

  51. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx.c: Spawn extension (from-internal, 1010, 7) exited non-zero on ‘SIP/1004-00000007’

  52. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx.c: Executing [h@from-internal:1] Macro(“SIP/1004-00000007”, “hangupcall”) in new stack

  53. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“SIP/1004-00000007”, “1?theend”) in new stack

  54. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx_builtins.c: Goto (macro-hangupcall,s,3)

  55. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“SIP/1004-00000007”, “0?Set(CDR(recordingfile)=)”) in new stack

  56. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“SIP/1004-00000007”, " monior file= ") in new stack

  57. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx.c: Executing [s@macro-hangupcall:5] AGI(“SIP/1004-00000007”, “attendedtransfer-rec-restart.php,”) in new stack

  58. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php

  59. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] res_agi.c: <SIP/1004-00000007>AGI Script attendedtransfer-rec-restart.php completed, returning 0

  60. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx.c: Executing [s@macro-hangupcall:6] Hangup(“SIP/1004-00000007”, “”) in new stack

  61. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/1004-00000007’ in macro ‘hangupcall’

  62. [2021-07-16 11:57:22] VERBOSE[3844][C-00000004] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/1004-00000007’

  63. [2021-07-16 11:57:22] VERBOSE[3847] chan_sip.c: Unregistered SIP ‘1004’

  64. [2021-07-16 11:57:22] VERBOSE[3847] chan_sip.c: Registered SIP ‘1004’ at 192.168.0.10:52950

  65. [2021-07-16 11:57:22] VERBOSE[3847] chan_sip.c: Unregistered SIP ‘1004’

  66. [2021-07-16 11:57:22] VERBOSE[3847] chan_sip.c: Registered SIP ‘1004’ at 192.168.0.10:52950

  67. [2021-07-16 13:50:15] VERBOSE[7806] chan_sip.c: Unregistered SIP ‘1005’

  68. [2021-07-16 13:59:43] VERBOSE[1439] asterisk.c: Remote UNIX connection

  69. [2021-07-16 14:00:00] VERBOSE[3847][C-00000005] netsock2.c: Using SIP VIDEO TOS bits 136

  70. [2021-07-16 14:00:00] VERBOSE[3847][C-00000005] netsock2.c: Using SIP VIDEO CoS mark 6

  71. [2021-07-16 14:00:00] VERBOSE[3847][C-00000005] netsock2.c: Using SIP RTP TOS bits 184

  72. [2021-07-16 14:00:00] VERBOSE[3847][C-00000005] netsock2.c: Using SIP RTP CoS mark 5

  73. [2021-07-16 14:00:00] VERBOSE[8175][C-00000005] pbx.c: Executing [1010@from-internal:1] ResetCDR(“SIP/1004-00000008”, “”) in new stack

  74. [2021-07-16 14:00:00] VERBOSE[8175][C-00000005] pbx.c: Executing [1010@from-internal:2] NoCDR(“SIP/1004-00000008”, “”) in new stack

  75. [2021-07-16 14:00:00] VERBOSE[8175][C-00000005] pbx.c: Executing [1010@from-internal:3] Progress(“SIP/1004-00000008”, “”) in new stack

  76. [2021-07-16 14:00:00] VERBOSE[8175][C-00000005] pbx.c: Executing [1010@from-internal:4] Wait(“SIP/1004-00000008”, “1”) in new stack

  77. [2021-07-16 14:00:01] VERBOSE[8175][C-00000005] pbx.c: Executing [1010@from-internal:5] Playback(“SIP/1004-00000008”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack

  78. [2021-07-16 14:00:01] VERBOSE[8175][C-00000005] file.c: <SIP/1004-00000008> Playing ‘silence/1.ulaw’ (language ‘en’)

  79. [2021-07-16 14:00:02] VERBOSE[8175][C-00000005] file.c: <SIP/1004-00000008> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)

  80. [2021-07-16 14:00:04] VERBOSE[8175][C-00000005] file.c: <SIP/1004-00000008> Playing ‘check-number-dial-again.ulaw’ (language ‘en’)

  81. [2021-07-16 14:00:07] VERBOSE[8175][C-00000005] pbx.c: Executing [1010@from-internal:6] Wait(“SIP/1004-00000008”, “1”) in new stack

  82. [2021-07-16 14:00:08] VERBOSE[8175][C-00000005] pbx.c: Executing [1010@from-internal:7] Congestion(“SIP/1004-00000008”, “20”) in new stack

How about

dialplan show @ext-group

?

Asterisk*CLI> dialplan show @ext-group
[ Context ‘ext-group’ created by ‘pbx_config’ ]
‘h’ => 1. Macro(hangupcall,) [pbx_config]
Include => ‘ext-group-custom’ [pbx_config]

-= 1 extension (1 priority) in 1 context. =-

Have you “committed” the ring group you built?

503 (Service Unavailable) is “normal”, given that 1010 is routing to the bad-number context. Of course, that shouldn’t be; a higher priority context for the RG should be present.

I’m quite puzzled. Possibly, something went wrong when setting up the RG, or something is wrong with the normal dial plan hierarchy.

At the Asterisk command prompt, type these commands:
dialplan show from-internal (should show from-internal-xfer included)
diaplan show from-internal-xfer (should show from-internal-additional included)
dialplan show from-internal-additional (should show ext-group included)
dialplan show ext-group (should show ring group 1010)

Possible ways to clean up:
From root shell prompt, issue fwconsole restart
Reboot the entire server.
Delete the RG, Apply Config, Add the RG again, Apply Config.
Create a new RG with a different number e.g. 1011, Apply Config.

After each step, test whether the RG is working.

I tried RG 999, same issue, after deleting the original one

Asterisk*CLI> dialplan show from-internal
[ Context ‘from-internal’ created by ‘pbx_config’ ]
‘h’ => 1. Macro(hangupcall) [pbx_config]
Include => ‘from-internal-noxfer’ [pbx_config]
Include => ‘from-internal-xfer’ [pbx_config]
Include => ‘bad-number’ [pbx_config]

-= 1 extension (1 priority) in 1 context. =-
AsteriskCLI> diaplan show from-internal-xfer
No such command ‘diaplan show from-internal-xfer’ (type ‘core show help diaplan show’ for other possible commands)
Asterisk
CLI> dialplan show from-internal-additional
[ Context ‘from-internal-additional’ created by ‘pbx_config’ ]
‘h’ => 1. Hangup() [pbx_config]
Include => ‘from-internal-additional-custom’ [pbx_config]
Include => ‘ext-meetme’ [pbx_config]
Include => ‘app-fmf-toggle’ [pbx_config]
Include => ‘ext-findmefollow’ [pbx_config]
Include => ‘fmgrps’ [pbx_config]
Include => ‘app-calltrace’ [pbx_config]
Include => ‘app-echo-test’ [pbx_config]
Include => ‘app-speakextennum’ [pbx_config]
Include => ‘app-speakingclock’ [pbx_config]
Include => ‘app-recordings’ [pbx_config]
Include => ‘ext-group’ [pbx_config]
Include => ‘grps’ [pbx_config]
Include => ‘app-dialvm’ [pbx_config]
Include => ‘app-vmmain’ [pbx_config]
Include => ‘ext-local-confirm’ [pbx_config]
Include => ‘findmefollow-ringallv2’ [pbx_config]
Include => ‘app-pickup’ [pbx_config]
Include => ‘app-chanspy’ [pbx_config]
Include => ‘ext-test’ [pbx_config]
Include => ‘ext-local’ [pbx_config]
Include => ‘outbound-allroutes’ [pbx_config]

-= 1 extension (1 priority) in 1 context. =-
Asterisk*CLI> dialplan show ext-group
[ Context ‘ext-group’ created by ‘pbx_config’ ]
‘h’ => 1. Macro(hangupcall,) [pbx_config]
Include => ‘ext-group-custom’ [pbx_config]

-= 1 extension (1 priority) in 1 context. =-

I don’t understand why the dial plan for your ring group is not being built.
Confirm that the database is correct – at a root shell type
fwconsole mysql asterisk
then at the MariaDB prompt issue
select * from ringgroups

Are you running the FreePBX Distro? If not, provide details.
In Admin->Module Admin, what versions do you see for FreePBX Framework, Core and Ring Groups?

Not sure what the MariaDB command was meant to do? it didnt do anything

That’s odd. Can you post a screenshot please?

Sure

Sorry, my bad.
select * from ringgroups;

MariaDB [asterisk]> select * from ringgroups;
±-------±---------±--------±-------±----------±----------±-----------------------±------------±----------±---------------±----------±-----------±--------±---------±---------±--------±----------±---------±----------±--------+
| grpnum | strategy | grptime | grppre | grplist | annmsg_id | postdest | description | alertinfo | remotealert_id | needsconf | toolate_id | ringing | cwignore | cfignore | cpickup | recording | progress | elsewhere | rvolume |
±-------±---------±--------±-------±----------±----------±-----------------------±------------±----------±---------------±----------±-----------±--------±---------±---------±--------±----------±---------±----------±--------+
| 999 | ringall | 20 | | 1003-1005 | 0 | app-blackhole,hangup,1 | Doorbird | | 0 | | 0 | Ring | | | | never | yes | no | |
±-------±---------±--------±-------±----------±----------±-----------------------±------------±----------±---------------±----------±-----------±--------±---------±---------±--------±----------±---------±----------±--------+
1 row in set (0.00 sec)

MariaDB [asterisk]>

I’m stumped. The database appears to be built correctly, but no ring groups got written to the dialplan.

I have no idea how that can be. Possibly, a module version inconsistency, or a system package vs. module inconsistency. Assuming that you have a good backup, try upgrading all modules (or at least those that seem relevant). Or, consider upgrading to FreePBX 15. See

What are you running this on? Running the Distro, something built from a script (which), or built on your own?

1 Like

Running the distro under Virtualisation Station on a QNAP x64 bit NAS. Ill do the upgrade now

Ive upgraded to 15.x now, what should I run Stewart now?

Did you apply config? Did you change any of the conf files?

I upgraded, nothing has changed in terms of configuration

The only other thing I can think of, is permissions.

Try running:

fwconsole chown
fwconsole reload
1 Like

Running the latest version, after a recreation of the RG its now working correctly! Thank you Stewart1!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.