Michael Collins
2007-Feb-01 18:28 UTC
[asterisk-users] API Originate Action - distinguishing between No Answer and Invalid phone number
I've discovered that when dialing out using API's Originate action, a no answer is considered a failed attempt, while a busy is considered a successful attempt. The problem I'm having is that when I dial an invalid number, say a disconnected number that gives a fast busy, my CDRs are identical to those generated by a no answer attempt. Is there a way to distinguish between a no answer and an invalid? For me, a 'failed' attempt is dialing an invalid number, and I'd like the CDRs to reflect that. I'd like a no answer to be as 'successful' as a busy. I'm familiar with the 'OriginateFailure' event and it's 'Reason' field, but I don't know how to get that reason into the CDR. Is that possible? Thanks, MC
Roi Stork
2007-Feb-01 19:30 UTC
[asterisk-users] API Originate Action - distinguishing between No Answer and Invalid phone number
On 2/1/07, Michael Collins <mcollins@fcnetwork.com> wrote:> > Is there a way to distinguish between a no answer and an invalid? For > me, a 'failed' attempt is dialing an invalid number, and I'd like the > CDRs to reflect that. I'd like a no answer to be as 'successful' as a > busy.The ${DIALSTATUS} channel variable stores the result of the dial attempt: http://www.voip-info.org/wiki-Asterisk+variable+DIALSTATUS You can store it on the CDR's userfield column using the cdr function: Set(CDR(userfield)=${DIALSTATUS}) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070201/1922ad8e/attachment.htm