dial plan

Support forum for the ViciBox ISO Server Install and ISO LiveCD Demo

Moderators: enjay, williamconley, Staydog, mflorell, MJCoate, mcargile, Kumba

dial plan

Postby ehermouet » Wed Apr 10, 2013 8:53 am

Hi all

i have installed vicidial 4.0.3 from last source.

i have add my voip provider
it's internal server

[3cx500]
disallow=all
allow=ulaw
type=friend
username=500
secret=d2b93r9
host=192.168.1.42
dtmfmode=rfc2833
context=trunkinbound
fromdomain=192.168.1.42
insecure=invite

it's connected, but when i want to make outbound call
>
chan_sip.c: Call from '900' to extension '806' rejected because extension not found.

here is my dialplan

exten => _X,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _X,2,Dial(${3CX}/${EXTEN:2},,To)
exten => _X,3,Hangup


I don't know why :((

tks advance for your help
ehermouet
 
Posts: 29
Joined: Wed Apr 10, 2013 8:49 am

Re: dial plan

Postby williamconley » Wed Apr 10, 2013 11:39 am

1) Welcome to the party! 8-)

2) i realize you may have invested a decent amount of money in your 3CX system, but do not attempt to route outbound calls through 3CX. Internal calls, no problem. But a Dialer like Vicidial will overwhelm any other PBX system out there (at least any system that has "features" like FreePBX).

3) Your dial plan extension pattern is "_X" ... this means the caller can dial any single digit number ... and you dialed "806" which is not a single digit number. Try:

_XXX (3 digit numbers)
_8XX (3 digit numbers starting with 8 )
_XX. (3 digit OR MORE numbers ... not recommended, it could catch calls you do not want to)

4) Your "EXTEN:2" will strip off the first two digits of the dialed number. So your "806" would become "6", which I'm guessing was not your goal. LOL (the ":2" means "remove first two digits").

5) You skipped the global variable, and your SIP context is 3cx500 not 3CX. Global String:

PBX=SIP/3cx500

6) summary, try this:

exten => _XXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _XXX,2,Dial(${PBX}/${EXTEN},,To)
exten => _XXX,3,Hangup

7) Happy Hunting! 8-)

Here are your "Newbie Suggestions" which do not include the phrase "from last source" (always specify, this post will be here for 10 years and you can not honestly expect someone next year to know what version was "last" on April 10, 2013, can you? :)

when you post, please post your entire configuration including (but not limited to) your installation method and vicidial version with build.

this IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)

You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "from scratch" you must post your operating system and should also post the .iso version from which you installed your original operating system. If your installation is "Hosted" list the site name of the host.

If this is a "Cloud" or "Virtual" server, please note the technology involved along with the version of that techology (ie: VMware Server Version 2.0.2). If it is not, merely stating the Motherboard model # and CPU would be helpful.

Similar to This:

Vicibox X.X from .iso | Vicidial X.X.X-XXX Build XXXXXX-XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel DG35EC | Core2Quad Q6600
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: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: dial plan

Postby ehermouet » Thu Apr 11, 2013 2:37 am

Hi

tks so much for this very good explain. i understand much more vicidial diaplan.

so i modify but no here my log error


[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] -- Executing [131@default:1] AGI("SIP/900-00000006", "agi://127.0.0.1:4577/call_log") in new stack
[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] -- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] -- Executing [131@default:2] Dial("SIP/900-00000006", "SIP/3cx500/131||To") in new stack
[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] -- Called 3cx500/131
[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] -- SIP/3cx500-00000007 is circuit-busy
[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] == Everyone is busy/congested at this time (1:0/1/0)
[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] -- Executing [131@default:3] Hangup("SIP/900-00000006", "") in new stack
[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] == Spawn extension (default, 131, 3) exited non-zero on 'SIP/900-00000006'
[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] -- Executing [h@default:1] DeadAGI("SIP/900-00000006", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----1-----CONGESTION----------") in new stack
[Apr 11 03:31:50] VERBOSE[17898] logger.c: [Apr 11 03:31:50] -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... ---------- completed, returning 0

Vicibox 4.0.3 from .iso preload | Asterisk v.1.4.44-vici | Single Server |virtual on esx


; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST
TRUNKloop = IAX2/ASTloop:15PfPNqtL5jiIVW@127.0.0.1:40569
TRUNKblind = IAX2/ASTblind:15PfPNqtL5jiIVW@127.0.0.1:41569
PBX = SIP/3cx500


; agent phones restricted to only internal extensions
[default---agent]
exten => s,1,Answer
exten => s,n,AGI(agi-VDAD_inbound_calltime_check.agi,-----NO-----default---agent-------------------------NO)
exten => s,n,Set(INVCOUNT=0)
exten => s,n,Background(sip-silence)
exten => s,n,WaitExten(20)


; hangup
exten => t,1,Playback(vm-goodbye)
exten => t,n,Hangup()
exten => i,1,Goto(s,4)
exten => i,n,Hangup()
; hangup
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; custom dialplan entries
include => vicidial-auto-internal
include => vicidial-auto-phones




; logging of all outbound calls from agent phones
[defaultlog]
exten => s,1,Answer
exten => s,n,AGI(agi-VDAD_inbound_calltime_check.agi,-----NO-----defaultlog-------------------------NO)
exten => s,n,Set(INVCOUNT=0)
exten => s,n,Background(sip-silence)
exten => s,n,WaitExten(20)


; hangup
exten => t,1,Playback(vm-goodbye)
exten => t,n,Hangup()
exten => i,1,Goto(s,4)
exten => i,n,Hangup()
; hangup
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; custom dialplan entries
exten => _X.,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y)
exten => _X.,n,Goto(default,${EXTEN},1)




