AMI Originate CallerID Problem

Hi, I’m try to writing a simple dialer with NodeJS for our CRM. I want to start a call with originate command using by AMI, then move this call to a queue. Asterisk takes care of the rest.

I’m doing what I want with the command below but the problem is that the CallerID parameter is probably not working correctly.

The problem is that both the phone user and the transferred extension see the same Caller ID. The extension must see real number which i sent from the channel parameter and called by asterisk and phone user must see callerid which i sent with Callerid parameter at originate command.

I guess that should work like that bu it doesnt. How can i fix that.
Thanks.

Action: Originate
ActionID: b9c587ce-ee7d-4162-c9f4-06a7ccf09c08
Channel: PJSIP/00493442854382@mytrunk
Exten: 1999
Context: from-internal
Priority: 1
Async: true
CallerID: 0049876543210 <0049876543210>
ChannelId: 33149e43

Thats the command which i start a call, also tried with “Context: ‘ext-queues’” too.

Asterisk CLI LOG

Asterisk Manager Debug ON Log

Set it as a variable and have the extension dialplan copy that to the CALLERID.

I guess it might also get set if you enable connected line updates and the ITSP supports them, but I wouldn’t guarantee that.

I tried with variable parameters but it didnt effect anything.
I don’t want to change the config files. Is there any other way to do it with in AMI?

Action: Originate
ActionID: e160842d-af05-4ee1-fe24-da108c5343f0
Channel: PJSIP/00493442854382@mytrunk
Exten: 1999
Context: from-internal
Variable: CALLERID=00493442854382
Priority: 1
Async: true
CallerID: 0049876543210 <0049876543210>
ChannelId: 33149e47


Action: Originate
ActionID: e160842d-af05-4ee1-fe24-da108c5343a3
Channel: PJSIP/00493442854382@mytrunk
Exten: 1999
Context: from-internal
Variable: 00493442854382
Priority: 1
Async: true
CallerID: 0049876543210 <0049876543210>
ChannelId: 33149e49

I modified my originate command like this but cant get the values at variable parameter.
My phone is ringing with caller id but when i click answered , call closes immediately.

Why cant i get values from VARIABLE parameter.

Action: Originate
ActionID: c1fbd810-d6b5-4ae6-c1bf-cdda62efe28d
Channel: PJSIP/00495652812382@mytrunk
Exten: 1999
Context: dialerplan
Priority: 1
Async: true
Variable: callee=00495652812382|caller=mytrunk|queue=1999|callerid=0049333222111
CallerID: 0049333222111 <0049333222111>

Try to debug all variables which i can get from command.

[dialerplan]
exten => _X.,1,Verbose(3,DEBUG EXTEN: ${EXTEN})
exten => _X.,2,Verbose(3,DEBUG CHANNEL: ${CHANNEL})
exten => _X.,3,Verbose(3,DEBUG CALLERID(num): ${CALLERID(num)})
exten => _X.,4,Verbose(3,DEBUG CALLERID(name): ${CALLERID(name)})
exten => _X.,5,Verbose(3,DEBUG UNIQUEID: ${UNIQUEID})
exten => _X.,6,Verbose(3,DEBUG ARG1: ${ARG1})
exten => _X.,7,Verbose(3,DEBUG ARG2: ${ARG2})
exten => _X.,8,Verbose(3,DEBUG ARG3: ${ARG3})
exten => _X.,9,Verbose(3,DEBUG DNID: ${DNID})
exten => _X.,10,Verbose(3,DEBUG CALLEE: ${CALLEE})
exten => _X.,11,Verbose(3,DEBUG CALLER: ${CALLER})
exten => _X.,12,Verbose(3,DEBUG HANGUPCAUSE: ${HANGUPCAUSE})
exten => _X.,13,Verbose(3,DEBUG MACRO_EXTEN: ${MACRO_EXTEN})
exten => _X.,14,Verbose(3,DEBUG DIALEDPEERNAME: ${DIALEDPEERNAME})
exten => _X.,15,Verbose(3,DEBUG DIALEDPEERNUMBER: ${DIALEDPEERNUMBER})
exten => _X.,16,Verbose(3,DEBUG SIPCALLID: ${SIPCALLID})
exten => _X.,17,Verbose(3,DEBUG SIPDOMAIN: ${SIPDOMAIN})
exten => _X.,18,Verbose(3,DEBUG TXTCIDNAME: ${TXTCIDNAME})
exten => _X.,19,Set(CALLERID(all)=${CALLERID(num)})
exten => _X.,20,Dial(PJSIP/mytrunk/${EXTEN},15)
exten => _X.,21,Set(CALLERID(all)=${CALLERID(name)})
exten => _X.,22,goto(queuenum,s,1)
Asterisk CLI Log
Connected to Asterisk 16.15.1 currently running on pbx (pid = 2307)
    -- Called 00905442812382@mytrunk
    -- PJSIP/mytrunk-000000ee is making progress
       > 0x7f3b6420bb00 -- Strict RTP learning after remote address set to: 77.72.168.95:13532
    -- PJSIP/mytrunk-000000ee is making progress
    -- PJSIP/mytrunk-000000ee answered
    -- Executing [1999@dialerplan:1] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG EXTEN: 1999") in new stack
    -- DEBUG EXTEN: 1999
    -- Executing [1999@dialerplan:2] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG CHANNEL: PJSIP/mytrunk-000000ee") in new stack
    -- DEBUG CHANNEL: PJSIP/mytrunk-000000ee
    -- Executing [1999@dialerplan:3] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG CALLERID(num): 0049333222111") in new stack
    -- DEBUG CALLERID(num): 0049333222111
    -- Executing [1999@dialerplan:4] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG CALLERID(name): 0049333222111") in new stack
    -- DEBUG CALLERID(name): 0049333222111
    -- Executing [1999@dialerplan:5] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG UNIQUEID: 1623248251.488") in new stack
    -- DEBUG UNIQUEID: 1623248251.488
    -- Executing [1999@dialerplan:6] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG ARG1: ") in new stack
    -- DEBUG ARG1:
    -- Executing [1999@dialerplan:7] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG ARG2: ") in new stack
    -- DEBUG ARG2:
    -- Executing [1999@dialerplan:8] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG ARG3: ") in new stack
    -- DEBUG ARG3:
    -- Executing [1999@dialerplan:9] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG DNID: ") in new stack
    -- DEBUG DNID:
    -- Executing [1999@dialerplan:10] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG CALLEE: ") in new stack
    -- DEBUG CALLEE:
    -- Executing [1999@dialerplan:11] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG CALLER: ") in new stack
    -- DEBUG CALLER:
    -- Executing [1999@dialerplan:12] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG HANGUPCAUSE: 0") in new stack
    -- DEBUG HANGUPCAUSE: 0
    -- Executing [1999@dialerplan:13] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG MACRO_EXTEN: ") in new stack
    -- DEBUG MACRO_EXTEN:
    -- Executing [1999@dialerplan:14] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG DIALEDPEERNAME: ") in new stack
    -- DEBUG DIALEDPEERNAME:
    -- Executing [1999@dialerplan:15] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG DIALEDPEERNUMBER: ") in new stack
    -- DEBUG DIALEDPEERNUMBER:
    -- Executing [1999@dialerplan:16] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG SIPCALLID: ") in new stack
    -- DEBUG SIPCALLID:
    -- Executing [1999@dialerplan:17] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG SIPDOMAIN: hyperionix.online") in new stack
    -- DEBUG SIPDOMAIN: hyperionix.online
    -- Executing [1999@dialerplan:18] Verbose("PJSIP/mytrunk-000000ee", "3,DEBUG TXTCIDNAME: ") in new stack
    -- DEBUG TXTCIDNAME:
    -- Executing [1999@dialerplan:19] Set("PJSIP/mytrunk-000000ee", "CALLERID(all)=0049333222111") in new stack
    -- Executing [1999@dialerplan:20] Dial("PJSIP/mytrunk-000000ee", "PJSIP/mytrunk/1999,15") in new stack
