Summary:ASTERISK-11656: Instead of just going to the failed extension, add a couple more for OutgoingSpoolFailed
Reporter:Matt Riddell (zx81)Labels:
Date Opened:2008-03-16 15:06:00Date Closed:2011-06-07 14:03:11
Status:Closed/CompleteComponents:. I did not set the category correctly.
Versions:Frequency of
Environment:Attachments:( 0) failed.diff
Description:This is a quick tweak that I am applying on everyone's machines at the moment.  I tried to paste it to someone on the mailing list but wrapping broke the patch so I'm uploading it here.  Mainly just for posterity, but if you want to commit it that would make my life easier - pretty trivial patch.
Comments:By: Tilghman Lesher (tilghman) 2008-03-16 22:30:12

That currently is within a block that first checks if the "failed" extension exists.  As such, it is inappropriate to go to any other extension without first checking if it exists.

By: Tilghman Lesher (tilghman) 2008-03-16 22:34:42

And, in fact, the current code lets you emulate exactly what your patch does, simply by adding some dialplan logic, which is far more versatile:

exten => failed,1,GotoIf($[${REASON} = 34]?congestion,1)
exten => failed,n,GotoIf($[${REASON} = 0]?timeout,1)
exten => failed,n,GotoIf($[${REASON} = 17]?busy,1)

I don't see any reason whatsoever to commit this patch, as it hardcodes behavior that should properly be done in the dialplan.

By: Brandon Kruse (bkruse) 2008-03-16 23:18:22


This make work for your solution, but giving the user expandability through possibility instead of hardcoding is a better idea.


By: Joshua C. Colp (jcolp) 2008-03-17 10:32:33

I agree with Corydon, this can already be accomplished using the REASON dialplan variable.

By: Matt Riddell (zx81) 2008-03-17 20:41:47

I guess the issue then is that with a manager originate, reason doesn't seem to make it through.

You can reclose this and I'll open another bug with the reasons behind why I wrote this patch

By: jmls (jmls) 2008-03-18 02:42:46

zx81: I wrote the patch that added the REASON variable (ASTERISK-10199) specifically because the manager originate didn't give that information. Are you sure that it's not working properly ? It is for me, using AMI to originate the calls.

By: Matt Riddell (zx81) 2008-03-18 20:23:57


I'll have to log back into the machine, but it looks like your patch is what I was looking for.

I'll make sure its above revision 81372 and if I still have the same problem I'll get back to you.

I'm sure that that is the fix I was looking for.

This can be closed out.

By: Brandon Kruse (bkruse) 2008-03-19 14:31:50

Close as per user's request.