Asterisk Extensions Conf Debug help

Hi! I am trying to configure push notifications. Following a Manual, and I need to add this to my extensions conf

GitHub - balusreekanth/ios-asterisk-push: Automated Asterisk Registration Database clone And Push Script (part 7)

But It is not working and I can´t find a way to debug it.

Could you help me?

Thanks

Please show what you have tried, and the logs showing what went wrong.

Where he throws in that this is off topic here because he is using FreePBX.

Hi! yes Freepbx with Asterisk. The conf is the same. I am editing extensions.conf file

What I tried:

STEP 7. Now configure your extensions configuration file to check if the destination extension exist in our database . If it exists, we do send call to push context else we process call normally.
exntsions configuration file may look differnt from system to system depending on your asterisk distro .Below a smaple configuration is given for reference.

same => n,GoSubIf($["${pushneed}" = "${CALL_DESTINATION}"]?push,s,1(${CURRENT_DEVICE}))

[push]
exten => s,1,NoOP(SUB: Send push notification)

same => n,Set(MAX_TRIES=15)

same => n,Set(TRY=1)

;send args to push script

same => n,System(/var/lib/asterisk/pushscripts/push "${CALL_DESTINATION}" "${CALLERID(num)}" "${CALLERID(name)}" )

It shold open the “push” file with that parameters everytime a call is made, because in that file it sends a push notification if I have the user device token. I am trying to show a log before this using Log(‘NOTICE’, ‘log message’) but it does not log anything

No it is not. You are not allowed to edit extensions.conf in FreePBX, as FreePBX overwrites that file.

I know, I am editing extensions_custom.conf. I have been researching, and what I am having trouble is executing a script placed inside asterisk

Does:

sudo --shell --user=<user-running-asterisk>
/var/lib/asterisk/pushscripts/push a b c

Yield a clue?

Yes, I did something similar to it and it works. What is not working is the extensions_custom.conf from FreePBX, i am just trying to watch a print from a specific extension now,

exten => 4002,1,NoOP(SUB: Send push notification)

and it won´t work either.

I have asked in FreePbx forum now. But if anyone knows if I need to run a command after changing thinks in config files it would be appreciated.

Thanks!

Unfortunately, most of us on this forum are ‘cli junkies’ and only interested in Asterisk issues. Since you are running FreePBX, most of our solutions would not apply. Your best resource is the FreePBX forum.