[general] static=yes writeprotect=no [globals] CONSOLE => Console/dsp IAXINFO => guest TRUNKMSD => 1 [macro-inbound-tid] exten => s,1,NoOp() exten => s,2,wait(1) exten => s,3,AGI(/var/www/asterisk/bin/set_dnid.php|${UNIQUEID}|${DNID}) exten => s,4,Set(CALLERID(name)=${ARG1}) exten => s,5,GotoIfTime(*|*|4|sep?CMG_Inbound,InboundGeneralVM,1) ; -- Holiday -- exten => s,6,GotoIfTime(6:00-22:00|sun-sat|*|*?InboundGeneral-AutoAtt,AutoAtt,1) ; -- Open Hours Weekday -- exten => s,7,GotoIfTime(22:01-5:59|sun-sat|*|*?CMG_Inbound,InboundGeneralVM,1) ; -- Closed Hours Weekday -- exten => s,8,wait(1) exten => s,9,Goto(CMG_Inbound,2222222,1) exten => s,10,Hangup [macro-inbound-DirectToQueue] exten => s,1,NoOp() exten => s,2,wait(1) exten => s,3,AGI(/var/www/asterisk/bin/set_dnid.php|${UNIQUEID}|${DNID}) exten => s,4,Set(CALLERID(name)=${ARG1}) exten => s,5,GotoIfTime(*|*|4|sep?CMG_Inbound,InboundGeneralVM,1) ; -- Holiday -- exten => s,6,GotoIfTime(6:00-22:00|sun-sat|*|*?CMG_Inbound,2222222,1) ; -- Open Hours Weekday -- exten => s,7,GotoIfTime(22:01-5:59|sun-sat|*|*?CMG_Inbound,InboundGeneralVM,1) ; -- Closed Hours Weekday -- exten => s,8,wait(1) exten => s,9,Goto(CMG_Inbound,2222222,1) exten => s,10,Hangup [macro-spanish-inbound-tid] exten => s,1,NoOp() exten => s,n,wait(1) exten => s,n,AGI(/var/www/asterisk/bin/set_dnid.php|${UNIQUEID}|${DNID}) exten => s,n,SetVar(TID=${ARG1}) exten => s,n,Set(CALLERID(name)=${ARG1}) exten => s,n,GotoIfTime(*|*|4|sep?CMG_Inbound,SpanishGeneralVM,1) ; -- Holiday -- exten => s,n,GotoIfTime(6:00-22:00|sun-sat|*|*?SpanishGeneral-AutoAtt,AutoAtt,1) ; -- Open Hours Weekday $ exten => s,n,GotoIfTime(22:01-5:59|sun-sat|*|*?CMG_Inbound,SpanishGeneralVM,1) ; -- Closed Hours Weekday $ exten => s,n,wait(1) exten => s,n,Goto(CMG_Inbound,SpanishGeneral,1) exten => s,n,Hangup [InboundGeneral-AutoAtt] exten => AutoAtt,1,Answer() exten => AutoAtt,n,AGI(/var/www/asterisk/bin/set_dnid.php|${UNIQUEID}|${DNID}) exten => AutoAtt,n(loop),Set(ERROR_COUNT=${IF($["${ERROR_COUNT}" = ""]?0:${ERROR_COUNT})}) exten => AutoAtt,n,Verbose(5,Error count is ${ERROR_COUNT}) exten => AutoAtt,n,GotoIf($[${ERROR_COUNT} > 1]?CMG_Inbound,2222222,1) exten => AutoAtt,n,Background(en_welcome) exten => AutoAtt,n,Set(TIMEOUT(digit)=2) exten => AutoAtt,n,Set(TIMEOUT(response)=10) exten => AutoAtt,n,WaitExten() exten => i,1,Verbose(5, Invalid extension) exten => i,n,Playback(invalid) exten => i,n,Set(ERROR_COUNT=$[${ERROR_COUNT} + 1]) exten => i,n,Goto(AutoAtt,loop) exten => t,1,Verbose(5, Response timeout) exten => t,n,Set(ERROR_COUNT=$[${ERROR_COUNT} + 1]) exten => t,n,Goto(AutoAtt,loop) exten => hangup,1,Verbose(5, Hanging up on caller) exten => hangup,n,Playback(vm-goodbye) exten => hangup,n,Hangup() exten => 1,1,Goto(SpanishGeneral-AutoAtt,AutoAtt,1) exten => 2,1,Playback(en_client) exten => 2,n,Goto(AutoAtt,loop) exten => 3,1,Queue(InboundGeneral|t|||60) exten => 3,2,Playback(en_exitqueue) exten => 3,3,Voicemail(*1@CMG_Inbound) exten => 3,4,Playback(vm-goodbye) exten => 3,5,Hangup() exten => 4,1,SetAccount(Affil_Xfer_To_Progrexion) exten => 4,n,Set(CALLERID(name)=Affil) exten => 4,n,Dial(IAX2/REC_SERVER_Progrexion:spherous456@10.0.1.189/1721@Progrexion_Inbound) ;Virtual Extensions exten => _4XXX,1,Set(VEXTEN=${EXTEN}) exten => _4XXX,2,Goto(CMG_Inbound,${EXTEN},1) exten => _VM4XXX,1,Voicemail(${EXTEN:2}@CMG_Inbound) ;Send Virtual Extensions to VM exten => VM4XX,1,Voicemail(${EXTEN:2}@CMG_Inbound) [SpanishGeneral-AutoAtt] exten => AutoAtt,1,Answer() exten => AutoAtt,n,AGI(/var/www/asterisk/bin/set_dnid.php|${UNIQUEID}|${DNID}) exten => AutoAtt,n(loop),Set(ERROR_COUNT=${IF($["${ERROR_COUNT}" = ""]?0:${ERROR_COUNT})}) exten => AutoAtt,n,Verbose(5,Error count is ${ERROR_COUNT}) exten => AutoAtt,n,GotoIf($[${ERROR_COUNT} > 1]?CMG_Inbound,SpanishGeneral,1) exten => AutoAtt,n,Set(TIMEOUT(digit)=2) exten => AutoAtt,n,Set(TIMEOUT(response)=10) exten => AutoAtt,n,Background(sp_welcome) exten => AutoAtt,n,WaitExten() exten => i,1,Verbose(5, Invalid extension) exten => i,n,Playback(invalid) exten => i,n,Set(ERROR_COUNT=$[${ERROR_COUNT} + 1]) exten => i,n,Goto(AutoAtt,loop) exten => t,1,Verbose(5, Response timeout) exten => t,n,Set(ERROR_COUNT=$[${ERROR_COUNT} + 1]) exten => t,n,Goto(AutoAtt,loop) exten => hangup,1,Verbose(5, Hanging up on caller) exten => hangup,n,Playback(vm-goodbye) exten => hangup,n,Hangup() exten => 2,1,Playback(sp_client) exten => 2,n,Goto(AutoAtt,loop) exten => 3,1,Goto(CMG_Inbound,SpanishGeneral,1,) exten => 4,1,SetAccount(Affil_Xfer_To_Progrexion) exten => 4,n,Dial(IAX2/REC_SERVER_Progrexion:spherous456@10.0.1.189/1721@Progrexion_Inbound) exten => _45XX,1,Goto(CMG_Inbound,${EXTEN},1) exten => _46XX,1,Goto(CMG_Inbound,${EXTEN},1) exten => _47XX,1,Goto(CMG_Inbound,${EXTEN},1) [Outbound] exten => _18XXXXXXXXX,1,Dial(IAX2/REC_SERVER_Local_CMG_Inbound:spherous456@10.0.1.184/${EXTEN:1}) exten => _1900XXXXXXX,1,Playback(invalid) exten => _1900XXXXXXX,n,Hangup() exten => _1XXXNXXXXXX,1,Set(CALLFILENAME=${UNIQUEID}) exten => _1XXXNXXXXXX,2,Monitor(wav,/recordings_ram0/${CALLFILENAME},m) exten => _1XXXNXXXXXX,3,Dial(Zap/g1/${EXTEN:1}) exten => _NXXXXXX,1,Set(CALLFILENAME=${UNIQUEID}) exten => _NXXXXXX,2,Monitor(wav,/recordings_ram0/${CALLFILENAME},m) exten => _NXXXXXX,3,Dial(IAX2/REC_SERVER_Local_CMG_Inbound:spherous456@10.0.1.184/801${EXTEN}) [Inbound_DID] ;------------------------------------------- ;Inbound Numbers (With TID) ;------------------------------------------- exten => 9420,1,Macro(inbound-tid|TID 953) exten => 6061,1,Macro(inbound-tid|NDMS) exten => 8241,1,Macro(inbound-tid|CSD Consulting) exten => 0922,1,Macro(inbound-tid|Natural Search) exten => 1495,1,Macro(inbound-tid|TID 773 (CPC)) exten => 1506,1,Macro(inbound-tid|TID 394) exten => 1589,1,Macro(inbound-tid|Fraudlines) exten => 8794,1,Macro(inbound-tid|TID 730) exten => 8949,1,Macro(inbound-tid) exten => 8952,1,Macro(inbound-tid) exten => 9032,1,Macro(inbound-tid|TID 432) exten => 9107,1,Macro(inbound-tid|TID TID 20) exten => 9121,1,Macro(inbound-tid|TID 535) exten => 9137,1,Macro(inbound-tid|$99 Tid 702) exten => 9278,1,Macro(inbound-tid|TID 501) exten => 3082,1,Macro(inbound-tid|ID247) exten => 3107,1,Macro(inbound-tid|Test 5) exten => 4206,1,Macro(inbound-tid|Com Junct.) exten => 4365,1,Macro(inbound-tid|ID 340 $99) exten => 4618,1,Macro(inbound-tid|) exten => 4654,1,Macro(inbound-tid|iBusiness Hot Swap) exten => 4674,1,Macro(inbound-tid|i-Business E-2) exten => 4679,1,Macro(inbound-tid|ibusiness e-Class) exten => 4690,1,Macro(inbound-tid|Outbound referrals) exten => 4960,1,Macro(inbound-tid|411-Save) exten => 5069,1,Macro(inbound-tid|) exten => 5092,1,Macro(inbound-tid|) exten => 5093,1,Macro(inbound-tid|) exten => 5202,1,Macro(inbound-tid|Google) exten => 5403,1,Macro(inbound-tid|Overture) exten => 1393,1,Macro(inbound-tid|E2JL) exten => 1401,1,Macro(inbound-tid|eClassic) exten => 1402,1,Macro(inbound-tid|eFolks) exten => 8602,1,Macro(inbound-tid|) exten => 8604,1,Macro(inbound-tid|Yellow Pages) exten => 8605,1,Macro(inbound-tid|MSN P+) exten => 9681,1,Macro(inbound-tid|TID 1) exten => 9684,1,Macro(inbound-tid|662.0.7777) exten => 9689,1,Macro(inbound-tid|B. Thomas) exten => 9640,1,Macro(inbound-tid|TID 504) exten => 9642,1,Macro(inbound-tid|America Lead) exten => 9645,1,Macro(inbound-tid|Novastar) exten => 9648,1,Macro(inbound-tid|TID 391) exten => 9655,1,Macro(inbound-tid|out TID 378) exten => 9656,1,Macro(inbound-tid|TID 392) exten => 7311,1,Macro(inbound-tid|) exten => 2733,1,Macro(inbound-tid|DEFEND) exten => 7775,1,Macro(inbound-tid|Ask Trav) exten => 7787,1,Macro(inbound-tid|B&A) exten => 8893,1,Macro(inbound-tid|) exten => 4997,1,Macro(inbound-tid|E2) exten => 8004,1,Macro(inbound-tid|TID 830) exten => 7607,1,Macro(inbound-tid|) exten => 0407,1,Macro(inbound-tid|FOR SALE) exten => 7003,1,Macro(inbound-tid|NB HOT SWAP) exten => 8388,1,Macro(inbound-tid|TID 728) exten => 8396,1,Macro(inbound-tid|TID 594) exten => 8403,1,Macro(inbound-tid|TID: 729) exten => 8432,1,Macro(inbound-tid|TID 751) exten => 8436,1,Macro(inbound-tid|TID 754) exten => 8437,1,Macro(inbound-tid|BlueHippo) exten => 8440,1,Macro(inbound-tid|TID 662) exten => 8441,1,Macro(inbound-tid|TID 672) exten => 8442,1,Macro(inbound-tid|TID 713) exten => 8466,1,Macro(inbound-tid|OUT TID 645) exten => 4410,1,Macro(inbound-tid|MIX 6) exten => 4412,1,Macro(inbound-tid|TID 758) exten => 7334,1,Macro(inbound-tid|YLLWPAGES.COM) exten => 1098,1,Macro(inbound-tid|TID 914) exten => 7787,1,Macro(inbound-tid|TID 975) exten => 1491,1,Macro(inbound-tid|TID 871) exten => 1493,1,Macro(inbound-tid|TID 890) exten => 1701,1,Macro(inbound-tid|Vinyl) exten => 1705,1,Macro(inbound-tid|MSN CRC) exten => 4555,1,Macro(inbound-tid|Media 1) exten => 4735,1,Macro(spanish-inbound-tid|4735 (Spanish) TID 888) exten => 5426,1,Macro(inbound-tid|TID 826) exten => 5432,1,Macro(inbound-tid|AmericanLead) exten => 8823,1,Macro(inbound-tid|) exten => 8824,1,Macro(inbound-tid|) exten => 3336,1,Macro(inbound-tid|) exten => 8711,1,Macro(inbound-tid|) exten => 1702,1,Macro(inbound-tid|) exten => 1703,1,Macro(inbound-tid|) exten => 1748,1,Macro(inbound-tid-test) exten => 8017037009,1,Macro(inbound-tid|TID 394) exten => 8017037006,1,Macro(inbound-tid|) [custom-callboth2] exten => _1XXXNXXXXXX,1,Set(CALLFILENAME=${UNIQUEID}) exten => _1XXXNXXXXXX,2,Monitor(wav,/recordings_ram0/${CALLFILENAME},m) exten => _1NXXNXXXXXX,3,AGI(/var/www/asterisk/bin/callout.mysql.php|${EXTEN}) exten => _NXXXXXX,1,Set(CALLFILENAME=${UNIQUEID}) exten => _NXXXXXX,2,Monitor(wav,/recordings_ram0/${CALLFILENAME},m) exten => _NXXXXXX,3,AGI(/var/www/asterisk/bin/callout.mysql.php|${EXTEN}) [macro-Employee-Agent-WithVM] exten => s,1,NoOp() exten => s,n,Wait(1) ;exten => s,n,SetVar(SPYGROUP=10001) ;exten => s,n,ChanIsAvail(Local/${ARG1}@CMG/n|js) ; j is for dump and s is for ANY call ;exten => s,n,GotoIf($[${GROUP_COUNT(${MACRO_EXTEN}@CMG_Inbound)} = 0]?avail:busy) ;exten => s,n(avail),Set(OUTBOUND_GROUP=${MACRO_EXTEN}@CMG_Inbound) exten => s,n,Dial(local/${ARG1}@CMG/n,10) exten => s,n,Voicemail(b${VEXTEN}@${ARG2}) exten => s,n,PlayBack(vm-goodbye) ;exten => s,105(busy),GotoIf($["${fromqueue}"="no"]?CMG_Inbound,2222222,1:CMG_Inbound,busy,1) [CMG_Inbound] include => Outbound include => Inbound_DID ;hotswap exten => 3199,1,Dial(IAX2/REC_SERVER_PMG:spherous456@10.0.1.182/3199@PMG) ;test exten exten => 9999,1,Meetme(d) ;Jump from Macro to Busy exten => busy,1,Busy() ;Jump from Macro to Voicemail exten => voicemial,1,Voicemail(${EXTEN}@CMG_Inbound) exten => voicemail,n,Playback(vm-goodbye) exten => voicemail,n,Hangup() ;Voicemail Main Access exten => 8500,1,VoicemailMain(@CMG_Inbound) ;Transfer to Affiliate Program exten => 100,1,Dial(IAX2/REC_SERVER_Progrexion:spherous456@10.0.1.189/1721@Progrexion_Inbound) ;Transfer to Current Client Recording exten => 101,1,wait(5) exten => 101,n,Playback(LexClientInfo) exten => 101,n,Hangup ;Transfer to Class Action Recording exten => 102,1,wait(5) exten => 102,n,Playback(classaction) exten => 102,n,Hangup ;Transfer to Louisiana Recording exten => 103,1,wait(5) exten => 103,n,Playback(louisiana) exten => 103,n,Hangup ;Monetization Queue exten => 110,1,Queue(Monetization|t|||20) exten => 110,2,Playback(Monetization_NoAvail) exten => 110,3,Hangup() ;------------------------------------------- ;Extensions ;------------------------------------------- ;Physical Extensions exten => _35XX,1,Macro(Employee-Agent-WithVM|${EXTEN}|CMG_Inbound) exten => _37XX,1,Macro(Employee-Agent-WithVM|${EXTEN}|CMG_Inbound) exten => _38XX,1,Macro(Employee-Agent-WithVM|${EXTEN}|CMG_Inbound) ;Agent Extensions exten => _45XX,1,Set(CHANNEL_NAME=${CHANNEL}) exten => _45XX,n,SetVar(fromqueue=no) exten => _45XX,n,AGI(/var/www/asterisk/bin/agent_lookup.php|${EXTEN}|${CHANNEL_NAME}) exten => _45XX,n,Voicemail(${EXTEN}@CMG_Inbound) exten => _46XX,1,Set(CHANNEL_NAME=${CHANNEL}) exten => _46XX,n,SetVar(fromqueue=no) exten => _46XX,n,AGI(/var/www/asterisk/bin/agent_lookup.php|${EXTEN}|${CHANNEL_NAME}) exten => _47XX,1,Set(CHANNEL_NAME=${CHANNEL}) exten => _47XX,n,SetVar(fromqueue=no) exten => _47XX,n,AGI(/var/www/asterisk/bin/agent_lookup.php|${EXTEN}|${CHANNEL_NAME}) exten => _48XX,1,Set(CHANNEL_NAME=${CHANNEL}) exten => _48XX,n,SetVar(fromqueue=no) exten => _48XX,n,AGI(/var/www/asterisk/bin/agent_lookup.php|${EXTEN}|${CHANNEL_NAME}) exten => _VM4XXX,1,Voicemail(${EXTEN:2}@CMG_Inbound) ;------------------------------------------- ;Queues ;------------------------------------------- ;InboundGeneral Queue exten => 2222222,1,Queue(InboundGeneral|t|||60) exten => 2222222,2,Playback(en_exitqueue) exten => 2222222,3,Voicemail(*1@CMG_Inbound) exten => 2222222,4,Playback(vm-goodbye) exten => 2222222,5,Hangup() ;InboundGeneral After hours voicemail exten => InboundGeneralVM,1,Playback(en_afterhours) exten => InboundGeneralVM,n,Voicemail(*1@CMG_Inbound) exten => InboundGeneralVM,n,Playback(vm-goodbye) exten => InboundGeneralVM,n,Hangup() ;SpanishGeneral Queue exten => SpanishGeneral,1,Queue(SpanishGeneral|t|||60) exten => SpanishGeneral,n,Playback(sp_exitqueue) exten => SpanishGeneral,n,Voicemail(*2@CMG_Inbound) ;Monetization Queue exten => 110,1,SetAccount(CMG_Outbound) exten => 110,2,Queue(Monetization|t|||20) exten => 110,3,Playback(Monetization_NoAvail) exten => 110,4,Hangup() ;SpanishGeneral After hours voicemail exten => SpanishGeneralVM,1,Playback(sp_afterhours) exten => SpanishGeneralVM,n,Voicemail(*2@CMG_Inbound) exten => SpanishGeneralVM,n,Playback(vm-goodbye) exten => SpanishGeneralVM,n,Hangup()