[vicidial-auto-external]
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; Local Server: 192.168.1.41
exten => _192*168*001*041*.,1,Goto(default,${EXTEN:16},1)
exten => _192*168*001*041*.,2,Hangup()
exten => _**192*168*001*041*.,1,Goto(default,${EXTEN:18},1)
exten => _**192*168*001*041*.,2,Hangup()
; VICIDIAL Carrier: 3CX500 - 3cx500
; liaison avec 3cx
exten => _XXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _XXX,2,Dial(${PBX}/${EXTEN},,To)
exten => _XXX,3,Hangup

[vicidial-auto-internal]
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
; Voicemail Extensions:
exten => _85026666666666.,1,Wait(1)
exten => _85026666666666.,n,Voicemail(${EXTEN:14},u)
exten => _85026666666666.,n,Hangup()
exten => 8500,1,VoicemailMain
exten => 8500,2,Goto(s,6)
exten => 8500,3,Hangup()
exten => 8501,1,VoicemailMain(s${CALLERID(num)})
exten => 8501,2,Hangup()

; Prompt Extensions:
exten => 8167,1,Answer
exten => 8167,2,AGI(agi-record_prompts.agi,wav-----720000)
exten => 8167,3,Hangup()
exten => 8168,1,Answer
exten => 8168,2,AGI(agi-record_prompts.agi,gsm-----720000)
exten => 8168,3,Hangup()

; this is used for recording conference calls, the client app sends the filename
; value as a callerID recordings go to /var/spool/asterisk/monitor (WAV)
; Recording is limited to 1 hour, to make longer, just change the server
; setting ViciDial Recording Limit
; this is the WAV verison, default
exten => 8309,1,Answer
exten => 8309,2,Monitor(wav,${CALLERID(name)})
exten => 8309,3,Wait(3600)
exten => 8309,4,Hangup()
; this is the GSM verison
exten => 8310,1,Answer
exten => 8310,2,Monitor(gsm,${CALLERID(name)})
exten => 8310,3,Wait(3600)
exten => 8310,4,Hangup()

; agent alert extension
exten => 83047777777777,1,Answer
exten => 83047777777777,2,Playback(${CALLERID(name)})
exten => 83047777777777,3,Hangup()
; This is a loopback dial-around to allow for immediate answer of outbound calls
exten => _8305888888888888.,1,Answer
exten => _8305888888888888.,n,Wait(${EXTEN:16:1})
exten => _8305888888888888.,n,Dial(${TRUNKloop}/${EXTEN:17},,To)
exten => _8305888888888888.,n,Hangup()
; No-call silence extension
exten => _8305888888888888X999,1,Answer
exten => _8305888888888888X999,n,Wait(3600)
exten => _8305888888888888X999,n,Hangup()

[vicidial-auto-phones]
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; Phones direct dial extensions:
exten => 900,1,Dial(SIP/900|60|)
exten => 900,2,Goto(default,85026666666666999,1)
exten => 102,1,Dial(SIP/gs102|60|)
exten => 102,2,Goto(default,85026666666666102,1)

[vicidial-auto]
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

include => vicidial-auto-internal
include => vicidial-auto-phones
include => vicidial-auto-external


; END OF FILE


; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST
register => 500:d2b93r9@192.168.1.42:5060

; VICIDIAL Carrier: 3CX500 - 3cx500
; liaison avec 3cx
[3cx500]
disallow=all
allow=ulaw
type=peer
context=default
username=500
secret=d2b93r9
host=192.168.1.42
dtmfmode=rfc2833
fromdomain=192.168.1.42
insecure=invite



[900]
username=900
secret=6RSCj7VAIYvKoO6
accountcode=900
callerid="" <900>
mailbox=999
type=friend
host=dynamic
canreinvite=no
context=default

[gs102]
username=gs102
secret=6RSCj7VAIYvKoO6
accountcode=gs102
callerid="Test Admin Phone" <>
mailbox=102
context=default
type=friend
host=dynamic


; END OF FILE


900 is connected to xlite

tks all
ehermouet
 
