In my paging project, the same page must reach two different endpoints. This is my current (non-working) dial plan and related logs:
extensions.conf:
[Lynd-default]
; Forward calls to 901 and 904 and handle DTMF
exten => 902,1,NoOp(Processing call forwarded to 901 and 904)
same => n,Dial(PJSIP/3cx-trunk/sip:901@3CXPublicIP&PJSIP/3cx-trunk/sip:904@3CXPublicIP,30,aU(Lynd-send-dtmf)) ; Simultaneous calls with DTMF
same => n,Hangup()
[Lynd-send-dtmf]
; Subroutine to send DTMF tones and playback demo-thanks
exten => s,1,NoOp(Sending DTMF tones and playing demo-thanks)
same => n,Wait(1) ; Wait for the call to be fully established
same => n,SendDTMF(#0) ; Send the DTMF tones
same => n,Wait(1) ; Wait briefly after sending DTMF
same => n,Playback(demo-thanks,noanswer) ; Play demo-thanks without treating as answering
same => n,Return()
Logs:
– Called 902@Lynd-default
– Executing [902@Lynd-default:1] NoOp(“Local/902@Lynd-default-0000000a;2”, “Processing call forwarded to 901 and 904”) in new stack
– Executing [902@Lynd-default:2] Dial(“Local/902@Lynd-default-0000000a;2”, “PJSIP/3cx-trunk/sip:901@3CXPublicIP&PJSIP/3cx-trunk/sip:904@3CXPublicIP,30,aU(Lynd-send-dtmf)”) in new stack
– Called PJSIP/3cx-trunk/sip:901@3CXPublicIP
– Called PJSIP/3cx-trunk/sip:904@3CXPublicIP
– PJSIP/3cx-trunk-00000010 connected line has changed. Saving it until answer for Local/902@Lynd-default-0000000a;2
– PJSIP/3cx-trunk-00000011 connected line has changed. Saving it until answer for Local/902@Lynd-default-0000000a;2
– PJSIP/3cx-trunk-00000011 is ringing
– Local/902@Lynd-default-0000000a;1 is ringing
– PJSIP/3cx-trunk-00000010 is ringing
> 0x71bf8c00ad50 – Strict RTP learning after remote address set to: 3CXPublicIP:9584
– PJSIP/3cx-trunk-00000011 answered Local/902@Lynd-default-0000000a;2
– Local/902@Lynd-default-0000000a;1 answered
> Launching Dial() on Local/902@Lynd-default-0000000a;1
– No devices or endpoints to dial (technology/resource)
– PJSIP/3cx-trunk-00000011 Internal Gosub(Lynd-send-dtmf,s,1) start
– Executing [s@Lynd-send-dtmf:1] NoOp(“PJSIP/3cx-trunk-00000011”, “Sending DTMF tones and playing demo-thanks”) in new stack
– Executing [s@Lynd-send-dtmf:2] Wait(“PJSIP/3cx-trunk-00000011”, “1”) in new stack
– Executing [s@Lynd-send-dtmf:3] SendDTMF(“PJSIP/3cx-trunk-00000011”, “#0”) in new stack
> 0x71bf8c00ad50 – Strict RTP switching to RTP target address 3CXPublicIP:9584 as source
== Spawn extension (Lynd-send-dtmf, s, 3) exited non-zero on ‘PJSIP/3cx-trunk-00000011’
[Dec 4 11:06:19] WARNING[11846][C-0000000b]: app_stack.c:1079 gosub_run: PJSIP/3cx-trunk-00000011 Abnormal ‘Gosub(Lynd-send-dtmf,s,1)’ exit. Popping routine return locations.
– Channel PJSIP/3cx-trunk-00000011 joined ‘simple_bridge’ basic-bridge
– Channel Local/902@Lynd-default-0000000a;2 joined ‘simple_bridge’ basic-bridge
– Channel PJSIP/3cx-trunk-00000011 left ‘simple_bridge’ basic-bridge
– Channel Local/902@Lynd-default-0000000a;2 left ‘simple_bridge’ basic-bridge
== Spawn extension (Lynd-default, 902, 2) exited non-zero on ‘Local/902@Lynd-default-0000000a;2’
SC3CX-Asterisk*CLI> quit
Asterisk cleanly ending (0).
Executing last minute cleanups
user@SC3CX-Asterisk:~$ sudo vim /etc/asterisk/extensions.conf
user@SC3CX-Asterisk:~$ sudo asterisk -rvvvvv
Asterisk 20.6.0~dfsg+~cs6.13.40431414-2build5, Copyright (C) 1999 - 2022, Sangoma Technologies Corporation and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
Connected to Asterisk 20.6.0~dfsg+~cs6.13.40431414-2build5 currently running on SC3CX-Asterisk (pid = 11598)
SC3CX-AsteriskCLI> dialplan reload
Dialplan reloaded.
– Including switch ‘DUNDi/e164’ in context ‘ael-dundi-e164-switch’
– Including switch ‘Lua/’ in context ‘local’
– Including switch ‘Lua/’ in context ‘demo’
– Including switch ‘Lua/’ in context ‘public’
– Including switch ‘Lua/’ in context ‘default’
– Time to scan old dialplan and merge leftovers back into the new: 0.000598 sec
– Time to restore hints and swap in new dialplan: 0.000005 sec
– Time to delete the old dialplan: 0.000052 sec
– Total time merge_contexts_delete: 0.000655 sec
– pbx_config successfully loaded 29 contexts (enable debug for details).
SC3CX-AsteriskCLI> channel originate Local/902@Lynd-default application Playback
– Called 902@Lynd-default
– Executing [902@Lynd-default:1] NoOp(“Local/902@Lynd-default-0000000b;2”, “Processing call forwarded to 901 and 904”) in new stack
– Executing [902@Lynd-default:2] Dial(“Local/902@Lynd-default-0000000b;2”, “PJSIP/3cx-trunk/sip:901@3CXPublicIP&PJSIP/3cx-trunk/sip:904@3CXPublicIP,30,aU(Lynd-send-dtmf)”) in new stack
– Called PJSIP/3cx-trunk/sip:901@3CXPublicIP
– Called PJSIP/3cx-trunk/sip:904@3CXPublicIP
– PJSIP/3cx-trunk-00000013 connected line has changed. Saving it until answer for Local/902@Lynd-default-0000000b;2
– PJSIP/3cx-trunk-00000012 connected line has changed. Saving it until answer for Local/902@Lynd-default-0000000b;2
– PJSIP/3cx-trunk-00000013 is ringing
– PJSIP/3cx-trunk-00000012 is ringing
– Local/902@Lynd-default-0000000b;1 is ringing
> 0x71bf800162d0 – Strict RTP learning after remote address set to: 3CXPublicIP:9590
– PJSIP/3cx-trunk-00000013 answered Local/902@Lynd-default-0000000b;2
– Local/902@Lynd-default-0000000b;1 answered
> Launching Playback() on Local/902@Lynd-default-0000000b;1
[Dec 4 11:09:52] WARNING[11861]: app_playback.c:471 playback_exec: Playback requires an argument (filename)
– PJSIP/3cx-trunk-00000013 Internal Gosub(Lynd-send-dtmf,s,1) start
– Executing [s@Lynd-send-dtmf:1] NoOp(“PJSIP/3cx-trunk-00000013”, “Sending DTMF tones and playing demo-thanks”) in new stack
– Executing [s@Lynd-send-dtmf:2] Wait(“PJSIP/3cx-trunk-00000013”, “1”) in new stack
– Executing [s@Lynd-send-dtmf:3] SendDTMF(“PJSIP/3cx-trunk-00000013”, “#0”) in new stack
> 0x71bf800162d0 – Strict RTP switching to RTP target address 3CXPublicIP:9590 as source
== Spawn extension (Lynd-send-dtmf, s, 3) exited non-zero on ‘PJSIP/3cx-trunk-00000013’
[Dec 4 11:09:54] WARNING[11862][C-0000000c]: app_stack.c:1079 gosub_run: PJSIP/3cx-trunk-00000013 Abnormal ‘Gosub(Lynd-send-dtmf,s,1)’ exit. Popping routine return locations.
– Channel PJSIP/3cx-trunk-00000013 joined ‘simple_bridge’ basic-bridge <1b3e0743-e73a-4e2c-9d7c-4098283b1362>
– Channel Local/902@Lynd-default-0000000b;2 joined ‘simple_bridge’ basic-bridge <1b3e0743-e73a-4e2c-9d7c-4098283b1362>
– Channel Local/902@Lynd-default-0000000b;2 left ‘simple_bridge’ basic-bridge <1b3e0743-e73a-4e2c-9d7c-4098283b1362>
== Spawn extension (Lynd-default, 902, 2) exited non-zero on ‘Local/902@Lynd-default-0000000b;2’
– Channel PJSIP/3cx-trunk-00000013 left ‘simple_bridge’ basic-bridge <1b3e0743-e73a-4e2c-9d7c-4098283b1362>
SC3CX-Asterisk*CLI>