Help translating 1.2 script to 1.4

phonez

New Member
Joined
Apr 3, 2008
Messages
4
Reaction score
0
Hello all. I had a nifty script built with NV1.2.3 that allowed me to dial an extension and set caller ID to send to an outgoing trunk. I've since wanted to change over to PBXIAF and have run into a wall with all the syntax changes from * 1.2 to *1.4.

Basically, here is how it went. Internally, I dial 500 from my phone. Flite asks me what number I want to pass and then asks me the number to dial. The script then sends this to the proper trunk and bingo. I have 2 cellphones I use and this helps me keep the right business associates calling the right cellphone. Any help would be appreciated.

[from-internal-custom]

include => from-internal-trixbox
include => custom-callerid


[custom-callerid]
exten => 500,1,Answer
exten => 500,2,DigitTimeout,10
exten => 500,3,ResponseTimeout,40
exten => 500,4,Authenticate(xxxx)
exten => 500,5,Flite("Enter the cell phone number followed by the poud sign.")
exten => 500,6,Background(silence10)
exten =>_XXXXXXXXXX#,1,Setvar(daCID=${EXTEN:-11:10})
exten => _XXXXXXXXXX#,2,Goto(voipjet-custom,s,1)
exten => _XXXXXXXXX#,1,Setvar(daCID=${EXTEN:-10:9})
exten => _XXXXXXXXX#,2,Goto(voipjet-custom,s,1)
exten => _XXXXXXXX#,1,Setvar(daCID=${EXTEN:-9:8})
exten => _XXXXXXXX#,2,Goto(voipjet-custom,s,1)
exten => _XXXXXXX#,1,Setvar(daCID=${EXTEN:-8:7})
exten => _XXXXXXX#,2,Goto(voipjet-custom,s,1)
exten => _XXXXXX#,1,Setvar(daCID=${EXTEN:-7:6})
exten => _XXXXXX#,2,Goto(voipjet-custom,s,1)
exten => _XXXXX#,1,Setvar(daCID=${EXTEN:-6:5})
exten => _XXXXX#,2,Goto(voipjet-custom,s,1)
exten => _XXXX#,1,Setvar(daCID=${EXTEN:-5:4})
exten => _XXXX#,2,Goto(voipjet-custom,s,1)
exten => _XXX#,1,Setvar(daCID=${EXTEN:-4:3})
exten => _XXX#,2,Goto(voipjet-custom,s,1)
exten => _XX#,1,Setvar(daCID=${EXTEN:-3:2})
exten => _XX#,2,Goto(voipjet-custom,s,1)
exten => _X#,1,Setvar(daCID=${EXTEN:-2:1})
exten => _X#,2,Goto(voipjet-custom,s,1)


[voipjet-custom]
exten => s,1,Answer
exten => s,2,DigitTimeout,10
exten => s,3,ResponseTimeout,40
exten => s,4,Flite("Enter the number to dial.")
exten => s,5,Background(silence10)
exten => _1NXXNXXXXXX,1,SetCallerID(${daCID})
exten => _1NXXNXXXXXX,2,SetCIDName(name)
exten => _1XXXXXXXXXX,3,DIAL(IAX2/username@voipjet/${EXTEN},90,t)
 
I don't know the new syntax well enough to read it all, but these are two changes necessary early in your dialplan. If I have a syntax problem, I usually watch the dial plan on the cli to see where it chokes. Then I look up the new syntax.

Set(TIMEOUT(digit)=10)
Set(TIMEOUT(response)=40)
 
You also need a line like one of these after each of the background lines:

exten => 500,7,WaitExten()
or
exten => s,6,WaitExten()
 
Phonez;

Why don't you create two different extensions and set those extensions with the proper cid info? This way you don't need to type the cid every time you make a call.

Regards.
 
Thanks for the suggestions. I have had no luck but I will keep trying. I may just stick with NV123.
 
Watch the cli output while your script runs. You can see where it chokes.
 

Members online

Forum statistics

Threads
26,686
Messages
174,406
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top