Hello all,
I am using FreePbx and have been pounding my head against a table trying to figure this out. Using current FreePbx and realize they have their own forum but hoping someone here can point me to the right direction. I have blacklist that is going to Lenny (thank you NV) but also have an old asterisk here that we wanted to port alllll the numbers that have been going to the monkeys on that from extensions.conf to the new FreePbx and am fighting a losing battle here. Any help would be appreciated.
What was working in asterisk 1.2:
extensions.conf:
[incoming]
include => office-ext
include => ata-ext
include => go_to_monkeys
include => dids
exten => s,1,SetVar(NumberCalled=${EXTEN})
exten => s,2,NoOp(${NumberCalled})
exten => s,3,NoOp(${CALLERIDNUM})
exten => s,4,NoOp(${CALLERIDNAME})
exten => s,5,Goto(autoattendant,s,1)
exten => s,6,Hangup
[go_to_monkeys]
exten => _NXXXXXX/3334445555,1,Goto(office-ext,199,1)
exten => _NXXXXXX/4445556666,1,Goto(office-ext,199,1)
exten => 199,n,Playback(tt-monkeysintro)
exten => 199,n,Playback(the-monkeys-twice)
;exten => 199,n,Playback(weasels-eaten-phonesys)
;exten => 199,n,Playback(abandon-all-hope)
;exten => 199,n,Playback(teletubbie-murder)
exten => 199,n,Playback(lots-o-monkeys)
exten => 199,n,Playback(lots-o-monkeys)
exten => 199,n,Hangup
What i have done in FreePbx 2.11
extensions_custom.conf:
[from-internal-custom]
include => play-monkeys
include => sound-cute
include => telemarketers
[play-monkeys]
exten => 199,1,Answer
exten => 199,n,Wait(1)
exten => 199,n,Playback(en/carried-away-by-monkeys)
exten => 199,n,Playback(the-monkeys-twice)
exten => 199,n,Playback(lots-o-monkeys)
exten => 199,n,Playback(lots-o-monkeys)
exten => 199,n,Hangup
[telemarketers]
exten => s,1,Gotoif($["${CALLERIDNUM}"="13334445555"]?1000:2
exten => s,2,Dial(SIP/703,5)
exten => s,1000,Dial(SIP/199,1)
exten => s,1001,Hangup
Created Custom Destination:
Reload dialplan and amportal a r. Here is what i see in the call flow...
Executing [<DID>@from-trunk-sip-nexvortex:1] Set("SIP/nexvortex-00000004", "GROUP()=OUT_2") in new stack
-- Executing [<DID>@from-trunk-sip-nexvortex:2] Goto("SIP/nexvortex-00000004", "from-trunk,<DID>,1") in new stack
-- Goto (from-trunk,<DID>,1)
-- Executing [<DID>@from-trunk:1] Set("SIP/nexvortex-00000004", "__FROM_DID=<DID>") in new stack
-- Executing [<DID>@from-trunk:2] Gosub("SIP/nexvortex-00000004", "app-blacklist-check,s,1()") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("SIP/nexvortex-00000004", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Set("SIP/nexvortex-00000004", "CALLED_BLACKLIST=1") in new stack
-- Executing [s@app-blacklist-check:3] Return("SIP/nexvortex-00000004", "") in new stack
-- Executing [<DID>@from-trunk:3] Set("SIP/nexvortex-00000004", "CDR(did)=<DID>") in new stack
-- Executing [<DID>@from-trunk:4] ExecIf("SIP/nexvortex-00000004", "1 ?Set(CALLERID(name)=13334445555)") in new stack
-- Executing [<DID>@from-trunk:5] Set("SIP/nexvortex-00000004", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [<DID>@from-trunk:6] Set("SIP/nexvortex-00000004", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [<DID>@from-trunk:7] Goto("SIP/nexvortex-00000004", "from-did-direct,703,1") in new stack
-- Goto (from-did-direct,703,1)
-- Executing [703@from-did-direct:1] Set("SIP/nexvortex-00000004", "__RINGTIMER=15") in new stack
-- Executing [703@from-did-direct:2] Macro("SIP/nexvortex-00000004", "exten-vm,703,703,0,0,0") in new stack
-- Executing [s@macro-exten-vm:1] Macro("SIP/nexvortex-00000004", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/nexvortex-00000004", "TOUCH_MONITOR=1391094634.4") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/nexvortex-00000004", "AMPUSER=13334445555") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/nexvortex-00000004", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/nexvortex-00000004", "1?Set(REALCALLERIDNUM=1333444555)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/nexvortex-00000004", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:6] Set("SIP/nexvortex-00000004", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:7] GotoIf("SIP/nexvortex-00000004", "1?report") in new stack
-- Goto (macro-user-callerid,s,13)
-- Executing [s@macro-user-callerid:13] GotoIf("SIP/nexvortex-00000004", "0?continue") in new stack
-- Executing [s@macro-user-callerid:14] Set("SIP/nexvortex-00000004", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:15] GotoIf("SIP/nexvortex-00000004", "1?continue") in new stack
-- Goto (macro-user-callerid,s,26)
-- Executing [s@macro-user-callerid:26] Set("SIP/nexvortex-00000004", "CALLERID(number)=13334445555") in new stack
-- Executing [s@macro-user-callerid:27] Set("SIP/nexvortex-00000004", "CALLERID(name)=13334445555") in new stack
-- Executing [s@macro-user-callerid:28] Set("SIP/nexvortex-00000004", "CDR(cnum)=13334445555") in new stack
-- Executing [s@macro-user-callerid:29] Set("SIP/nexvortex-00000004", "CDR(cnam)=13334445555") in new stack
-- Executing [s@macro-user-callerid:30] Set("SIP/nexvortex-00000004", "CHANNEL(language)=en") in new stack
-- Executing [s@macro-exten-vm:2] Set("SIP/nexvortex-00000004", "RingGroupMethod=none") in new stack
-- Executing [s@macro-exten-vm:3] Set("SIP/nexvortex-00000004", "__EXTTOCALL=703") in new stack
It doesnt appear to look at the telemarketers and i am floundering after 2 days of googling my head off. Any ideas what i am doing wrong ?
I am using FreePbx and have been pounding my head against a table trying to figure this out. Using current FreePbx and realize they have their own forum but hoping someone here can point me to the right direction. I have blacklist that is going to Lenny (thank you NV) but also have an old asterisk here that we wanted to port alllll the numbers that have been going to the monkeys on that from extensions.conf to the new FreePbx and am fighting a losing battle here. Any help would be appreciated.
What was working in asterisk 1.2:
extensions.conf:
[incoming]
include => office-ext
include => ata-ext
include => go_to_monkeys
include => dids
exten => s,1,SetVar(NumberCalled=${EXTEN})
exten => s,2,NoOp(${NumberCalled})
exten => s,3,NoOp(${CALLERIDNUM})
exten => s,4,NoOp(${CALLERIDNAME})
exten => s,5,Goto(autoattendant,s,1)
exten => s,6,Hangup
[go_to_monkeys]
exten => _NXXXXXX/3334445555,1,Goto(office-ext,199,1)
exten => _NXXXXXX/4445556666,1,Goto(office-ext,199,1)
exten => 199,n,Playback(tt-monkeysintro)
exten => 199,n,Playback(the-monkeys-twice)
;exten => 199,n,Playback(weasels-eaten-phonesys)
;exten => 199,n,Playback(abandon-all-hope)
;exten => 199,n,Playback(teletubbie-murder)
exten => 199,n,Playback(lots-o-monkeys)
exten => 199,n,Playback(lots-o-monkeys)
exten => 199,n,Hangup
What i have done in FreePbx 2.11
extensions_custom.conf:
[from-internal-custom]
include => play-monkeys
include => sound-cute
include => telemarketers
[play-monkeys]
exten => 199,1,Answer
exten => 199,n,Wait(1)
exten => 199,n,Playback(en/carried-away-by-monkeys)
exten => 199,n,Playback(the-monkeys-twice)
exten => 199,n,Playback(lots-o-monkeys)
exten => 199,n,Playback(lots-o-monkeys)
exten => 199,n,Hangup
[telemarketers]
exten => s,1,Gotoif($["${CALLERIDNUM}"="13334445555"]?1000:2
exten => s,2,Dial(SIP/703,5)
exten => s,1000,Dial(SIP/199,1)
exten => s,1001,Hangup
Created Custom Destination:
Reload dialplan and amportal a r. Here is what i see in the call flow...
Executing [<DID>@from-trunk-sip-nexvortex:1] Set("SIP/nexvortex-00000004", "GROUP()=OUT_2") in new stack
-- Executing [<DID>@from-trunk-sip-nexvortex:2] Goto("SIP/nexvortex-00000004", "from-trunk,<DID>,1") in new stack
-- Goto (from-trunk,<DID>,1)
-- Executing [<DID>@from-trunk:1] Set("SIP/nexvortex-00000004", "__FROM_DID=<DID>") in new stack
-- Executing [<DID>@from-trunk:2] Gosub("SIP/nexvortex-00000004", "app-blacklist-check,s,1()") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("SIP/nexvortex-00000004", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Set("SIP/nexvortex-00000004", "CALLED_BLACKLIST=1") in new stack
-- Executing [s@app-blacklist-check:3] Return("SIP/nexvortex-00000004", "") in new stack
-- Executing [<DID>@from-trunk:3] Set("SIP/nexvortex-00000004", "CDR(did)=<DID>") in new stack
-- Executing [<DID>@from-trunk:4] ExecIf("SIP/nexvortex-00000004", "1 ?Set(CALLERID(name)=13334445555)") in new stack
-- Executing [<DID>@from-trunk:5] Set("SIP/nexvortex-00000004", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [<DID>@from-trunk:6] Set("SIP/nexvortex-00000004", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [<DID>@from-trunk:7] Goto("SIP/nexvortex-00000004", "from-did-direct,703,1") in new stack
-- Goto (from-did-direct,703,1)
-- Executing [703@from-did-direct:1] Set("SIP/nexvortex-00000004", "__RINGTIMER=15") in new stack
-- Executing [703@from-did-direct:2] Macro("SIP/nexvortex-00000004", "exten-vm,703,703,0,0,0") in new stack
-- Executing [s@macro-exten-vm:1] Macro("SIP/nexvortex-00000004", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/nexvortex-00000004", "TOUCH_MONITOR=1391094634.4") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/nexvortex-00000004", "AMPUSER=13334445555") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/nexvortex-00000004", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/nexvortex-00000004", "1?Set(REALCALLERIDNUM=1333444555)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/nexvortex-00000004", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:6] Set("SIP/nexvortex-00000004", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:7] GotoIf("SIP/nexvortex-00000004", "1?report") in new stack
-- Goto (macro-user-callerid,s,13)
-- Executing [s@macro-user-callerid:13] GotoIf("SIP/nexvortex-00000004", "0?continue") in new stack
-- Executing [s@macro-user-callerid:14] Set("SIP/nexvortex-00000004", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:15] GotoIf("SIP/nexvortex-00000004", "1?continue") in new stack
-- Goto (macro-user-callerid,s,26)
-- Executing [s@macro-user-callerid:26] Set("SIP/nexvortex-00000004", "CALLERID(number)=13334445555") in new stack
-- Executing [s@macro-user-callerid:27] Set("SIP/nexvortex-00000004", "CALLERID(name)=13334445555") in new stack
-- Executing [s@macro-user-callerid:28] Set("SIP/nexvortex-00000004", "CDR(cnum)=13334445555") in new stack
-- Executing [s@macro-user-callerid:29] Set("SIP/nexvortex-00000004", "CDR(cnam)=13334445555") in new stack
-- Executing [s@macro-user-callerid:30] Set("SIP/nexvortex-00000004", "CHANNEL(language)=en") in new stack
-- Executing [s@macro-exten-vm:2] Set("SIP/nexvortex-00000004", "RingGroupMethod=none") in new stack
-- Executing [s@macro-exten-vm:3] Set("SIP/nexvortex-00000004", "__EXTTOCALL=703") in new stack
It doesnt appear to look at the telemarketers and i am floundering after 2 days of googling my head off. Any ideas what i am doing wrong ?