Bad destination for IVR option to setCallerID module

I have an IVR setup in FreePBX, for which option 1 is “Set CallerID.” The element of the CallerID module that is selected changes the CID for the call before continuing to a call queue.

Option 1 of the IVR does work when you call it, the CID is changed, the call is sent to the queue and the queue functions correctly.

However, there is a notification message in the admin:

There are 1 bad destinations
DEST STATUS: CUSTOM
IVR: Our IVR / Option: 1
Added 1 days, 23 hours, 51 minutes ago
(retrieve_conf.BADDEST)

The extract of the log for a call coming through the IVR option 1 is attached.

It appears to me that there is a small problem with the dialplan

[app-setcid]
include => app-setcid-custom
exten => 1,1,Noop(Changing Callerid from ${CALLERID(all)} to CALLERID(name): PC Sales: ${CALLERID(num)}, CALLERID(num): ${CALLERID(num)}; (PC Sales to queue))
exten => 1,n,Set(CALLERID(name)=PC Sales: ${CALLERID(num)})
exten => 1,n,Set(CALLERID(num)=${CALLERID(num)})
exten => 1,n,Goto(ext-queues,8300,1)

Not sure what happened to the log message. Here it is:

[May 19 13:53:53] VERBOSE[13212] pbx.c: – Goto (app-setcid,1,1)
[May 19 13:53:53] WARNING[13212] pbx.c: Error in extension logic (missing ‘}’)
[May 19 13:53:53] WARNING[13212] pbx.c: Can’t find trailing parenthesis for function ‘CALLERID(nu’?
[May 19 13:53:53] ERROR[13212] func_callerid.c: Unknown callerid data type ‘nu’.
[May 19 13:53:53] VERBOSE[13212] pbx.c: – Executing [[email protected]:1] ESC[1;36;40mNoOpESC[0;37;40m(“ESC[1;35;40mSIP/5061-00002cb4ESC[0;37;40m”, “ESC[1;35;40mChanging Callerid from “PC Main:07977500700” <07977500700> to CALLERID(name)
: PC Sales: 07977500700, CALLERID(num): ESC[0;37;40m”) in new stack
[May 19 13:53:53] VERBOSE[13212] pbx.c: – Executing [[email protected]:2] ESC[1;36;40mSetESC[0;37;40m(“ESC[1;35;40mSIP/5061-00002cb4ESC[0;37;40m”, “ESC[1;35;40mCALLERID(name)=PC Sales: 07977500700ESC[0;37;40m”) in new stack
[May 19 13:53:53] VERBOSE[13212] pbx.c: – Executing [[email protected]:3] ESC[1;36;40mSetESC[0;37;40m(“ESC[1;35;40mSIP/5061-00002cb4ESC[0;37;40m”, “ESC[1;35;40mCALLERID(num)=07977500700ESC[0;37;40m”) in new stack
[May 19 13:53:53] VERBOSE[13212] pbx.c: – Executing [[email protected]:4] ESC[1;36;40mGotoESC[0;37;40m(“ESC[1;35;40mSIP/5061-00002cb4ESC[0;37;40m”, “ESC[1;35;40mext-queues,8300,1ESC[0;37;40m”) in new stack
[May 19 13:53:53] VERBOSE[13212] pbx.c: – Goto (ext-queues,8300,1)

the bad destination is probably because that module is not properly written to register it’s destinations with the destination registry. You may want to file a bug so the author of it can have a look.

(It is a third party module, not part of the core FreePBX).

See the patch in http://www.freepbx.org/trac/ticket/4284