I am facing an issue when trying to configure a single dialplan to handle both inbound and outbound calls on my Vicidial server. Here's what works and what doesn't:
Inbound Calls in an Inbound Campaign (Inbound_Man):
When I use the following dialplan for handling inbound calls, everything works fine, and the calls are processed correctly:
[trunkinbound]
; Handle incoming calls
exten => s,1,NoOp(Incoming request to trunkinbound)
exten => s,n,Answer()
exten => s,n,Hangup()
Outbound Calls in an Outbound Campaign (Manual):
Similarly, outbound calls work perfectly when I use this dialplan entry:
; Handle outbound calls
exten => _X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _X.,n,Dial(SIP/${EXTEN}@MyProvider,,tTor)
exten => _X.,n,Hangup()
The Problem:
When I try to combine both sets of extensions into a single dialplan, neither inbound nor outbound calls work. For example:
[trunkinbound]
; Handle incoming calls
exten => s,1,NoOp(Incoming request to trunkinbound)
exten => s,n,Answer()
exten => s,n,Hangup()
; Handle outbound calls
exten => _X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _X.,n,Dial(SIP/${EXTEN}@MyProvider,,tTor)
exten => _X.,n,Hangup()
When I use this combined configuration with the Inbound_Man campaign, neither inbound nor outbound calls work.
Is there a specific way to structure the dialplan to allow both inbound and outbound calls to work together in the same configuration?
Am I missing something in the configuration or context assignments that might be causing the issue?
Vicidial Version: vicibox11 VERSION: 2.14-931a
Asterisk Version : Asterisk 16.30.0-vici
Any guidance or suggestions to resolve this would be greatly appreciated!
Thank you in advance for your help.
accout entry settings :
- Code: Select all
[MyProvider]
type=friend
host=41.xx.xx.xx
dtmfmode=rfc2833
context=trunkinbound
disallow=all
allow=alaw
allow=ulaw
allow=g729
canreinvite=no
qualify=yes
nat=force_rport,comedia
sendrpid=pai
trustrpid=yes
fromuser=0983xxxxxx
fromdomain=41.xx.xx.xx
the log :
[color=#800000][Nov 28 12:23:08] -- Executing [0983xxxxxx@trunkinbound:1] NoOp("SIP/MyProvider-00000005", "Incoming request to trunkinbound") in new stack
[Nov 28 12:23:08] -- Executing [0983xxxxxx@trunkinbound:2] Answer("SIP/MyProvider-00000005", "") in new stack
[Nov 28 12:23:08] Audio is at 10658
[Nov 28 12:23:08] Adding codec alaw to SDP
[Nov 28 12:23:08] Adding codec ulaw to SDP
[Nov 28 12:23:08] Adding codec g729 to SDP
[Nov 28 12:23:08]
[Nov 28 12:23:08] <--- Reliably Transmitting (NAT) to 41.xx.xx.xx:5060 --->
[Nov 28 12:23:08] SIP/2.0 200 OK
[Nov 28 12:23:08] Via: SIP/2.0/UDP 41.xx.xx.xx:5060;branch=z9hG4bK0f3ld0p4r9r9c0fcq0cffpcvq;Role=3;Hpt=8f28_16;TRC=ffffffff-ffffffff;received=41.xx.xx.xx;rport=5060
[Nov 28 12:23:08] Record-Route: <sip:41.xx.xx.xx:5060;transport=udp;lr;Hpt=8f28_16;CxtId=4;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=7285>
[Nov 28 12:23:08] From: <sip:0560229598@41.xx.xx.xx;user=phone>;tag=ju912hun-CC-40
[Nov 28 12:23:08] To: <sip:0983xxxxxx@41.11x.xx.xx;user=phone>;tag=as2d28c4bf
[Nov 28 12:23:08] Call-ID: isbce9bc8he2h1a78unwuwjua2uo21h1i287@SoftX3000
[Nov 28 12:23:08] CSeq: 1 INVITE
[Nov 28 12:23:08] Server: Asterisk PBX 16.30.0-vici
[Nov 28 12:23:08] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Nov 28 12:23:08] Supported: replaces, timer
[Nov 28 12:23:08] Contact: <sip:0983xxxxxx@41.11x.xx.xx:5060>
[Nov 28 12:23:08] Content-Type: application/sdp
[Nov 28 12:23:08] Content-Length: 276
[Nov 28 12:23:08]
[Nov 28 12:23:08] v=0
[Nov 28 12:23:08] o=root 1043150900 1043150900 IN IP4 41.11x.xx.xx
[Nov 28 12:23:08] s=Asterisk PBX 16.30.0-vici
[Nov 28 12:23:08] c=IN IP4 41.11x.xx.xx
[Nov 28 12:23:08] t=0 0
[Nov 28 12:23:08] m=audio 10658 RTP/AVP 8 0 18
[Nov 28 12:23:08] a=rtpmap:8 PCMA/8000
[Nov 28 12:23:08] a=rtpmap:0 PCMU/8000
[Nov 28 12:23:08] a=rtpmap:18 G729/8000
[Nov 28 12:23:08] a=fmtp:18 annexb=no
[Nov 28 12:23:08] a=ptime:20
[Nov 28 12:23:08] a=maxptime:150
[Nov 28 12:23:08] a=sendrecv
[Nov 28 12:23:08]
[Nov 28 12:23:08] <------------>
[Nov 28 12:23:09] Retransmitting #1 (NAT) to 41.xx.xx.xx:5060:
[Nov 28 12:23:09] SIP/2.0 200 OK
[Nov 28 12:23:09] Via: SIP/2.0/UDP 41.xx.xx.xx:5060;branch=z9hG4bK0f3ld0p4r9r9c0fcq0cffpcvq;Role=3;Hpt=8f28_16;TRC=ffffffff-ffffffff;received=41.xx.xx.xx;rport=5060
[Nov 28 12:23:09] Record-Route: <sip:41.xx.xx.xx:5060;transport=udp;lr;Hpt=8f28_16;CxtId=4;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=7285>
[Nov 28 12:23:09] From: <sip:0560229598@41.xx.xx.xx;user=phone>;tag=ju912hun-CC-40
[Nov 28 12:23:09] To: <sip:0983xxxxxx@41.11x.xx.xx;user=phone>;tag=as2d28c4bf
[Nov 28 12:23:09] Call-ID: isbce9bc8he2h1a78unwuwjua2uo21h1i287@SoftX3000
[Nov 28 12:23:09] CSeq: 1 INVITE
[Nov 28 12:23:09] Server: Asterisk PBX 16.30.0-vici
[Nov 28 12:23:09] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Nov 28 12:23:09] Supported: replaces, timer
[Nov 28 12:23:09] Contact: <sip:0983xxxxxx@41.11x.xx.xx:5060>
[Nov 28 12:23:09] Content-Type: application/sdp
[Nov 28 12:23:09] Content-Length: 276
[Nov 28 12:23:09]
[Nov 28 12:23:09] v=0
[Nov 28 12:23:09] o=root 1043150900 1043150900 IN IP4 41.11x.xx.xx
[Nov 28 12:23:09] s=Asterisk PBX 16.30.0-vici
[Nov 28 12:23:09] c=IN IP4 41.11x.xx.xx
[Nov 28 12:23:09] t=0 0
[Nov 28 12:23:09] m=audio 10658 RTP/AVP 8 0 18
[Nov 28 12:23:09] a=rtpmap:8 PCMA/8000
[Nov 28 12:23:09] a=rtpmap:0 PCMU/8000
[Nov 28 12:23:09] a=rtpmap:18 G729/8000
[Nov 28 12:23:09] a=fmtp:18 annexb=no
[Nov 28 12:23:09] a=ptime:20
[Nov 28 12:23:09] a=maxptime:150
[Nov 28 12:23:09] a=sendrecv
[Nov 28 12:23:09]
[Nov 28 12:23:09] ---
[Nov 28 12:23:09] > 0x7f482c02d740 -- Strict RTP switching to RTP target address 41.110.xx.xx:47884 as source
[Nov 28 12:23:09] -- Executing [0983xxxxxx@trunkinbound:3] Hangup("SIP/MyProvider-00000005", "") in new stack
[Nov 28 12:23:09] == Spawn extension (trunkinbound, 0983xxxxxx, 3) exited non-zero on 'SIP/MyProvider-00000005'
[Nov 28 12:23:09] WARNING[25530][C-00000006]: func_hangupcause.c:138 hangupcause_read: Unable to find information for channel
[Nov 28 12:23:09] -- Executing [h@trunkinbound:1] AGI("SIP/MyProvider-00000005", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------)") in new stack
[Nov 28 12:23:09] -- <SIP/MyProvider-00000005>AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... ----------) completed, returning 0
[Nov 28 12:23:09] Scheduling destruction of SIP dialog 'isbce9bc8he2h1a78unwuwjua2uo21h1i287@SoftX3000' in 6400 ms (Method: INVITE)
[Nov 28 12:23:09]
[Nov 28 12:23:09] <--- SIP read from UDP:41.xx.xx.xx:5060 --->
[Nov 28 12:23:09] ACK sip:0983xxxxxx@41.11x.xx.xx:5060 SIP/2.0
[Nov 28 12:23:09] Via: SIP/2.0/UDP 41.xx.xx.xx:5060;branch=z9hG4bK3q0b4aa43b4p30bqqalpffcbc;Role=3;Hpt=8f28_16;TRC=ffffffff-ffffffff
[Nov 28 12:23:09] Call-ID: isbce9bc8he2h1a78unwuwjua2uo21h1i287@SoftX3000
[Nov 28 12:23:09] From: <sip:0560229598@41.xx.xx.xx;user=phone>;tag=ju912hun-CC-40
[Nov 28 12:23:09] To: <sip:0983xxxxxx@41.11x.xx.xx;user=phone>;tag=as2d28c4bf
[Nov 28 12:23:09] CSeq: 1 ACK
[Nov 28 12:23:09] Max-Forwards: 69
[Nov 28 12:23:09] Content-Length: 0
[Nov 28 12:23:09]
[Nov 28 12:23:09] <------------->
[Nov 28 12:23:09] --- (8 headers 0 lines) ---
[Nov 28 12:23:09] Reliably Transmitting (NAT) to 41.xx.xx.xx:5060:
[Nov 28 12:23:09] BYE sip:0560229598@41.xx.xx.xx:5060;transport=udp;user=phone;Hpt=8f28_16;CxtId=4;TRC=ffffffff-ffffffff SIP/2.0
[Nov 28 12:23:09] Via: SIP/2.0/UDP 41.11x.xx.xx:5060;branch=z9hG4bK028d34c0;rport
[Nov 28 12:23:09] Route: <sip:41.xx.xx.xx:5060;transport=udp;lr;Hpt=8f28_16;CxtId=4;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=7285>
[Nov 28 12:23:09] Max-Forwards: 70
[Nov 28 12:23:09] From: <sip:0983xxxxxx@41.11x.xx.xx;user=phone>;tag=as2d28c4bf
[Nov 28 12:23:09] To: <sip:0560229598@41.xx.xx.xx;user=phone>;tag=ju912hun-CC-40
[Nov 28 12:23:09] Call-ID: isbce9bc8he2h1a78unwuwjua2uo21h1i287@SoftX3000
[Nov 28 12:23:09] CSeq: 102 BYE
[Nov 28 12:23:09] User-Agent: Asterisk PBX 16.30.0-vici
[Nov 28 12:23:09] X-Asterisk-HangupCause: Normal Clearing
[Nov 28 12:23:09] X-Asterisk-HangupCauseCode: 16
[Nov 28 12:23:09] Content-Length: 0
[Nov 28 12:23:09]
[Nov 28 12:23:09]
[Nov 28 12:23:09] ---
[Nov 28 12:23:09] Scheduling destruction of SIP dialog 'isbce9bc8he2h1a78unwuwjua2uo21h1i287@SoftX3000' in 6400 ms (Method: ACK)
[Nov 28 12:23:09]
[Nov 28 12:23:09] <--- SIP read from UDP:41.xx.xx.xx:5060 --->
[Nov 28 12:23:09] SIP/2.0 200 OK
[Nov 28 12:23:09] Via: SIP/2.0/UDP 41.11x.xx.xx:5060;branch=z9hG4bK028d34c0;rport=5060
[Nov 28 12:23:09] Call-ID: isbce9bc8he2h1a78unwuwjua2uo21h1i287@SoftX3000
[Nov 28 12:23:09] From: <sip:0983xxxxxx@41.11x.xx.xx;user=phone>;tag=as2d28c4bf
[Nov 28 12:23:09] To: <sip:0560229598@41.xx.xx.xx;user=phone>;tag=ju912hun-CC-40
[Nov 28 12:23:09] CSeq: 102 BYE
[Nov 28 12:23:09] Content-Length: 0
[Nov 28 12:23:09]
[Nov 28 12:23:09] <------------->
[Nov 28 12:23:09] --- (7 headers 0 lines) ---
[Nov 28 12:23:09] SIP Response message for INCOMING dialog BYE arrived
[Nov 28 12:23:09] Really destroying SIP dialog 'isbce9bc8he2h1a78unwuwjua2uo21h1i287@SoftX3000' Method: ACK
[Nov 28 12:23:16]
[Nov 28 12:23:16] <--- SIP read from UDP:41.xx.xx.xx:5060 --->
[Nov 28 12:23:16] OPTIONS sip:41.11x.xx.xx:5060 SIP/2.0
[Nov 28 12:23:16] Via: SIP/2.0/UDP 41.xx.xx.xx:5060;branch=z9hG4bKxtkpqr2kv2ucac662pkx66txw;Role=3;Hpt=8ed8_16;TRC=ffffffff-ffffffff;X-HwDim=4
[Nov 28 12:23:16] Record-Route: <sip:41.xx.xx.xx:5060;transport=udp;lr;Hpt=8ed8_16;CxtId=4;TRC=ffffffff-ffffffff>
[Nov 28 12:23:16] Call-ID: isbcjiiuhii7w8c8ec9j88weanu8o9h8bh89@SoftX3000
[Nov 28 12:23:16] From: <sip:41.xx.xx.xx:5060>;tag=ehoj8oea
[Nov 28 12:23:16] To: <sip:41.11x.xx.xx:5060>
[Nov 28 12:23:16] CSeq: 1 OPTIONS
[Nov 28 12:23:16] Max-Forwards: 69
[Nov 28 12:23:16] Content-Length: 0
[Nov 28 12:23:16]
[Nov 28 12:23:16] <------------->
[Nov 28 12:23:16] --- (9 headers 0 lines) ---
[Nov 28 12:23:16] Sending to 41.xx.xx.xx:5060 (NAT)
[Nov 28 12:23:16] Looking for s in trunkinbound (domain 41.11x.xx.xx)
[Nov 28 12:23:16]
[Nov 28 12:23:16] <--- Transmitting (NAT) to 41.xx.xx.xx:5060 --->
[Nov 28 12:23:16] SIP/2.0 404 Not Found
[Nov 28 12:23:16] Via: SIP/2.0/UDP 41.xx.xx.xx:5060;branch=z9hG4bKxtkpqr2kv2ucac662pkx66txw;Role=3;Hpt=8ed8_16;TRC=ffffffff-ffffffff;X-HwDim=4;received=41.xx.xx.xx;rport=5060
[Nov 28 12:23:16] From: <sip:41.xx.xx.xx:5060>;tag=ehoj8oea
[Nov 28 12:23:16] To: <sip:41.11x.xx.xx:5060>;tag=as326c748c
[Nov 28 12:23:16] Call-ID: isbcjiiuhii7w8c8ec9j88weanu8o9h8bh89@SoftX3000
[Nov 28 12:23:16] CSeq: 1 OPTIONS
[Nov 28 12:23:16] Server: Asterisk PBX 16.30.0-vici
[Nov 28 12:23:16] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Nov 28 12:23:16] Supported: replaces, timer
[Nov 28 12:23:16] Accept: application/sdp
[Nov 28 12:23:16] Content-Length: 0
[Nov 28 12:23:16]
[Nov 28 12:23:16]
[Nov 28 12:23:16] <------------>
[Nov 28 12:23:16] Scheduling destruction of SIP dialog 'isbcjiiuhii7w8c8ec9j88weanu8o9h8bh89@SoftX3000' in 32000 ms (Method: OPTIONS)[/color]