I am using the sample (slightly modified) macro for dialing phones. My
extensions are in the 2000 range.  Each extension has it's own
external DID.  Is there any way to have the macro look up the DID to
be used for the extension and set the DID as the callerid?  Maybe from
a flat file somewhere?  Or is there a better way to do this???

I know I can use callerid in sip.conf, but I only want the DID used
when the call goes external.

[macro-stdexten]
;
; Standard extension macro:
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
;   ${ARG2} - Device(s) to ring
;
exten => s,1,Dial(${ARG2},20)  ; Ring the interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1)  ; Jump based on status
(NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
exten => s-NOANSWER,1,Voicemail([EMAIL PROTECTED])  ; If
unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1)  ; If they press #, return to start
exten => s-BUSY,1,Voicemail([EMAIL PROTECTED])  ; If busy, send to
voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1)  ; If they press #, return to start
exten => _s-.,1,Goto(s-NOANSWER,1)  ; Treat anything else as no answer
exten => a,1,VoicemailMain(${ARG1})  ; If they press *, send the user
into VoicemailMain

[phones]
exten => _2XXX,1,Macro(stdexten,${EXTEN},SIP/${EXTEN})

DID example:
2001 = 5552871701
2002 = 5552871702
2003 = 5552871703

Thanks!

--
***
Forrest Beck
IAXTEL: 17002871718
[EMAIL PROTECTED]
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to