Extension.conf free call numbers

Hi I am trying to get outbound calls working for 1800 number and 1300 numbers as well as 03 and 02 etc

I currently am using something along the lines of the following

exten => _939.,1,Answer()
exten => _939.,n,Dial(SIP/IVOX("61{EXTEN:5}" --- MORE CODE HERE (NOT SURE OF THE TOP OF MY HEAD)))
 --- But in the custom code I have {EXTEN:5}
exten => _939.,n,Hangup()

What I have found out is that using {EXTEN:5} seems to drop the first number number coming from vicidial

for example dial 1800999999 and it dials 800999999

while this is good if i want to ring 03,02,08,07 when i ring 1800 1300 or 13 numbers I need the 1 to stay in the dial and get passed to iVox.

I am wondering if any person knows how to pass the number first number if 1300 or 1800 or 13 but not when 02,03,04,08,07

Thanks.

${EXTEN:5} is stripping the first five digits.

From the fragment that you have misquoted, it looks like, for 01 numbers, people, or the upstream dialplan, are actually dialing 93901xxxxxx. If you want 18xxxxx to be sent when 93918xxxxx is dialed, you need to use a more specific match for for 93918, and then only strip the 939.

You may find it helpful to note that you can use “same” or “s”, in the priority to repeat the last used priority, and that you don’t have to match with he same specificity for each priority.

(Note hangup hasn’t been needed since Asterisk 1.4.)

Thank you for that,
I tried on friday night what you suggested and I could see that it went to that rule but it kept dialing

61800 instead of 611800

Am I missing something with the {EXTEN:5} or something?

Also from what I can tell in Vicidial I have put dialcode 939

I take it it will run the following if I have the following in my extension.conf

exten => _9390.,1,Answer()
exten => _9390.,n,Dial(SIP/IVOX("61{EXTEN:5}" --- MORE CODE HERE (NOT SURE OF THE TOP OF MY HEAD)))

exten => _93918.,1,Answer()
exten => _93918.,n,Dial(SIP/IVOX("611{EXTEN:5}" --- MORE CODE HERE (NOT SURE OF THE TOP OF MY HEAD)))

exten => _93913.,1,Answer()
exten => _93913.,n,Dial(SIP/IVOX("611{EXTEN:5}" --- MORE CODE HERE (NOT SURE OF THE TOP OF MY HEAD)))

There are bogus "s and missing $s in your dialplan. I don’t see how it would work as quoted.

How ${EXTEN:5} works is described in asteriskdocs.org/en/3rd_Edit … SECT-3.6.3

nope your right, I should say I am a total NOOB to asterisk and I copied and paste code from an all ready old version of asterisk and placed it in the dialer that i was working on.

So lets fix this
in vicidial dial plain i have 939

in extension.conf i have the following

exten => _9390.,1,Answer()
exten => _9390.,n,Dial(SIP/IVOX("61{EXTEN:1}" --- MORE CODE HERE (NOT SURE OF THE TOP OF MY HEAD)))

exten => _93918.,1,Answer()
exten => _93918.,n,Dial(SIP/IVOX("61{EXTEN}" --- MORE CODE HERE (NOT SURE OF THE TOP OF MY HEAD)))

exten => _93913.,1,Answer()
exten => _93913.,n,Dial(SIP/IVOX("61{EXTEN}" --- MORE CODE HERE (NOT SURE OF THE TOP OF MY HEAD)))

from reading asteriskdocs.org/en/3rd_Edit … SECT-3.6.3

the following {EXTEN:1} drops the frist digit. for example 0400001122 becomes 61400001122
while the next rule for 93918 makes the number dial 611800777000 unlike the first one where it drops the first digit the 1800 does not drop the 1 and prints the full digit it should dial.

Is this the right way to do what I need?

$ and "

Sorry David, could you please tell me what I am missing by your [quote]$ and "[/quote] I am not sure what that is.

You should read this chapter specially the topic of USING VARIABLES

I got into the office and here is my dial plan

Current

;#### IVOX #### exten => _939.,1,AGI(agi://127.0.0.1:4577/call_log) exten => _939.,2,Dial(SIP/61${EXTEN:5}@iVox,30,tTor) exten => _939.,3,Hangup

Should I change it to this

[code];#### IVOX ####
exten => _9390.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9390.,n,Dial(SIP/61${EXTEN:5}@iVox,30,tTor)

exten => _93918.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _93918.,n,Dial(SIP/61${EXTEN}@iVox,30,tTor)

exten => _93913.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _93913.,n,Dial(SIP/61${EXTEN}@iVox,30,tTor)

[/code]

They are now syntacticlly correct, but I don’t think they are actually being executed, and they don’t do what you said you wanted to do.