Got it!

> How about just before you dial an extension you do a:
>       DBput(LAST/${EXTEN}=${CALLERID_NUMBER})
> 
> and then *69 does a:
>       DBget(dialNum=LAST/${CALLERID_NUMBER})
> 
> (from your extension) and you can dial it? 

Here's what I've done--

In my extension macro:

exten=s,1,DBput(LastCIDNum/${DNID}=${CALLERIDNUM})      ; grab
CALLERIDNUM & store it for the dialed number as LastCIDNum
exten=etc...

And in my [apps]:

; Return last call
exten => *69,1,DBget(temp=LastCIDNum/${CALLERIDNUM})    ; read db value
LastCIDNum for this CALLERIDNUM (i.e. the extension making the call)
exten => *69,2,GotoIf($[${temp:0:3} = 208]?3:4)         ; if it's area
code 208 (my local area), go to priority 3, otherwise priority 4
exten => *69,3,Macro(dialout,${temp:3})                 ; call my
dialout macro, stripping the 208
exten => *69,4,Macro(dialout,${temp})                   ; call my
dialout macro, using full string
exten => *69,103,Congestion                                     ; no
key? congestion
exten => *69,104,Congestion                                     ; no
key? congestion


Works like a friggin charm!

Jeremy Jones


_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to