[general] static=yes writeprotect=no clearglobalvars=no [globals] ; Global variables goes here [incoming] ; Nothing should land here yet, but every context should end in ; a Hangup(), so we do that. exten => s,1,Hangup() [myphones] ; When we dial something from the phones we just added in ; sip.conf, Asterisk will look for a matching extension here, ; in this context. ; First Phone, extension 1000. If 1000 is called, here is ; where we land, and the device registered with the ; name 1000, is dialed, after that Asterisk hangs up. exten => _XXXXX,1,lcr_config(a) exten => _XXXXX,2,lcr_config(a) exten => _XXXXX,3,Set(VOLUME(TX)=4) exten => _XXXXX,4,Set(VOLUME(RX)=4) exten => _XXXXX,5,Dial(LCR/ast/${EXTEN},10) exten => _XXXXX,n,Hangup() ; Elevator music exten => 201,1,lcr_config(a) exten => 201,2,lcr_config(D) exten => 201,3,Set(VOLUME(TX)=2) exten => 201,4,Set(VOLUME(RX)=2) exten => 201,5,Answer() exten => 201,n,Playback(/usr/share/asterisk/moh/reno_project-system) exten => 201,n,Hangup() ; Echo-test, it is good to test if we have sound in both directions. ; The call is answered exten => 202,1,lcr_config(a) exten => 202,2,lcr_config(D) exten => 202,3,Set(VOLUME(TX)=2) exten => 202,4,Set(VOLUME(RX)=2) exten => 202,5,Answer() exten => 202,6,Echo() exten => 202,n,Hangup() ; Constant test tone exten => 203,1,Set(VOLUME(TX)=1) exten => 203,2,Set(VOLUME(RX)=1) exten => 203,3,Answer() exten => 203,4,Milliwatt() exten => 203,n,Hangup() [from-lcr] include => myphones ;exten => _X.,1,Dial(LCR/ast/${EXTEN:0},60)