Posts: 29
Joined: Wed Apr 10, 2013 8:49 am

Re: dial plan

Postby ehermouet » Thu Apr 11, 2013 7:20 am

My extension on other server register like that

new contact is registered. Contact(s): [sip:s@192.168.1.41:5060 / 500]

but must be
new contact is registered. Contact(s): [sip:500@192.168.1.41:5060]

do you know how i can change this ?
ehermouet
 
Posts: 29
Joined: Wed Apr 10, 2013 8:49 am

Re: dial plan

Postby ehermouet » Thu Apr 11, 2013 9:03 am

I add fromuser and it works.

so now i have this

== Starting Local/8600051@default-6b0d,1 at default,933xxxxxxxxxx,1 failed so falling back to exten 's'
[Apr 11 10:01:21] VERBOSE[9447] logger.c: [Apr 11 10:01:21] == Starting Local/8600051@default-6b0d,1 at default,s,1 still failed so falling back to context 'default'
[Apr 11 10:01:21] VERBOSE[9447] logger.c: [Apr 11 10:01:21] -- Sent into invalid extension 's' in context 'default' on Local/8600051@default-6b0d,1
[Apr 11 10:01:21] VERBOSE[9447] logger.c: [Apr 11 10:01:21] -- Executing [i@default:1] Playback("Local/8600051@default-6b0d,1", "invalid") in new stack
[Apr 11 10:01:21] VERBOSE[9447] logger.c: [Apr 11 10:01:21] -- <Local/8600051@default-6b0d,1> Playing 'invalid' (language 'en')
ehermouet
 
Posts: 29
Joined: Wed Apr 10, 2013 8:49 am

Re: dial plan

Postby williamconley » Thu Apr 11, 2013 9:19 am

ehermouet wrote: default,933xxxxxxxxxx,1 failed

you are no longer dialing a 3 digit number, so the system has no dialplan to know where to route the number you dialed.

what is it that you are trying to do, by the way?
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: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: dial plan

Postby ehermouet » Thu Apr 11, 2013 9:43 am

Hi

tks for your reply

i add this to my carrier

exten => _XXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _XXX,2,Dial(${PBX}/${EXTEN},,To)
exten => _XXX,3,Hangup

exten => _XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _XXXXXXXXXX,2,Dial(${PBX}/${EXTEN},,To)
exten => _XXXXXXXXXX,3,Hangup

exten => _933XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _933XXXXXXXXXX,2,Dial(${PBX}/${EXTEN:1},,To)
exten => _933XXXXXXXXXX,3,Hangup

but the same things.
ehermouet
 
Posts: 29
Joined: Wed Apr 10, 2013 8:49 am

Re: dial plan

Postby williamconley » Thu Apr 11, 2013 10:00 am

show the new error. and be sure you have the right number of "X" or add a "." to the end of the "X"s like this:

_933XXXXX.

This means any number with at least 8 digits that starts with 933 (so it can be 8 digits, 12 digits, any number ... so you don't have to count the Xs perfectly).
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: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: dial plan

Postby ehermouet » Thu Apr 11, 2013 10:13 am

williamconley wrote:show the new error. and be sure you have the right number of "X" or add a "." to the end of the "X"s like this:

_933XXXXX.

This means any number with at least 8 digits that starts with 933 (so it can be 8 digits, 12 digits, any number ... so you don't have to count the Xs perfectly).


maybe it's because it's on default context ? not trunkinbound ?

Sent into invalid extension 's' in context 'default' on Local/8600051@default-c4d9,1
[Apr 11 10:30:08] VERBOSE[12606] logger.c: [Apr 11 10:30:08] -- Executing [i@default:1] Playback("Local/8600051@default-c4d9,1", "invalid") in new stack
[Apr 11 10:30:08] VERBOSE[12606] logger.c: [Apr 11 10:30:08] -- <Local/8600051@default-c4d9,1> Playing 'invalid' (language 'en')
ehermouet
 
Posts: 29
Joined: Wed Apr 10, 2013 8:49 am

Re: dial plan

Postby williamconley » Thu Apr 11, 2013 10:22 am

is this call inbound or outbound?
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: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: dial plan

Postby ehermouet » Thu Apr 11, 2013 10:29 am

williamconley wrote:is this call inbound or outbound?


outbound call
ehermouet
 
Posts: 29
Joined: Wed Apr 10, 2013 8:49 am

Re: dial plan

Postby williamconley » Thu Apr 11, 2013 10:32 am

then it belongs in default, but you have no matching dialplan extension pattern in default so it fails. any number you dial must match a dialplan pattern. if it does not match, it will "fall back" to "s" and when there is no "s" it will fail. put in a pattern that matches the number you are dialing so you can route the call to the appropriate sip account. otherwise asterisk has no idea how to route the call and it will fail. :)
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: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to ViciBox Server Install and Demo

Who is online

Users browsing this forum: No registered users and 69 guests