Error: func_args: Can't find trailing parenthesis for function

I am receiving this error in the asterisk console:

 WARNING[25933][C-000010a4]: pbx.c:4170 func_args: Can't find trailing parenthesis for function 'IF(3?400:external'?

The only thing in the extensions.conf files that I could find that seemed like ti might generate this error is this line in the [sub-record-check] context:

exten => exten,n,Set(CALLTYPE=${IF($[${LEN(${FROM_DID})}]?external:internal)})

All of the relevant parentheses seem to be there. Maybe someone out there can point me in the right direction?

Tom

That, for sure, isn’t the line that’s giving you the error, but it LOOKS similar. If ‘exten’ is 400, then the length is 3… Why don’t you try this:

grep :external /etc/asterisk/*

Note the colon before external

See if you can find something else?

Thank you, Rob. Each extension seems to have this line (this is 342) in the context [from-queue-exten-only]:

exten => 342,n,ExecIf($[!${LEN(${FROMEXTEN})}]?Set(FROMEXTEN=${IF(${LEN(${NODEST})}?${NODEST}:external}))

This corresponds with what seems to be happening, which is that this error is printed each and every time a call is sent to an agent in the queue (which is 400). If all agents are busy and a call is waiting, the message scrolls past quite frequently.

Tom

It appears that that’s a (fixed) bug in Queues. Can you check to make sure you’re running the latest version?

Thanks, Rob. I think the fix must have been released just about the same time as my initial post.

Now if I can just figure out why I am seeing " Unknown or unavailable item requested: ‘reversecharge’"…

It’s checking to see if the incoming call is marked as reverse charge, and then automatically rejecting them. It’s an option in Inbound Routes.

Got it! So, any call matching a given inbound route with that option checked that comes over a non-PRI channel will print that warning. Thanks again!