[general]
static=yes
writeprotect=no

[globals]

TRUNK=IAX2
COULOMBPABX=IAX2/callmagic:callmagic 123@217.73.64.99

[190222-incoming]
; NOTE: this section is for Gafachi Origination (incoming) services.
; DID and/or Toll free origination numbers need to include the "1" prefix
; Replace the 12125551234 with your DID or Toll Free number, and repeat or
; change as needed.

exten => 18668379880,1,Ringing;
exten => 18668379880,2,AGI(call_log.agi,${EXTEN})
exten => 18668379880,3,AGI(call_inbound.agi,${EXTEN}-----18668379880-----Inbound 484-----x-----y-----z-----w)
exten => 18668379880,4,Answer
exten => 18668379880,5,Dial(SIP/1111&SIP/1112&SIP/1113&SIP/1114&SIP/1115&SIP/1116,30,tTr)	
exten => 18668379880,6,Hangup()


[default]
exten => 0000,1,Goto(190222-incoming,18668379880,1)

exten => _CS.,1,ChanSpy(SIP/${EXTEN}|q)
exten => _11XX,1,Dial(SIP/${EXTEN},300,tTo)


exten => _44XXXXXXXXXX,1,Monitor(wav,${TIMESTAMP}_${CALLERIDNUM}_${EXTEN});
exten => _44XXXXXXXXXX,2,Dial(SIP/${EXTEN}@190222,,tTo);
exten => _44XXXXXXXXXX,3,Hangup();

exten => _1XXXXXXXXXX,1,Monitor(wav,${TIMESTAMP}_${CALLERIDNUM}_${EXTEN});
exten => _1XXXXXXXXXX,2, Dial(SIP/${EXTEN}@190222,,tTo)
exten => _1XXXXXXXXXX,3, Hangup();

exten => _61XXXXXXXXX,1,Monitor(wav,${TIMESTAMP}_${CALLERIDNUM}_${EXTEN});
exten => _61XXXXXXXXX,2, Dial(SIP/${EXTEN}@190222,,tTo)
exten => _61XXXXXXXXX,3, Hangup();

exten => _91XXXXXXXXXX,1, Dial(SIP/${EXTEN:1}@190222,,tTo)
exten => _91XXXXXXXXXX,2, Hangup();

exten => _944XXXXXXXXXX,1, Dial(SIP/${EXTEN:1}@190222,,tTo)
exten => _944XXXXXXXXXX,2, Hangup();
;exten => _944XXXXXXXXXX,2, congestion();
;exten => _944XXXXXXXXXX,102,busy();

exten => _961XXXXXXXXXX,1, Dial(SIP/${EXTEN:1}@190222,,tTo)
exten => _961XXXXXXXXXX,2, Hangup();
;exten => _961XXXXXXXXX,2, congestion();
;exten => _961XXXXXXXXX,102,busy();



exten => 8600,1,Meetme,8600
exten => 8601,1,Meetme,8601





exten => 8600012,1,Meetme,8600012|q
exten => 8600013,1,Meetme,8600013|q
exten => 8600014,1,Meetme,8600014|q
exten => 8600015,1,Meetme,8600015|q
exten => 8600016,1,Meetme,8600016|q
exten => 8600017,1,Meetme,8600017|q
exten => 8600018,1,Meetme,8600018|q
exten => 8600019,1,Meetme,8600019|q
exten => 8600020,1,Meetme,8600020|q
exten => 8600021,1,Meetme,8600021|q
exten => 8600022,1,Meetme,8600022|q
exten => 8600023,1,Meetme,8600023|q
exten => 8600024,1,Meetme,8600024|q
exten => 8600025,1,Meetme,8600025|q
exten => 8600026,1,Meetme,8600026|q
exten => 8600027,1,Meetme,8600027|q
exten => 8600028,1,Meetme,8600028|q
exten => 8600029,1,Meetme,8600029|q

