macro-hangupcall always exits non-zero

Hi there,

Long time user of FreePBX. I’m trying to hook into macro’s for running an AGI script during the hangup routine, but the default macro-hangupcall always exits with a non-zero status, interrupting the routine and my script never runs. When I check the Asterisk full logs with debug on, I see this as the error:

chan_pjsip.c: AST hangup cause 16 (no match found in PJSIP)

For the life of me, I can’t figure how why this is happening. Any suggestions?

Note: My trunk using from-pstn context and my extension uses from-internal context.

FreePBX 16.0.40.13
System 12.7.8-2306-1.sng7

That is not the reason why and is not an error (it’s a debug message). You need to show the complete dialplan execution output.

What is the extra logging I should enable before I provide the dialplan execution output? And is there a better place to capture that output other than cat’ing /var/log/asterisk/full?

Not really. You just need the dialplan execution output to see what is actually happening, probably along with the configuration.

I guess what I’m asking is, what is the exact command which prints the dialplan execution output? I’m only familiar with the Asterisk full log. I suspect I can get the dialplan execution output from the Asterisk console, but I don’t know which command that would be.

They get output as verbose messages, and would appear in full. It should also appear in messages.

You need to set the verbosity high enough. 3 used to be sufficient, but it might now need up to 5.