[2021-06-09 17:17:37] ERROR[10359]: res_pjsip.c:3589 ast_sip_create_dialog_uac: Endpoint 'mytrunk': Could not create dialog to invalid URI '1999'.  Is endpoint registered and reachable?
[2021-06-09 17:17:37] ERROR[10359]: chan_pjsip.c:2710 request: Failed to create outgoing session to endpoint 'mytrunk'
[2021-06-09 17:17:37] WARNING[21892][C-00000048]: app_dial.c:2576 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
    -- No devices or endpoints to dial (technology/resource)
    -- Executing [1999@dialerplan:21] Set("PJSIP/mytrunk-000000ee", "CALLERID(all)=") in new stack
    -- Executing [1999@dialerplan:22] Goto("PJSIP/mytrunk-000000ee", "queuenum,s,1") in new stack
    -- Goto (queuenum,s,1)
[2021-06-09 17:17:37] WARNING[21892][C-00000048]: pbx.c:4510 __ast_pbx_run: Channel 'PJSIP/mytrunk-000000ee' sent to invalid extension but no invalid handler: context,exten,priority=queuenum,s,1
pbx*CLI>

${CALLEE} isn’t the same as ${callee}.

As it says, the URI is invalid. This is not the correct syntax for chan_pjsip dial strings. Home - Asterisk Documentation

I dont think it’s case-sensitive. Thanks for that information.

So I changed dialplan but callerid not set what i want, also call doesnt move to queue ,
give me a busy signal.

[queueplan]
exten => _X.,1,Verbose(3,QUEUE DEBUG EXTEN: ${EXTEN})
exten => s,1,Queue(${EXTEN})
exten => h,1,hangup

[dialerplan]
exten => _X.,1,Verbose(3,DEBUG EXTEN: ${EXTEN})
exten => _X.,2,Verbose(3,DEBUG CHANNEL: ${CHANNEL})
exten => _X.,3,Verbose(3,DEBUG CALLERID(num): ${CALLERID(num)})
exten => _X.,4,Verbose(3,DEBUG CALLERID(name): ${CALLERID(name)})
exten => _X.,5,Verbose(3,DEBUG UNIQUEID: ${UNIQUEID})
exten => _X.,10,Verbose(3,DEBUG CALLEE: ${CALLEE})
exten => _X.,11,Verbose(3,DEBUG CALLER: ${CALLER})
exten => _X.,12,Verbose(3,DEBUG QUEUE: ${QUEUE})
exten => _X.,13,Verbose(3,DEBUG CALLER_ID: ${CALLER_ID})
exten => _X.,14,Verbose(3,DEBUG HANGUPCAUSE: ${HANGUPCAUSE})
exten => _X.,21,Set(CALLERID(all)=${CALLER_ID})
exten => _X.,22,Dial(PJSIP/${CALLEE}@${CALLER},60)
exten => _X.,23,Set(CALLERID(all)=${CALLEE})
exten => _X.,24,goto(queueplan,${EXTEN},1)
exten => h,1,noop(${HANGUPCAUSE})
CLI LOG
-- Called 00905442812382@mytrunk
    -- PJSIP/mytrunk-000000fa is making progress
       > 0x7f3bec0726f0 -- Strict RTP learning after remote address set to: 77.72.168.79:26872
    -- PJSIP/mytrunk-000000fa is making progress
    -- PJSIP/mytrunk-000000fa answered
    -- Executing [1999@dialerplan:1] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG EXTEN: 1999") in new stack
    -- DEBUG EXTEN: 1999
    -- Executing [1999@dialerplan:2] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG CHANNEL: PJSIP/mytrunk-000000fa") in new stack
    -- DEBUG CHANNEL: PJSIP/mytrunk-000000fa
    -- Executing [1999@dialerplan:3] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG CALLERID(num): ") in new stack
    -- DEBUG CALLERID(num):
    -- Executing [1999@dialerplan:4] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG CALLERID(name): ") in new stack
    -- DEBUG CALLERID(name):
    -- Executing [1999@dialerplan:5] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG UNIQUEID: 33149e43") in new stack
    -- DEBUG UNIQUEID: 33149e43
    -- Executing [1999@dialerplan:10] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG CALLEE: 00905442812382") in new stack
    -- DEBUG CALLEE: 00905442812382
    -- Executing [1999@dialerplan:11] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG CALLER: mytrunk") in new stack
    -- DEBUG CALLER: mytrunk
    -- Executing [1999@dialerplan:12] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG QUEUE: 1999") in new stack
    -- DEBUG QUEUE: 1999
    -- Executing [1999@dialerplan:13] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG CALLER_ID: 0049333222111") in new stack
    -- DEBUG CALLER_ID: 0049333222111
    -- Executing [1999@dialerplan:14] Verbose("PJSIP/mytrunk-000000fa", "3,DEBUG HANGUPCAUSE: 0") in new stack
    -- DEBUG HANGUPCAUSE: 0
    -- Executing [1999@dialerplan:21] Set("PJSIP/mytrunk-000000fa", "CALLERID(all)=0049333222111") in new stack
    -- Executing [1999@dialerplan:22] Dial("PJSIP/mytrunk-000000fa", "PJSIP/00495552812382@mytrunk,60") in new stack
    -- Called PJSIP/00905442812382@mytrunk
    -- PJSIP/mytrunk-000000fb is making progress passing it to PJSIP/mytrunk-000000fa
       > 0x7f3be40149e0 -- Strict RTP learning after remote address set to: 195.219.64.11:36618
    -- PJSIP/mytrunk-000000fb is making progress passing it to PJSIP/mytrunk-000000fa
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [1999@dialerplan:23] Set("PJSIP/mytrunk-000000fa", "CALLERID(all)=00495552812382") in new stack
    -- Executing [1999@dialerplan:24] Goto("PJSIP/mytrunk-000000fa", "queueplan,1999,1") in new stack
    -- Goto (queueplan,1999,1)
    -- Executing [1999@queueplan:1] Verbose("PJSIP/mytrunk-000000fa", "3,QUEUE DEBUG EXTEN: 1999") in new stack
    -- QUEUE DEBUG EXTEN: 1999
    -- Auto fallthrough, channel 'PJSIP/mytrunk-000000fa' status is 'BUSY'
       > 0x7f3bec0726f0 -- Strict RTP switching to RTP target address 77.72.168.79:26872 as source
       > 0x7f3bec0726f0 -- Strict RTP learning complete - Locking on source address 77.72.168.79:26872
    -- Executing [h@queueplan:1] Hangup("PJSIP/mytrunk-000000fa", "") in new stack
  == Spawn extension (queueplan, h, 1) exited non-zero on 'PJSIP/mytrunk-000000fa'

