[Asterisk-Users] manager api: how to handle failed calls
Nicolás Gudiño
asternic at gmail.com
Sun Nov 14 07:52:14 MST 2004
Hello,
Comments inline..
> The question is how to correctly handle failed calls.
> In my application I want to make hundreds of outgoing calls automatically.
> When the callee pick up the phone he gets a playback message and give an
> acknowledge by means of dtmf code.
> I make use of manager command originate, something like
> Action:originate
> channel: ZAP/g1/XXXX
> Variable:X|Y|Z
> extension: test
> the extension test is something like
> [test]
> exten s,1 , wait ()
> exten s, 2 , answer ()
> exten s, 3 playback(XX)
> The problem is since I don't use the application dial inside the extension
> I cannot get any value from
> 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
> where test1 is:
> [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 see
> the variables set on the originate command.
> I wonder why not?
Maybe, (just maybe, I did not try it myself) the originate variables
are passed using asterisk CVS-HEAD and variable names prefixed with
underscore... Eg: Use variable _X instead of X in the originate
command. Let me know if it works.
Regards,
--
Nicolás Gudiño
Buenos Aires - Argentina
More information about the asterisk-users
mailing list