Cmadd whitelist module call dropped


I installed the cmcheck and cmadd scripts to whitelist users, unfortunately I’m getting an error when using the cmadd feature.

I set it as the following:

Inbound goes to dynamic route: AGI Lookup: lgaetz-cmcheck.php,${CALLERID(number)}

If whitelist is true it goes to an extension

If false it goes to the IVR asking to press a specific number

If number is pressed it is redirected to custom destination add-cid-to-whitelist,s,1

And after return it goes to an extension.

The number is correctly added but there’s something failing after that when it has to go to the extension and the call is dropped, in the logs it shows:

[2021-05-11 02:46:09] VERBOSE[2003603][C-00000012] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/lgaetz-cmadd.php

[2021-05-11 02:46:09] VERBOSE[2003603][C-00000012] res_agi.c: lgaetz-cmadd.php,06XXXXXXX,+336XXXXXXX: Success, 06XXXXXXX added to Contact Mgr group whitelist

[2021-05-11 02:46:09] VERBOSE[2003603][C-00000012] res_agi.c: <PJSIP/OVH-04XXXXXXXXX-00000011>AGI Script lgaetz-cmadd.php completed, returning 0

[2021-05-11 02:46:09] VERBOSE[2003603][C-00000012] pbx.c: Executing [[email protected]:4] Return(“PJSIP/OVH-04XXXXXXXXX-00000011”, “”) in new stack

[2021-05-11 02:46:09] ERROR[2003603][C-00000012] app_stack.c: Return without Gosub: stack is empty

[2021-05-11 02:46:09] VERBOSE[2003603][C-00000012] pbx.c: Spawn extension (add-cid-to-whitelist, s, 4) exited non-zero on ‘PJSIP/OVH-XXXXXXXXX-00000011’

I also tried to send the call to the talking clock but it always fails.
Did I miss something in the configuration ?

Thank you.

That project is superseded by @mitchmitchell’s work on the Allowlist module. You can install it in FreePBX 15 using the command:

fwconsole ma downloadinstall allowlist --tag=15.0.2

I tried the command you provided to install it but it returned

Unable to update module allowlist - 15.0.2, it does not exist

then I tried fwconsole ma downloadinstall --edge allowlist
which returned

The following error(s) occured:

  • Retrieved Module XML Was Empty

finally I installed from the github repository but it’s in version 15.0.1

Is there any way to make it work as your module was doing, automatically adding someone who is not whitelisted but who went through an IVR ?
I tried to do it with a feature code called by the IVR but it doesn’t work.
It seems I’m not using the right way to achieve this.
I searched with the blacklist module user guide how it could be possible to do but I didn’t find it.
Also in the logs it reports a lot of messages like this one:

‘app-allowlist-last’ tries to include nonexistent context ‘app-allowlist-last-custom’

Should I care about them?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.