Please provide “pjsip set logger on” output, showing that the caller ID is not present in the request.

Please provide the pjsip.conf settings for mytrunk, to confirm that you don’t do anything that would override the caller ID.

Please confirm that what is at the other end of mytrunk has given you permission to set the caller ID you are trying to set (generally respectable ITSPs will expect you to have proved, in advance, that you control the number, as user provided caller IDs are heavily used in vishing; they may also be accepting it, but flagging it as user provided and either unscreened or failed screen, and something further downstream may be suppressing it as a result).

Please provide the contents of the queueplan context. According to the logs, there is no line in it that matches queueplan, 1999, 2.

The channel parameter will see this CallerID: 0049876543210 <0049876543210>
for the second call leg
You can modify the Caller ID directly on the dial plan, make sure you have some kind of variable who save this caller id value and then use the CALLERID() function

He now has, as quoted below:

I don’t know such variable, and I can’t find any information about on the Asterisk WIKI unless is a custom variable instead of channel variable

The OP has set it himself, and has corrected the capitalisation since he last posted the below code:

now I see it thanks, is a custom variable as I did suspect

Also you can use multiple variables with separator comma, i have mistaken with using “|”.

Getting callerid but now call not join queue.

Content of Config Files
[mytrunk]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=opus,alaw,ulaw,g729,h264,mpeg4
aors=mytrunk
send_connected_line=true
language=en
user_eq_phone=no
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=no
t38_udptl_nat=no
direct_media=no
rtp_symmetric=yes
dtmf_mode=auto

[mytrunk]
type=identify
endpoint=mytrunk
match=77.72.174.132

[mytrunk]
type=aor
qualify_frequency=60
contact=sip:77.72.174.132:5060

That’s the queueplan, shouldn’t it work like this. There are idle extensions at queue but why am i getting busy for queue.
== Everyone is busy/congested at this time (1:1/0/0)

  -- Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [1999@dialerplan:13] Set("PJSIP/mytrunk-00000105", "CALLERID(all)=00493442812382") in new stack
    -- Executing [1999@dialerplan:14] Goto("PJSIP/mytrunk-00000105", "queueplan,1999,1") in new stack
    -- Goto (queueplan,1999,1)
    -- Executing [1999@queueplan:1] Verbose("PJSIP/mytrunk-00000105", "3,QUEUE DEBUG EXTEN: 1999") in new stack
    -- QUEUE DEBUG EXTEN: 1999
    -- Auto fallthrough, channel 'PJSIP/mytrunk-00000105' status is 'BUSY'

Queueplan
[queueplan]
exten => _X.,1,Verbose(3,QUEUE DEBUG EXTEN: ${EXTEN})
exten => s,1,Queue(${EXTEN})
exten => h,1,hangup
CLI Log with pjsip logger
Asterisk 16.15.1, Copyright (C) 1999 - 2018, Digium, Inc. 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 16.15.1 currently running on pbx (pid = 2307)
pbx*CLI> pjsip set logger on
PJSIP Logging enabled
    -- Called 00493442854382@mytrunk
<--- Transmitting SIP request (1066 bytes) to UDP:77.72.174.132:5060 --->
INVITE sip:00493442854382@77.72.174.132:5060 SIP/2.0
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj22b9f36b-fc25-46f3-a93d-1dbeafa8052e
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=010d73a0-546e-4f8d-9191-c645dc4fc5fd
To: <sip:00493442854382@77.72.174.132>
Contact: <sip:asterisk@3.65.96.16:5060>
Call-ID: 8dbf28fa-d185-4758-99ee-219a945da358
CSeq: 28200 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-15.0.17.34(16.15.1)
Content-Type: application/sdp
Content-Length:   361

v=0
o=- 1250751652 1250751652 IN IP4 3.65.96.16
s=Asterisk
c=IN IP4 3.65.96.16
t=0 0
m=audio 16432 RTP/AVP 107 8 0 18 101
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv

<--- Received SIP response (491 bytes) from UDP:77.72.174.132:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj22b9f36b-fc25-46f3-a93d-1dbeafa8052e
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=010d73a0-546e-4f8d-9191-c645dc4fc5fd
To: <sip:00493442854382@77.72.174.132>
Contact: sip:00493442854382@77.72.174.132:5060
Call-ID: 8dbf28fa-d185-4758-99ee-219a945da358
CSeq: 28200 INVITE
Server: (Very nice Sip Registrar/Proxy Server)
Allow: ACK,BYE,CANCEL,INVITE,REGISTER,OPTIONS,INFO,MESSAGE
Content-Length: 0


