[Asterisk-Users] Originate : how to handle failed calls

Luca Casavola luca at softpi.it
Fri Nov 12 11:02:48 MST 2004


Hello all,
I am still faced with the same problem since long time:
How to correctly handle failed calls.

In my application I call hundreds of phones in small amount of times.
When the called pick up the phone he gets a playback message.
I am making use of manager command originate, something like
Action:originate
channel: ZAP/g1/XXXX
Variable:X|Y|Z
extension: test
the extension test is someting like
[test]
exten  s,1 , wait
exten  s, 2 , answer
exten s, 3 playback(XX)
The problem is since I don't use the call inside the extension I 
cannot'handle
the DIALSTATUS or HANGUPCAUSE variable
I tried several strategies:
1)
change the logic and use local pseudo channel
In the originate command if I use channel: local/XXXXX at test1/n
and make use of an extension like
[test1]
exten => _.,1,Dial(ZAP/g1/g${EXTEN})
exten => _.,2,NoOp( 2 HANGUPCAUSE is ${HANGUPCAUSE})
exten => _.,3,NoOp( 2 DIALSTATUS is ${DIALSTATUS})
exten => _.,4,NoOp(  number is ${number})
exten => _.,5,Hangup

I got the correct HANGUP value ( ie BUSY) but unfortunately  I cannot 
use the
variable set in the originate command. why?

2)

I tried to use the Async=True parameter in the originate command and 
magically
* make a goto to extent failed.
Unfortunately in that extension I can't see any value in HANGUPCAUSE or
DIALSTATUS. Why?

So how can know what is going on when a call fail?

Regards
Luca Casavola
Software Products Italia srl

-- 

Ing. Luca Casavola
(Technical Manager)

Software Products Italia
Milano / Roma / Firenze

tel. ++39 055/33651
fax  ++39 055/340558
e-mail: luca.casavola at softpi.it
   www: http://www.softpi.it


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041112/da300ff7/attachment.htm


More information about the asterisk-users mailing list