[Asterisk-Users] Service codes for MGCP channels

Florian Overkamp florian at obsimref.com
Wed Nov 19 10:46:40 MST 2003


Citeren Daniel ANDRE <dandre at iris-tech.fr>:

> Do you have any information on how to include these functions to th 
> dialplan?

Depends on what you'd want precisely. Here's a (higly undocumented) example 
(I'm working on more). I used KPJ's examples on www.junghanns.net to start 
with (thanks!) and have a few more tricks up the sleeve that will take more 
time to evolve...

Florian

Brief instructions: Make sure the phone has a callerid that matches the 
extension number (makes sense, but might not always be true). Then make sure 
the phone can dial the entries in [apps].

If you use this setup a phone can dial *21*<number> for immediate redirect or 
*61*<number> for delayed redirect, and #21# or #61# to cancel the setting.


[macro-stdexten]
;
; Standard extension macro (with call forwarding):
; ${ARG1} - Extension(we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
;
exten=s,1,DBget(temp=CFIM/${ARG1})
exten=s,2,Dial(Local/${temp}@pbx/n) ; Unconditional forward
exten=s,3,Dial(${ARG2},20) ; 20sec timeout
exten=s,4,DBget(temp=CFBS/${ARG1})
exten=s,5,Dial(Local/${temp}@pbx/n) ; Forward on busy or unavailable

; No CFIM key
exten=s,102,Goto(s|3)

; No CFBS key - voicemail ?
exten=s,105,Busy



[apps]
; Unconditional Call Forward
exten => _*21*X.,1,DBput(CFIM/${CALLERIDNUM}=${EXTEN:4})
exten => _*21*X.,2,Hangup
exten => #21#,1,DBdel(CFIM/${CALLERIDNUM})
exten => #21#,2,Hangup

; Call Forward on Busy or Unavailable
exten => _*61*X.,1,DBput(CFBS/${CALLERIDNUM}=${EXTEN:4})
exten => _*61*X.,2,Hangup
exten => #61#,1,DBdel(CFBS/${CALLERIDNUM})
exten => #61#,2,Hangup

[extensions]
exten=7000,1,Macro(stdexten,7000,MGCP/aaln/1@<myphone>) ; IP10S





More information about the asterisk-users mailing list