<--- Received SIP response (773 bytes) from UDP:77.72.174.132:5060 --->
SIP/2.0 183 Session progress
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj22b9f36b-fc25-46f3-a93d-1dbeafa8052e
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=010d73a0-546e-4f8d-9191-c645dc4fc5fd
To: <sip:00493442854382@77.72.174.132>;tag=a60313ac608f77c73a161e
Contact: sip:00493442854382@77.72.174.132:5060
Call-ID: 8dbf28fa-d185-4758-99ee-219a945da358
CSeq: 28200 INVITE
Server: (Very nice Sip Registrar/Proxy Server)
Allow: ACK,BYE,CANCEL,INVITE,REGISTER,OPTIONS,INFO,MESSAGE
Content-Type: application/sdp
Content-Length: 212

v=0
o=CARRIER 1623306310 1623306310 IN IP4 195.219.64.30
s=SIP Call
c=IN IP4 195.219.64.30
t=0 0
m=audio 39652 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=sendrecv

    -- PJSIP/mytrunk-00000101 is making progress
       > 0x7f3b6420bb00 -- Strict RTP learning after remote address set to: 195.219.64.30:39652
    -- PJSIP/mytrunk-00000101 is making progress
<--- Transmitting SIP request (418 bytes) to UDP:77.72.174.132:5060 --->
OPTIONS sip:77.72.174.132:5060 SIP/2.0
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj3be6929d-d276-485e-ad00-2d4632ff3883
From: <sip:mytrunk@172.31.0.248>;tag=42a88e07-0cce-4082-b6a7-b685354ec960
To: <sip:77.72.174.132>
Contact: <sip:mytrunk@3.65.96.16:5060>
Call-ID: bbba103c-5260-49b5-8356-19541a62bd83
CSeq: 7712 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-15.0.17.34(16.15.1)
Content-Length:  0


<--- Received SIP response (464 bytes) from UDP:77.72.174.132:5060 --->
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj3be6929d-d276-485e-ad00-2d4632ff3883
From: <sip:mytrunk@172.31.0.248>;tag=42a88e07-0cce-4082-b6a7-b685354ec960
To: <sip:77.72.174.132>
Contact: sip:77.72.174.132:5060
Call-ID: bbba103c-5260-49b5-8356-19541a62bd83
CSeq: 7712 OPTIONS
Supported: foo
User-Agent: (Very nice Sip Registrar/Proxy Server)
Allow: ACK,BYE,CANCEL,INVITE,REGISTER,OPTIONS,INFO,MESSAGE
Accept: application/sdp


<--- Transmitting SIP request (480 bytes) to WSS:81.214.221.233:57779 --->
OPTIONS sip:1006@81.214.221.233:57779;transport=ws SIP/2.0
Via: SIP/2.0/WSS 172.31.0.248:8089;rport;branch=z9hG4bKPj1ac274a4-fb82-44d1-adb8-d20ccb39776f;alias
From: <sip:1006@pbx.mycenter.online>;tag=1c94c49f-9c58-41ec-9f80-6c66b5f8d2a1
To: <sip:1006@81.214.221.233>
Contact: <sip:1006@pbx.mycenter.online:5060;transport=ws>
Call-ID: 77d165e5-3171-49b0-a66d-693bddae2d6a
CSeq: 34207 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-15.0.17.34(16.15.1)
Content-Length:  0


<--- Received SIP response (759 bytes) from UDP:77.72.174.132:5060 --->
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj22b9f36b-fc25-46f3-a93d-1dbeafa8052e
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=010d73a0-546e-4f8d-9191-c645dc4fc5fd
To: <sip:00493442854382@77.72.174.132>;tag=a60313ac608f77c73a161e
Contact: sip:00493442854382@77.72.174.132:5060
Call-ID: 8dbf28fa-d185-4758-99ee-219a945da358
CSeq: 28200 INVITE
Server: (Very nice Sip Registrar/Proxy Server)
Allow: ACK,BYE,CANCEL,INVITE,REGISTER,OPTIONS,INFO,MESSAGE
Content-Type: application/sdp
Content-Length: 212

v=0
o=CARRIER 1623306310 1623306311 IN IP4 195.219.64.30
s=SIP Call
c=IN IP4 195.219.64.30
t=0 0
m=audio 39652 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=sendrecv

    -- PJSIP/mytrunk-00000101 answered
    -- Executing [1999@dialerplan:1] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG EXTEN: 1999") in new stack
<--- Transmitting SIP request (447 bytes) to UDP:77.72.174.132:5060 --->
ACK sip:00493442854382@77.72.174.132:5060 SIP/2.0
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPjb964404c-8339-451a-9d2a-52396cb2144a
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=010d73a0-546e-4f8d-9191-c645dc4fc5fd
To: <sip:00493442854382@77.72.174.132>;tag=a60313ac608f77c73a161e
Call-ID: 8dbf28fa-d185-4758-99ee-219a945da358
CSeq: 28200 ACK
Max-Forwards: 70
User-Agent: FPBX-15.0.17.34(16.15.1)
Content-Length:  0


    -- DEBUG EXTEN: 1999
    -- Executing [1999@dialerplan:2] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG CHANNEL: PJSIP/mytrunk-00000101") in new stack
    -- DEBUG CHANNEL: PJSIP/mytrunk-00000101
    -- Executing [1999@dialerplan:3] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG CALLERID(num): ") in new stack
    -- DEBUG CALLERID(num):
    -- Executing [1999@dialerplan:4] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG CALLERID(name): ") in new stack
    -- DEBUG CALLERID(name):
    -- Executing [1999@dialerplan:5] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG UNIQUEID: unq3232") in new stack
    -- DEBUG UNIQUEID: unq3232
    -- Executing [1999@dialerplan:6] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG CALLEE: 00493442854382") in new stack
    -- DEBUG CALLEE: 00493442854382
    -- Executing [1999@dialerplan:7] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG CALLER: mytrunk") in new stack
    -- DEBUG CALLER: mytrunk
    -- Executing [1999@dialerplan:8] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG QUEUE: 1999") in new stack
    -- DEBUG QUEUE: 1999
    -- Executing [1999@dialerplan:9] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG CALLER_ID: 0049333222111") in new stack
    -- DEBUG CALLER_ID: 0049333222111
    -- Executing [1999@dialerplan:10] Verbose("PJSIP/mytrunk-00000101", "3,DEBUG HANGUPCAUSE: 0") in new stack
    -- DEBUG HANGUPCAUSE: 0
    -- Executing [1999@dialerplan:11] Set("PJSIP/mytrunk-00000101", "CALLERID(all)=0049333222111") in new stack
    -- Executing [1999@dialerplan:12] Dial("PJSIP/mytrunk-00000101", "PJSIP/00493442854382@mytrunk,60") in new stack
    -- Called PJSIP/00493442854382@mytrunk