exten => 8600051,1,Meetme,8600051|q
exten => 8600052,1,Meetme,8600052|q
exten => 8600053,1,Meetme,8600053|q
exten => 8600054,1,Meetme,8600054|q
exten => 8600055,1,Meetme,8600055|q
exten => 8600056,1,Meetme,8600056|q
exten => 8600057,1,Meetme,8600057|q
exten => 8600058,1,Meetme,8600058|q
exten => 8600059,1,Meetme,8600059|q
exten => 8600060,1,Meetme,8600060|q
exten => 8600061,1,Meetme,8600061|q
exten => 8600062,1,Meetme,8600062|q
exten => 8600063,1,Meetme,8600063|q
exten => 8600064,1,Meetme,8600064|q
exten => 8600065,1,Meetme,8600065|q
exten => 8600066,1,Meetme,8600066|q
exten => 8600067,1,Meetme,8600067|q
exten => 8600068,1,Meetme,8600068|q
exten => 8600069,1,Meetme,8600069|q
exten => 8600070,1,Meetme,8600070|q
exten => 8600071,1,Meetme,8600071|q
exten => 8600072,1,Meetme,8600072|q
exten => 8600073,1,Meetme,8600073|q
exten => 8600074,1,Meetme,8600074|q
exten => 8600075,1,Meetme,8600075|q
exten => 8600076,1,Meetme,8600076|q
exten => 8600077,1,Meetme,8600077|q
exten => 8600078,1,Meetme,8600078|q
exten => 8600079,1,Meetme,8600079|q
exten => 8600080,1,Meetme,8600080|q
; quiet entry and leaving conferences for VICIDIAL
exten => 78600051,1,Meetme,8600051|q
exten => 78600052,1,Meetme,8600052|q
exten => 78600053,1,Meetme,8600053|q
exten => 78600054,1,Meetme,8600054|q
exten => 78600055,1,Meetme,8600055|q
exten => 78600056,1,Meetme,8600056|q
exten => 78600057,1,Meetme,8600057|q
exten => 78600058,1,Meetme,8600058|q
exten => 78600059,1,Meetme,8600059|q
exten => 78600060,1,Meetme,8600060|q
exten => 78600061,1,Meetme,8600061|q
exten => 78600062,1,Meetme,8600062|q
exten => 78600063,1,Meetme,8600063|q
exten => 78600064,1,Meetme,8600064|q
exten => 78600065,1,Meetme,8600065|q
exten => 78600066,1,Meetme,8600066|q
exten => 78600067,1,Meetme,8600067|q
exten => 78600068,1,Meetme,8600068|q
exten => 78600069,1,Meetme,8600069|q
exten => 78600070,1,Meetme,8600070|q
exten => 78600071,1,Meetme,8600071|q
exten => 78600072,1,Meetme,8600072|q
exten => 78600073,1,Meetme,8600073|q
exten => 78600074,1,Meetme,8600074|q
exten => 78600075,1,Meetme,8600075|q
exten => 78600076,1,Meetme,8600076|q
exten => 78600077,1,Meetme,8600077|q
exten => 78600078,1,Meetme,8600078|q
exten => 78600079,1,Meetme,8600079|q
exten => 78600080,1,Meetme,8600080|q



; park channel for client GUI parking, hangup after 30 minutes
;    create a GSM formatted audio file named "park.gsm" that is 30 minutes long
;    and put it in /var/lib/asterisk/sounds
exten => 8301,1,Answer
exten => 8301,2,AGI(park_CID.agi)
exten => 8301,5,Hangup();




;    create a GSM formatted audio file named "conf.gsm" that is 30 minutes long
;    and put it in /var/lib/asterisk/sounds
exten => 8302,1,Answer
exten => 8302,2,Playback(conf)
exten => 8302,3,Hangup

; this is used for recording conference calls, the client app sends the filename
;    value as a callerID recordings go to /var/spool/asterisk/monitor
exten => 8309,1,Answer
exten => 8309,2,Monitor(wav,${CALLERIDNAME})
exten => 8309,3,Wait,3600
exten => 8309,4,Hangup

; this is used to allow the GUI to send you directly into voicemail
;     don't forget to set GUI variable $voicemail_exten to this extension
exten => 8501,1,VoicemailMain(s${CALLERID})
exten => 8501,2,Hangup

; this is used to allow the GUI to send live calls directly into voicemail
;     don't forget to set GUI variable $voicemail_dump_exten to this extension
exten => _85026666666666.,1,Wait(2)
exten => _85026666666666.,2,Voicemail(${EXTEN:14})
exten => _85026666666666.,3,Hangup

; this is used for sending DTMF signals within conference calls, the client app
;    sends the digits to be played in the callerID field
;    sound files must be placed in /var/lib/asterisk/sounds
exten => 8500998,1,Answer
exten => 8500998,2,AGI(agi-dtmf.agi)
exten => 8500998,3,Hangup

; VICIDIAL_auto_dialer transfer scripts:
exten => 8365,1,Answer
exten => 8365,2,AGI(call_log.agi,${EXTEN})
exten => 8365,3,AGI(agi-VDADtransfer.agi,${EXTEN})
exten => 8365,4,AGI(agi-VDADtransfer.agi,${EXTEN})
exten => 8365,5,AGI(agi-VDADtransfer.agi,${EXTEN})
exten => 8365,6,Hangup

exten => 8366,1,AGI(call_log.agi,${EXTEN})
exten => 8366,2,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
exten => 8366,3,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
exten => 8366,4,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
exten => 8366,5,Hangup

;exten => h,1,Hangup


[macro-fax]

exten => s,1,Detect()
;exten => s,2,NoOp(${FAX})
;exten => s,3,NoOp(${ANS})
;exten => s,4,NoOp(${PER})
exten => s,2,GotoIf(${FAX}=1?h,1)
exten => s,3,GotoIf(${ANS}=1?h,1)
;exten => s,3,NoOp(${FAX})
;exten => s,4,NoOp(${ANS})
;exten => s,5,NoOp(${PER})


exten => h,1,AGI(hangup.agi,${CHANNEL})
exten => h,2,DeadAGI(VD_hangup.agi,PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
exten => fax,1,Dial(SIP/1130)



