[Asterisk-Users] Speed Dial / New Context

Asterisk Asterisk at dotr.com
Wed Nov 3 11:24:31 MST 2004


Doh. Slaps head.

Many many thanks for making me look stupid :)

If anyone is interested, here is the logic that I used for our speed dial:

; custom/speed-2-digit "Enter your 2 digit speed dial number"
; custom/speed-target "Enter The destination phone number"
; custom/speed-saved "Your speed dial number has been saved"

exten => 100,1,read(speed-2digit,custom/speed-2-digit,2) ;enter 2 digit
speed dial number 
exten => 100,n,read(speed-target,custom/speed-target) ; enter target phone
number. No validation
exten =>
100,n,dbput(SpeedDial-${CALLERIDNUM}/${speed-2digit}=${speed-target}) ; save
data 
exten => 100,n,playback(custom/speed-saved)
exten => 100,n,Hangup

; dial speed dial number
exten => _**XX,1,dbget(SpeedDialNum=SpeedDial-${CALLERIDNUM}/${EXTEN:2})
exten => _**XX,n,goto(from-sip,${SpeedDialNum},1)

Julian

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Kevin P.
Fleming
Sent: 03 November 2004 17:44
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Speed Dial / New Context

Asterisk wrote:

> However, I would like before * makes the call is to "pretend" that the 
> speeddial number has been entered directly from the phone. This is 
> because I want to push the speed dial number through the same sort of 
> checking that the sip phone's context does, without duplicating the logic.

Sure, if you have retrieved the target phone number into SPEEDNUMBER, and
the context that SIP users are dialing into is sip-context, then

Goto(sip-context,${SPEEDNUMBER},1)

will result in the identical behavior as if the user had entered that number
from their phone.
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list