<--- Transmitting SIP request (1050 bytes) to UDP:77.72.174.132:5060 --->
INVITE sip:00493442854382@77.72.174.132:5060 SIP/2.0
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj09b31ba1-8166-44b4-b97a-08063871d467
From: <sip:0049333222111@172.31.0.248>;tag=4b907db3-52e5-48c9-8531-a5d58bf0a7fe
To: <sip:00493442854382@77.72.174.132>
Contact: <sip:asterisk@3.65.96.16:5060>
Call-ID: 6c37c7aa-aa83-4a8e-a5a1-c772b4dbdc42
CSeq: 1791 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-15.0.17.34(16.15.1)
Content-Type: application/sdp
Content-Length:   359

v=0
o=- 558583522 558583522 IN IP4 3.65.96.16
s=Asterisk
c=IN IP4 3.65.96.16
t=0 0
m=audio 11148 RTP/AVP 8 107 0 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv

<--- Received SIP response (477 bytes) from UDP:77.72.174.132:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj09b31ba1-8166-44b4-b97a-08063871d467
From: <sip:0049333222111@172.31.0.248>;tag=4b907db3-52e5-48c9-8531-a5d58bf0a7fe
To: <sip:00493442854382@77.72.174.132>
Contact: sip:00493442854382@77.72.174.132:5060
Call-ID: 6c37c7aa-aa83-4a8e-a5a1-c772b4dbdc42
CSeq: 1791 INVITE
Server: (Very nice Sip Registrar/Proxy Server)
Allow: ACK,BYE,CANCEL,INVITE,REGISTER,OPTIONS,INFO,MESSAGE
Content-Length: 0


<--- Received SIP response (474 bytes) from WSS:81.214.221.233:57779 --->
SIP/2.0 200 OK
Via: SIP/2.0/WSS 172.31.0.248:8089;rport;branch=z9hG4bKPj1ac274a4-fb82-44d1-adb8-d20ccb39776f;alias
To: <sip:1006@81.214.221.233>;tag=6tcndkr1sj
From: <sip:1006@pbx.mycenter.online>;tag=1c94c49f-9c58-41ec-9f80-6c66b5f8d2a1
Call-ID: 77d165e5-3171-49b0-a66d-693bddae2d6a
CSeq: 34207 OPTIONS
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
Accept: application/sdp, application/dtmf-relay
Supported: outbound
Content-Length: 0


<--- Received SIP response (759 bytes) from UDP:77.72.174.132:5060 --->
SIP/2.0 183 Session progress
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj09b31ba1-8166-44b4-b97a-08063871d467
From: <sip:0049333222111@172.31.0.248>;tag=4b907db3-52e5-48c9-8531-a5d58bf0a7fe
To: <sip:00493442854382@77.72.174.132>;tag=a60313ac608f77c73a1625
Contact: sip:00493442854382@77.72.174.132:5060
Call-ID: 6c37c7aa-aa83-4a8e-a5a1-c772b4dbdc42
CSeq: 1791 INVITE
Server: (Very nice Sip Registrar/Proxy Server)
Allow: ACK,BYE,CANCEL,INVITE,REGISTER,OPTIONS,INFO,MESSAGE
Content-Type: application/sdp
Content-Length: 212

v=0
o=CARRIER 1623306317 1623306317 IN IP4 195.219.64.36
s=SIP Call
c=IN IP4 195.219.64.36
t=0 0
m=audio 17060 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=sendrecv

    -- PJSIP/mytrunk-00000102 is making progress passing it to PJSIP/mytrunk-00000101
       > 0x7f3b64148350 -- Strict RTP learning after remote address set to: 195.219.64.36:17060
    -- PJSIP/mytrunk-00000102 is making progress passing it to PJSIP/mytrunk-00000101
<--- Received SIP response (507 bytes) from UDP:77.72.174.132:5060 --->
SIP/2.0 486 Busy here
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj09b31ba1-8166-44b4-b97a-08063871d467
From: <sip:0049333222111@172.31.0.248>;tag=4b907db3-52e5-48c9-8531-a5d58bf0a7fe
To: <sip:00493442854382@77.72.174.132>;tag=a60313ac608f77c73a1625
Contact: sip:00493442854382@77.72.174.132:5060
Call-ID: 6c37c7aa-aa83-4a8e-a5a1-c772b4dbdc42
CSeq: 1791 INVITE
Server: (Very nice Sip Registrar/Proxy Server)
Allow: ACK,BYE,CANCEL,INVITE,REGISTER,OPTIONS,INFO,MESSAGE
Content-Length: 0


<--- Transmitting SIP request (433 bytes) to UDP:77.72.174.132:5060 --->
ACK sip:00493442854382@77.72.174.132:5060 SIP/2.0
Via: SIP/2.0/UDP 3.65.96.16:5060;rport;branch=z9hG4bKPj09b31ba1-8166-44b4-b97a-08063871d467
From: <sip:0049333222111@172.31.0.248>;tag=4b907db3-52e5-48c9-8531-a5d58bf0a7fe
To: <sip:00493442854382@77.72.174.132>;tag=a60313ac608f77c73a1625
Call-ID: 6c37c7aa-aa83-4a8e-a5a1-c772b4dbdc42
CSeq: 1791 ACK
Max-Forwards: 70
User-Agent: FPBX-15.0.17.34(16.15.1)
Content-Length:  0


  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [1999@dialerplan:13] Set("PJSIP/mytrunk-00000101", "CALLERID(all)=00493442854382") in new stack
    -- Executing [1999@dialerplan:14] Goto("PJSIP/mytrunk-00000101", "queueplan,1999,1") in new stack
    -- Goto (queueplan,1999,1)
    -- Executing [1999@queueplan:1] Verbose("PJSIP/mytrunk-00000101", "3,QUEUE DEBUG EXTEN: 1999") in new stack
    -- QUEUE DEBUG EXTEN: 1999
    -- Auto fallthrough, channel 'PJSIP/mytrunk-00000101' status is 'BUSY'
       > 0x7f3b6420bb00 -- Strict RTP switching to RTP target address 195.219.64.30:39652 as source
       > 0x7f3b6420bb00 -- Strict RTP learning complete - Locking on source address 195.219.64.30:39652
