[asterisk-users] how to get the status of failed call files
Richard Lyman
pchammer at dynx.net
Wed Jan 31 17:11:16 MST 2007
Rich Doughty wrote:
> i am creating call files, and catching successfully the ones that don't
> connect in a 'failed' extension. can anyone tell me how to find out the
> reason for the failure (ie busy, no answer).
>
> ${DIALSTATUS} doesn't appear to get set (presumably because Dial() isn't
> used) and channel_status doesn't seem to be any good.
>
> thanks in advance.
>
the event you received for OriginateFailure has a 'Reason: ' code.
that code breaks down as
0 = UNKNOWN FAILURE or DISCONNECT
3 = AST_CONTROL_RINGING (no answer)
5 = AST_CONTROL_BUSY
1 = AST_CONTROL_HANGUP
8 = AST_CONTROL_CONGESTION
More information about the asterisk-users
mailing list