New to FreePBX/Asterisk - filtering/parking calls

Hi

I was trying to figure out how to filter anonymous calls, and found some info with this code for extensions_custom.conf:

[from-external-custom]
exten => s,1,Zapateller(answer,nocallerid)
exten => s,2,Wait(1)
exten => s,3,SetMusicOnHold(default)
exten => s,4,GotoIf($["${CALLERID(num)}" = ""]?who-r-u,s,1)
exten => s,5,GotoIf($["foo${CALLERID(num)}" = "foo"]?who-r-u,s,1)
exten => s,6,GotoIf($["${CALLERID(name):0:9}" = "Anonymous"]?who-r-u,s,1)
exten => s,7,GotoIf($["${CALLERID(name):0:7}" = "Unknown"]?who-r-u,s,1)
exten => s,8,GotoIf($["${CALLERID(num):0:7}" = "Private"]?who-r-u,s,1)
exten => s,9,GotoIf($["${CALLERID(name):0:7}" = "Private"]?who-r-u,s,1)
exten => s,10,GotoIf($["${CALLERID(num):0:10}" = "Restricted"]?who-r-u,s,1)
exten => s,11,GotoIf($["${CALLERID(num):0:4}" = "PSTN"]?who-r-u,s,1)
exten => s,12,Dial(Local/600@from-internal)
exten => s,13,Hangup

[who-r-u]
exten => s,1,Background(custom/no-caller-id-message)
exten => s,2,Wait(1)
exten => s,3,Record(/tmp/asterisk-stranger:wav,5,15)
exten => s,4,Background(custom/please-hold-connect)
exten => s,5,Goto(ext-park,70,1)
exten => s,6,VoiceMail(601@default)
exten => s,7,Playback(goodbye)
exten => s,8,Hangup

[ext-park]
exten => 70,1,Answer
exten => 70,2,SetMusicOnHold(default)
exten => 70,3,Set(CALLERID(num)=100)
exten => 70,4,Set(CALLERID(name)=Parked Call Info)
exten => 70,5,ParkAndAnnounce(silence/1:custom/anonymous-call-from:/tmp/asterisk-stranger:custom/to-accept-this-call-dial:PARKED:custom/otherwise-voicemail|40|local/600@from-internal|who-r-u,s,6)
exten => 70,6,Playback(custom/otherwise-voicemail)
exten => 70,7,Hangup

Now, the recording of the anonymous callers name seems ok, and the call is put on hold… But I am never notified about the parked call in my ringgroup (600). The log says:

[2015-02-27 21:45:32] VERBOSE[5849][C-00000032] pbx.c: -- Executing [70@ext-park:5] ParkAndAnnounce("SIP/82132307-00000049", "silence/1:custom/anonymous-call-from:/tmp/asterisk-stranger:custom/to-accept-this-call-dial:PARKED:custom/otherwise-voicemail|40|local/600@from-internal|who-r-u,s,6") in new stack
[2015-02-27 21:45:32] VERBOSE[5849][C-00000032] app_parkandannounce.c: -- Dial Tech,String: (6,(null))
[2015-02-27 21:45:32] VERBOSE[5849][C-00000032] app_parkandannounce.c: -- Return Context: (ext-park,70,6) ID: 100
[2015-02-27 21:45:32] VERBOSE[5849][C-00000032] res_musiconhold.c: -- Started music on hold, class 'default', on SIP/82132307-00000049
[2015-02-27 21:45:32] VERBOSE[5849][C-00000032] features.c: == Parked SIP/82132307-00000049 on 71 (lot default). Will timeout back to extension [ext-park] 70, 6 in 45 seconds
[2015-02-27 21:45:32] VERBOSE[5849][C-00000032] pbx.c: -- Added extension '71' priority 1 to parkedcalls
[2015-02-27 21:45:32] VERBOSE[5849][C-00000032] app_parkandannounce.c: -- Call parked in space: 71, timeout: 0, return-context:
[2015-02-27 21:45:32] WARNING[5849][C-00000032] channel.c: No channel type registered for '6'
[2015-02-27 21:45:32] NOTICE[5849][C-00000032] channel.c: Unable to request channel 6/(null)
[2015-02-27 21:45:32] WARNING[5849][C-00000032] app_parkandannounce.c: PARK: Unable to allocate announce channel.
[2015-02-27 21:45:32] VERBOSE[5849][C-00000032] pbx.c: == Spawn extension (ext-park, 70, 6) exited non-zero on 'Parked/SIP/82132307-00000049<ZOMBIE>'

Any idea what could be the issue ?

Regards
Brian

First off this string is all sorts of wrong. You are using pipes (|) which have not been supported since 1.4. Everything must be a comma.

Secondly Park and announce only works with page groups. You’ve sent it “600@from-internal” which is your ring group which is why it’s confused and not sure what to do

Yep, I also found out about the pipes - that has been fixed is most of the code…

Finally, after some tweaking, it looks like the setup finally works as expected…