<--- Received SIP request (542 bytes) from UDP:77.72.174.132:5060 --->
BYE sip:asterisk@3.65.96.16:5060 SIP/2.0
Via: SIP/2.0/UDP 77.72.174.132:5060;branch=z9hG4bKfe64e1a609134ed2b657abefd4c3090c
From: <sip:00493442854382@77.72.174.132>;tag=a60313ac608f77c73a161e
To: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=010d73a0-546e-4f8d-9191-c645dc4fc5fd
Contact: sip:00493442854382@77.72.174.132:5060
Call-ID: 8dbf28fa-d185-4758-99ee-219a945da358
CSeq: 1 BYE
Server: (Very nice Sip Registrar/Proxy Server)
Allow: ACK,BYE,CANCEL,INVITE,REGISTER,OPTIONS,INFO,MESSAGE
Max-Forwards: 70
Content-Length: 0


<--- Transmitting SIP response (411 bytes) to UDP:77.72.174.132:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 77.72.174.132:5060;rport=5060;received=77.72.174.132;branch=z9hG4bKfe64e1a609134ed2b657abefd4c3090c
Call-ID: 8dbf28fa-d185-4758-99ee-219a945da358
From: <sip:00493442854382@77.72.174.132>;tag=a60313ac608f77c73a161e
To: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=010d73a0-546e-4f8d-9191-c645dc4fc5fd
CSeq: 1 BYE
Server: FPBX-15.0.17.34(16.15.1)
Content-Length:  0


    -- Executing [h@queueplan:1] Hangup("PJSIP/mytrunk-00000101", "") in new stack
  == Spawn extension (queueplan, h, 1) exited non-zero on 'PJSIP/mytrunk-00000101'
pbx*CLI>

You have the wrong extension and wrong priority on the line containing Queue(). As I said, its is looking for queueplan, 1999, 2, but you have queueplan, s, 1.

Also calling hangup in the h extension seems pretty pointless, as the hangup has already occurred.

Receiving calls with callerid, joining the call queue while answering the phone. When I watch the CLI, the call travels to every extension in the queue but never rings on the extension side, there is no action. Also why am i getting a warning like “Nobody picked up in 0 ms”, what does it mean.

[queueplan]
exten => _X.,1,Verbose(3,---------> Q DEBUG CALLEE: ${CALLEE})
exten => _X.,2,Verbose(3,---------> Q DEBUG QUEUE: ${QUEUE})
exten => _X.,3,Set(CALLERID(all)=${CALLEE})
exten => _X.,4,Set(thisQueue=${QUEUE})
exten => _X.,5,GotoIf($["${thisQueue}" = ""]?invalid_queue,1)
exten => _X.,6,Verbose(2, ---------> Entering the ${thisQueue} queue)
exten => _X.,7,Queue(${thisQueue})
exten => _X.,8,Hangup()

