Need Help configuring vicidialfor inbound and outbound calls

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Need Help configuring vicidialfor inbound and outbound calls

Postby sofianemh » Thu Nov 28, 2024 6:27 am

Hello Vicidial Community, newbie here

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]
sofianemh
 
Posts: 4
Joined: Wed Nov 27, 2024 8:56 am

Re: Need Help configuring vicidialfor inbound and outbound c

Postby njr » Thu Nov 28, 2024 3:40 pm

Howdy

This both is and isn't a direct answering of your question, but is there a reason you're wanting to set the dialplan manually like this? If yes, does it need to be in one dialplan for some reason? If yes, which file, specifically, are you changing this in?

I feel like the easiest fix is just to follow the setup instructions in the manager manual (free version available https://www.vicidial.org/download_survey.php ) but in general:
1. Add the carrier, which it looks like you have done based on the account entry you provided. The dialplan for this carrier should look like what you posted
Code: Select all
exten => _X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _X.,n,Dial(SIP/${EXTEN}@MyProvider,,tTor)
exten => _X.,n,Hangup()

although usually there is an extension, as you usually set an extension to dial, but, I suppose you could leave this blank and just not put an extension for outbound in the campaign? I've never tried honestly. The default, I believe, is 9, and therefore the example dialplan is:
Code: Select all
exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
 exten => _91NXXNXXXXXX,2,Dial(newsip:test@10.10.10.15:5060/${EXTEN:2},,tTor)
 exten => _91NXXNXXXXXX,3,Hangup
but change the Dial to match yours, keeping the EXTEN:2 because of the _91 so that it would remove that.
2. Create an In-Group
3. Create a DID and point it to that In-Group
4. In the Campaign you have (with Inbound_Manual, and Allow Inbound and Blended set to Y) add that In-Group to the Allowed Inbound Groups

Does that work for you to be able to do in- and outbound calls in the same campaign?
Vicibox 11 from .iso installed/set up by Vicidial | Vicidial 2.14-900a Build: 231115-1636 | Asterisk 16.30.0-vici | 10-server cluster (1 primary DB, 1 primary web, 8 asterisk) in Colo DC | OpenSIPS on web as LB | 10x Dell R740XD
njr
 
Posts: 22
Joined: Fri Dec 08, 2023 1:41 pm

Re: Need Help configuring vicidialfor inbound and outbound c

Postby sofianemh » Fri Nov 29, 2024 6:08 am

njr ,
Thank you so much for your response! Your explanation really helped me understand what I need to do to address the issue. I appreciate you taking the time to provide such a clear and helpful answer. Thanks again for your support!
sofianemh
 
Posts: 4
Joined: Wed Nov 27, 2024 8:56 am

Re: Need Help configuring vicidialfor inbound and outbound c

Postby williamconley » Wed Dec 04, 2024 11:27 pm

just in case you haven't done so yet, the vicidial manager's manual is a good "exercise book". Start at page one and don't skip anything. Do so in a Virtual server for practice and you'll lear quite a bit about Vicidial. In fact, you *should* learn everything you need for a complete call center solution (inbound, outbound, transfers, call menus, ingroups). The free version has all that. Start at page one. Don't skip anything. If you break it, delete the VM and start over. Do that a few times and nobody will know, but in a few practice runs you'll learn quite a bit.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20415
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 57 guests