[asterisk-users] outgoing call file and agi detect busy
Rob Hillis
rob at hillis.dyndns.org
Thu Aug 7 09:26:26 CDT 2008
Jerry Geis wrote:
> Jerry Geis wrote:
>
>> I am using asterisk 1.4.21 with outgoing call files.
>>
>> I am call a line that is busy as you can see below.
>> How can my AGI ask what the status of the last call was
>> so I can tell if there was NO ANSWER or it was BUSY?
>>
>> Thanks,
>>
>> Jerry
>>
>> -- Attempting call on SIP/401 for
>> smvoice_callprogress at smvoice-dialout:1 (Retry 1)
>> -- Got SIP response 486 "Busy" back from 192.168.1.161
>> > Channel SIP/401-15aa5ab0 was never answered.
>> -- Executing [failed at smvoice-dialout:1] AGI("OutgoingSpoolFailed",
>> "smvoice") in new stack
>> -- Launched AGI Script /var/lib/asterisk/agi-bin/smvoice
>> == Spawn extension (smvoice-dialout, failed, 1) exited non-zero on
>> 'OutgoingSpoolFailed'
>> [Aug 7 09:20:56] NOTICE[11272]: pbx_spool.c:341 attempt_thread: Call
>> failed to go through, reason (5) Remote end is Busy
>>
>>
>>
> I am trying to inquire ${DIALSTATUS} from both the agi and the dial plan
> and it is not set.
>
> exten => failed,1,noop(${DIALSTATUS})
> exten => failed,2,agi(smvoice,-digium_failed)
>
>
> -- Attempting call on SIP/401 for
> smvoice_callprogress at smvoice-dialout:1 (Retry 1)
> -- Got SIP response 486 "Busy" back from 192.168.1.161
> > Channel SIP/401-15ac2dd0 was never answered.
> -- Executing [failed at smvoice-dialout:1] NoOp("OutgoingSpoolFailed",
> "") in new stack
> -- Executing [failed at smvoice-dialout:2] AGI("OutgoingSpoolFailed",
> "smvoice|-digium_failed") in new stack
> -- Launched AGI Script /var/lib/asterisk/agi-bin/smvoice
> == Spawn extension (smvoice-dialout, failed, 2) exited non-zero on
> 'OutgoingSpoolFailed'
>
>
> As you can see above the call was BUSY, the dialplan should be showing
> ${DIALSTATUS}
> and it is empty. What am I not doing to get the resulting dial status?
>
Call files spawn a completely new channel that your AGI most likely
isn't going to be able to track. Since the call is a completely new
channel, the DIALSTATUS variable for this channel will not be visible to
your original channel. You may want to look at using the Originate
action from within the manager API.
http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Originate
More information about the asterisk-users
mailing list