[dialerplan]
exten => _X.,1,Verbose(3,---------> DEBUG EXTEN: ${EXTEN})
exten => _X.,2,Verbose(3,---------> DEBUG CHANNEL: ${CHANNEL})
exten => _X.,3,Verbose(3,---------> DEBUG CALLERID(num): ${CALLERID(num)})
exten => _X.,4,Verbose(3,---------> DEBUG CALLERID(name): ${CALLERID(name)})
exten => _X.,5,Verbose(3,---------> DEBUG UNIQUEID: ${UNIQUEID})
exten => _X.,6,Verbose(3,---------> DEBUG CALLEE: ${CALLEE})
exten => _X.,7,Verbose(3,---------> DEBUG CALLER: ${CALLER})
exten => _X.,8,Verbose(3,---------> DEBUG QUEUE: ${QUEUE})
exten => _X.,9,Verbose(3,---------> DEBUG CALLER_ID: ${CALLER_ID})
exten => _X.,10,Verbose(3,---------> DEBUG HANGUPCAUSE: ${HANGUPCAUSE})
exten => _X.,11,Set(CALLERID(all)=${CALLER_ID})
exten => _X.,12,Dial(PJSIP/${CALLEE}@${CALLER},60)
exten => _X.,13,Set(CALLERID(all)=${CALLEE})
exten => _X.,14,Goto(queueplan,${QUEUE},1)
CLI LOG
    -- Called 00493442854382@mytrunk
    -- PJSIP/mytrunk-0000000e is making progress
       > 0x7f20000d7740 -- Strict RTP learning after remote address set to: 195.219.64.94:24016
    -- PJSIP/mytrunk-0000000e is making progress
    -- PJSIP/mytrunk-0000000e answered
    -- Executing [1999@dialerplan:1] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG EXTEN: 1999") in new stack
    -- ---------> DEBUG EXTEN: 1999
    -- Executing [1999@dialerplan:2] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG CHANNEL: PJSIP/mytrunk-0000000e") in new stack
    -- ---------> DEBUG CHANNEL: PJSIP/mytrunk-0000000e
    -- Executing [1999@dialerplan:3] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG CALLERID(num): 004933322211") in new stack
    -- ---------> DEBUG CALLERID(num): 004933322211
    -- Executing [1999@dialerplan:4] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG CALLERID(name): 004933322211") in new stack
    -- ---------> DEBUG CALLERID(name): 004933322211
    -- Executing [1999@dialerplan:5] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG UNIQUEID: 3356643") in new stack
    -- ---------> DEBUG UNIQUEID: 3356643
    -- Executing [1999@dialerplan:6] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG CALLEE: 00493442854382") in new stack
    -- ---------> DEBUG CALLEE: 00493442854382
    -- Executing [1999@dialerplan:7] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG CALLER: mytrunk") in new stack
    -- ---------> DEBUG CALLER: mytrunk
    -- Executing [1999@dialerplan:8] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG QUEUE: 1999") in new stack
    -- ---------> DEBUG QUEUE: 1999
    -- Executing [1999@dialerplan:9] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG CALLER_ID: 004933322211") in new stack
    -- ---------> DEBUG CALLER_ID: 004933322211
    -- Executing [1999@dialerplan:10] Verbose("PJSIP/mytrunk-0000000e", "3,---------> DEBUG HANGUPCAUSE: 0") in new stack
    -- ---------> DEBUG HANGUPCAUSE: 0
    -- Executing [1999@dialerplan:11] Set("PJSIP/mytrunk-0000000e", "CALLERID(all)=004933322211") in new stack
    -- Executing [1999@dialerplan:12] Dial("PJSIP/mytrunk-0000000e", "PJSIP/00493442854382@mytrunk,60") in new stack
    -- Called PJSIP/00493442854382@mytrunk
    -- PJSIP/mytrunk-0000000f is making progress passing it to PJSIP/mytrunk-0000000e
       > 0x7f200008d910 -- Strict RTP learning after remote address set to: 195.219.64.83:11952
    -- PJSIP/mytrunk-0000000f is making progress passing it to PJSIP/mytrunk-0000000e
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [1999@dialerplan:13] Set("PJSIP/mytrunk-0000000e", "CALLERID(all)=00493442854382") in new stack
    -- Executing [1999@dialerplan:14] Goto("PJSIP/mytrunk-0000000e", "queueplan,1999,4") in new stack
    -- Goto (queueplan,1999,4)
    -- Executing [1999@queueplan:4] Set("PJSIP/mytrunk-0000000e", "thisQueue=1999") in new stack
    -- Executing [1999@queueplan:5] GotoIf("PJSIP/mytrunk-0000000e", "0?invalid_queue,1") in new stack
    -- Executing [1999@queueplan:6] Verbose("PJSIP/mytrunk-0000000e", "2, ---------> Entering the 1999 queue") in new stack
  ==  ---------> Entering the 1999 queue
    -- Executing [1999@queueplan:7] Queue("PJSIP/mytrunk-0000000e", "1999") in new stack
    -- Started music on hold, class 'default', on channel 'PJSIP/mytrunk-0000000e'
    -- Executing [1002@from-queue:1] Set("Local/1002@from-queue-0000003c;2", "QAGENT=1002") in new stack
    -- Executing [1002@from-queue:2] Set("Local/1002@from-queue-0000003c;2", "__FROMQ=true") in new stack
    -- Executing [1002@from-queue:3] GotoIf("Local/1002@from-queue-0000003c;2", "1?hangup") in new stack
    -- Goto (from-queue,1002,5)
    -- Executing [1002@from-queue:5] Macro("Local/1002@from-queue-0000003c;2", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("Local/1002@from-queue-0000003c;2", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Called Local/1002@from-queue/n
    --     -- LazyMembers debugging - Numbusies: 0, Nummems: 9
    -- Executing [s@macro-hangupcall:3] ExecIf("Local/1002@from-queue-0000003c;2", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] NoOp("Local/1002@from-queue-0000003c;2", " montior file= ") in new stack
    -- Executing [s@macro-hangupcall:5] GotoIf("Local/1002@from-queue-0000003c;2", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] Hangup("Local/1002@from-queue-0000003c;2", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'Local/1002@from-queue-0000003c;2' in macro 'hangupcall'
  == Spawn extension (from-queue, 1002, 5) exited non-zero on 'Local/1002@from-queue-0000003c;2'
    -- Executing [h@from-queue:1] Macro("Local/1002@from-queue-0000003c;2", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("Local/1002@from-queue-0000003c;2", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("Local/1002@from-queue-0000003c;2", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] NoOp("Local/1002@from-queue-0000003c;2", " montior file= ") in new stack
    -- Executing [s@macro-hangupcall:5] GotoIf("Local/1002@from-queue-0000003c;2", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] Hangup("Local/1002@from-queue-0000003c;2", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'Local/1002@from-queue-0000003c;2' in macro 'hangupcall'
  == Spawn extension (from-queue, h, 1) exited non-zero on 'Local/1002@from-queue-0000003c;2'
    -- Nobody picked up in 0 ms
    -- Called Local/1004@from-queue/n

Getting tired with this. it shouldn’t be this hard.

You haven’t provided the source code of this line, so we can’t tell why the condition is evaluating true. Nor have you told us the purpose of the from-queue context.

That’s because the test you haven’t told us about is causing the local channel whose purpose you haven’t explained, to reject the call.

All those local channels rejected their calls so quickly that no time duration was measured.

i didnt change anything in “from-queue” macro. It’s default content.

i change exten => _X.,7,Queue(${thisQueue},tT,300) in queueplan with timeout, i hear the hold on music when i joined queue, Call travels extension but leave immediatly and get same errors. Never rings on the extension side.

CLI LOG
 Executing [1999@dialerplan:11] Set("PJSIP/mytrunk-0000002e", "CALLERID(all)=0049333222111") in new stack
    -- Executing [1999@dialerplan:12] Dial("PJSIP/mytrunk-0000002e", "PJSIP/00905442812382@mytrunk,60") in new stack
    -- Called PJSIP/00905442812382@mytrunk
    -- PJSIP/mytrunk-0000002f is making progress passing it to PJSIP/mytrunk-0000002e
       > 0x7f2020009860 -- Strict RTP learning after remote address set to: 195.219.64.30:20460
    -- PJSIP/mytrunk-0000002f is making progress passing it to PJSIP/mytrunk-0000002e
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [1999@dialerplan:13] Set("PJSIP/mytrunk-0000002e", "CALLERID(all)=00905442812382") in new stack
    -- Executing [1999@dialerplan:14] Goto("PJSIP/mytrunk-0000002e", "queueplan,1999,1") in new stack
    -- Goto (queueplan,1999,1)
    -- Executing [1999@queueplan:1] Verbose("PJSIP/mytrunk-0000002e", "3,---------> Q DEBUG CALLEE: 00905442812382") in new stack
    -- ---------> Q DEBUG CALLEE: 00905442812382
    -- Executing [1999@queueplan:2] Verbose("PJSIP/mytrunk-0000002e", "3,---------> Q DEBUG QUEUE: 1999") in new stack
    -- ---------> Q DEBUG QUEUE: 1999
    -- Executing [1999@queueplan:3] Set("PJSIP/mytrunk-0000002e", "CALLERID(all)=00905442812382") in new stack
    -- Executing [1999@queueplan:4] Set("PJSIP/mytrunk-0000002e", "thisQueue=1999") in new stack
    -- Executing [1999@queueplan:5] GotoIf("PJSIP/mytrunk-0000002e", "0?invalid_queue,1") in new stack
    -- Executing [1999@queueplan:6] Verbose("PJSIP/mytrunk-0000002e", "2, ---------> Entering the 1999 queue") in new stack
  ==  ---------> Entering the 1999 queue
    -- Executing [1999@queueplan:7] Queue("PJSIP/mytrunk-0000002e", "1999,t,,,900,,,,,") in new stack
    -- Started music on hold, class 'default', on channel 'PJSIP/mytrunk-0000002e'
    -- Called Local/1002@from-queue/n
    --     -- LazyMembers debugging - Numbusies: 0, Nummems: 9
    -- Executing [1002@from-queue:1] Set("Local/1002@from-queue-00000067;2", "QAGENT=1002") in new stack
    -- Executing [1002@from-queue:2] Set("Local/1002@from-queue-00000067;2", "__FROMQ=true") in new stack
    -- Executing [1002@from-queue:3] GotoIf("Local/1002@from-queue-00000067;2", "1?hangup") in new stack
    -- Goto (from-queue,1002,5)
    -- Executing [1002@from-queue:5] Macro("Local/1002@from-queue-00000067;2", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("Local/1002@from-queue-00000067;2", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("Local/1002@from-queue-00000067;2", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] NoOp("Local/1002@from-queue-00000067;2", " montior file= ") in new stack
    -- Executing [s@macro-hangupcall:5] GotoIf("Local/1002@from-queue-00000067;2", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] Hangup("Local/1002@from-queue-00000067;2", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'Local/1002@from-queue-00000067;2' in macro 'hangupcall'
  == Spawn extension (from-queue, 1002, 5) exited non-zero on 'Local/1002@from-queue-00000067;2'
    -- Executing [h@from-queue:1] Macro("Local/1002@from-queue-00000067;2", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("Local/1002@from-queue-00000067;2", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("Local/1002@from-queue-00000067;2", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] NoOp("Local/1002@from-queue-00000067;2", " montior file= ") in new stack
    -- Executing [s@macro-hangupcall:5] GotoIf("Local/1002@from-queue-00000067;2", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] Hangup("Local/1002@from-queue-00000067;2", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'Local/1002@from-queue-00000067;2' in macro 'hangupcall'
  == Spawn extension (from-queue, h, 1) exited non-zero on 'Local/1002@from-queue-00000067;2'
    -- Nobody picked up in 0 ms
    --     -- LazyMembers debugging - Numbusies: 0, Nummems: 9
       > 0x7f2000043190 -- Strict RTP switching to RTP target address 62.41.83.49:27904 as source
       > 0x7f2000043190 -- Strict RTP learning complete - Locking on source address 62.41.83.49:27904
    -- Called Local/1002@from-queue/n
    --     -- LazyMembers debugging - Numbusies: 0, Nummems: 9
Queue Show
1999 has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:8, SL:0.0%, SL2:62.5% within 15s
   Members:
      1004 (Local/1004@from-queue/n from hint:1004@ext-local) (ringinuse disabled) (Unavailable) has taken no calls yet
      1008 (Local/1008@from-queue/n from hint:1008@ext-local) (ringinuse disabled) (Unavailable) has taken no calls yet
      1001 (Local/1001@from-queue/n from hint:1001@ext-local) (ringinuse disabled) (Unavailable) has taken no calls yet
      1005 (Local/1005@from-queue/n from hint:1005@ext-local) (ringinuse disabled) (Unavailable) has taken no calls yet
      1009 (Local/1009@from-queue/n from hint:1009@ext-local) (ringinuse disabled) (Unavailable) has taken no calls yet
      1002 (Local/1002@from-queue/n from hint:1002@ext-local) (ringinuse disabled) (Not in use) has taken no calls yet
      1006 (Local/1006@from-queue/n from hint:1006@ext-local) (ringinuse disabled) (Unavailable) has taken no calls yet
      1003 (Local/1003@from-queue/n from hint:1003@ext-local) (ringinuse disabled) (Unavailable) has taken no calls yet
      1007 (Local/1007@from-queue/n from hint:1007@ext-local) (ringinuse disabled) (Unavailable) has taken no calls yet
   No Callers
queues.conf
[1999]
announce-frequency=0
announce-holdtime=no
announce-position=no
autofill=yes
autopause=no
autopausebusy=no
autopausedelay=0
autopauseunavail=no
joinempty=yes
leavewhenempty=penalty,paused,invalid,unavailable,inuse,ringing
maxlen=0
memberdelay=15
min-announce-frequency=15
musicclass=default
penaltymemberslimit=0
periodic-announce-frequency=0
queue-callswaiting=silence/1
queue-thereare=silence/1
queue-youarenext=silence/1
reportholdtime=no
retry=5
ringinuse=no
servicelevel=15
setinterfacevar=yes
strategy=rrmemory
timeout=15
timeoutpriority=app
timeoutrestart=no
weight=0
wrapuptime=5
context=
member=Local/1001@from-queue/n,0,"1001",hint:1001@ext-local
member=Local/1002@from-queue/n,0,"1002",hint:1002@ext-local
member=Local/1003@from-queue/n,0,"1003",hint:1003@ext-local
member=Local/1004@from-queue/n,0,"1004",hint:1004@ext-local
member=Local/1005@from-queue/n,0,"1005",hint:1005@ext-local
member=Local/1006@from-queue/n,0,"1006",hint:1006@ext-local
member=Local/1007@from-queue/n,0,"1007",hint:1007@ext-local
member=Local/1008@from-queue/n,0,"1008",hint:1008@ext-local
member=Local/1009@from-queue/n,0,"1009",hint:1009@ext-local
From-queue
[from-queue]
include => from-queue-custom
exten => 1999,1,Goto(from-internal,${QAGENT},1)

exten => 2999,1,Goto(from-internal,${QAGENT},1)

exten => _.,1,Set(QAGENT=${EXTEN})
exten => _.,n,Set(__FROMQ=true)
exten => _.,n,GotoIf($["${LEN(${NODEST})}" = "0"]?hangup)
exten => _.,n,GotoIf($["${DIALPLAN_EXISTS(from-queue,${NODEST},1)}" = "1"]?${NODEST},1:hangup)
exten => _.,n(hangup),Macro(hangupcall,)

exten => h,1,Macro(hangupcall,)

There is no default content. And there is no content in extensions.conf.sample. The phrase “from-queue” appears nowhere within the source files for Asterisk.

Is this where you tell us you are actually using FreePBX, which comes with masses of dialplan that isn’t supported here?

The variable it is testing, NODEST, also doesn’t exist anywhere in Asterisk.

Peer support for FreePBX is available at https:/community.freepbx.org/

The reason this seems complicated for you is that FreePBX contains very complex dialplan code to create the abstractions that it provides, and do so in a parameterisable way, and also that typical FreePBX users do not know how to program Asterisk directly.

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