[asterisk-users] accepting a call, macros, and key presses.
Dovid B
asteriskusers at dovid.net
Thu Mar 22 22:11:33 MST 2007
I created a macro that gave the called person the option to press 1 to
accept the call then 2 to send them to the next location on the list or 3 to
send the call to vocie mail. Sorry for the messy code. Please let me know if
you have any questions.
in extensions.conf:
exten => _5XX,1,Playback(tech/please-say-name)
exten => _5XX,2,Set(SCREEN_FILE=/var/lib/asterisk/sounds/tmp/${EPOCH})
exten => _5XX,3,Record,(${SCREEN_FILE}.gsm,2,4)
exten =>
_5XX,4,Macro(callprotected|${EXTEN:1}@tech,local/s@${EXTEN:1}_with_init&Local/s@${EXTEN:1}_all_silent,${SCREEN_FILE},${EXTEN},4${EXTEN:1})
[macro-screen]
exten => s,1,Wait(0.2)
exten => s,2,Playback(tech/cell-incoming-techmast)
exten => s,3,NoOp(${ARG1})
exten => s,4,playback(${ARG1})
exten => s,5,NoOp("")
;exten => s,5,System(rm -f ${ARG1}.gsm)
exten => s,6,Read(ACCEPT-CALL|tech/cell-techmast-accept|1)
exten => s,7,NoOp(${ACCEPT-CALL})
exten => s,8,GotoIf($["${ACCEPT-CALL}" = "1"] ?51:9)
exten => s,9,GotoIf($["${ACCEPT-CALL}" = "2"] ?61:10)
exten => s,10,GotoIf($["${ACCEPT-CALL}" = "3"] ?71:61)
exten => s,61,Set(DB(${ARG2}-cp/selected)=2)
exten => s,62,SetVar(MACRO_RESULT=CONTINUE)
exten => s,71,Set(DB(${ARG2}-cp/selected)=3)
exten => s,72,SetVar(MACRO_RESULT=CONTINUE)
[macro-callprotected]
exten => s,1,Wait(0.2)
exten => s,2,Playback(pls-wait-connect-call)
exten => s,3,Dial(${ARG2}|30|mtM(screen^${ARG3}^${ARG4}^${ARG7}))
exten => s,4,GotoIf($["${DB(${ARG4}-cp/selected)}" = "2"] ?11:7)
exten => s,5,GotoIf($["${DB(${ARG4}-cp/selected)}" = "3"] ?23:8)
exten => s,6,Goto(s-NOANSWER,11)
exten => s,11,Read(TODO|tech/there-was-no-answer-at-that-location|1)
exten => s,12,GotoIf($["${TODO}" = "1"] ?22:13)
exten => s,13,GotoIF($["${TODO}" = "2"] ?23:14)
exten => s,14,Goto(s-NOANSWER,11)
exten => s,22,Dial(SIP/${ARG5}@teliax|60|mtM(screencell^${ARG3}))
exten => s,23,Voicemail(u${ARG1})
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
----- Original Message -----
From: "Jason Wolfe" <jason at clickforacall.com>
To: <asterisk-users at lists.digium.com>
Sent: Thursday, March 22, 2007 7:02 PM
Subject: [asterisk-users] accepting a call, macros, and key presses.
> Hello,
>
> I am using macros to give the ability to a call-receiver to 'accept' a
> call. However, any keypress connects the caller.
>
> Anyone have any suggestions about how to re-engineer this so that the
> receiver can deny the call, or press other keys to do other actions,
> without connecting to the user?
>
> Thanks,
>
> Jason Wolfe
>
>
> _______________________________________________
> --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
>
More information about the asterisk-users
mailing list