A more detail note for callback, it gives some hints for future usage.- [custom-CallBack]
- ;;prepare for callback and DISA
- exten => s,1,NoOp(Hangup then callback to cellphone)
- exten => s,2,Hangup()
- exten => h,1,NoOp(copy callback.call file to /var/spool/asterisk/outgoing)
- exten => h,2,System(/etc/asterisk/callback_exe)
- exten => h,3,Hangup()
複製代碼 This code just call the callback initiater's number. The spool function is extreme useful for callback. Note the h, it means deadagi, should be executed after hang up.
The callback.call file- Channel: SIP/6081112222@MyVSP
- Context: custom-DISA-out
- Extension: s
- Priority: 1
- CallerID: 6085558888
複製代碼 Basically, the Channel statement instructs asterisk type fo trunk, the callback number, and using which trunk. It is a shorten Dial command.
The Following three lines tell asterisk how to treat the connected callback number, i.e., custom-DISA-out, s, 1 should be run after connection. The last line is to set the CallerID to 6085558888.
The custom-DISA-out:- [custom-DISA-out]
- exten => s,1,Wait(1)
- exten => s,n,Background(agent-pass)
- exten => s,n,Authenticate(87235) ;this number is the password
- exten => s,n,Background(pls-wait-connect-call)
- exten => s,n,DISA(no-password, out-pstn)
複製代碼 It requires password to entry the DISA for using out-pstn dialplan.
The whole flow is following:
1. Caller calls access number and gives his/her tel. number.
2. Asterisk hangs up the call(if possible), calls the Caller' number.
3. The caller picks up the callback, entries the password.
4. If the password is correct, give the right dialplan to the caller(e?). |