<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hello Nicolas, first of all I want to thank you. You are the first guy
give me an answer. I already posted this issue two times but nobody was
interested in it.<br>
I tried your sugggestion but it doesn't work. In the mean time I
upgraded to v1.0.2 but things remain the same or even worse ( I have in
the log a new channel name OutgoingSpoolFailed but the behaviour is the
same).<br>
Any way perhaps I found a solution and I would like to ask what do you
think about it:<br>
This is the request:<br>
/bin/echo "Action: Originate";\<br>
/bin/echo "Channel: Local/XXXXX@chiamamezzi3";\<br>
/bin/echo "Variable:
callid=123456|number=XXXXX|url=pippo|menuid=FOP|redirectnum=YYYYY";\<br>
/bin/echo "Context: chiamamezzi3";\<br>
/bin/echo "Exten: s";\<br>
/bin/echo "Priority: 1";\<br>
/bin/echo "Callerid: Asterisk Automatic Wardial";\<br>
/bin/echo "Timeout: 10000";\<br>
/bin/echo "Async: True";\ ** this is important otherwise fail
extension doesn't work **<br>
/bin/echo "ActionId: 10";\<br>
<br>
This is the context <br>
[chiamamezzi3]<br>
exten => _.X,1,Dial(ZAP/g1/${EXTEN})<br>
exten => _.X,2,NoOp( _.X DIALSTATUS is ${DIALSTATUS}, number is
${number} )<br>
exten => _.X,3,SetGlobalVar(status=${DIALSTATUS})<br>
exten => s,1,Wait,1<br>
exten => s,2,Answer<br>
exten => s,3,DigitTimeout,5<br>
exten => s,4,ResponseTimeout,10<br>
exten => s,5,system(/prd/asterisk/log.sh "Variabili:
[menuid=${menuid}] [number=${number}] [redirectnum=${redirectnum}]
[url=${url}] [callid=${callid}]")<br>
exten => s,6,Goto(chiamamezzi-${menuid},s,1) <br>
exten => t,1,Goto(noanswer,s,1)<br>
exten => failed,1,NoOp( failed DIALSTATUS is ${status} number is
${number})<br>
exten => failed,2,Hangup()<br>
exten => h,1,Hangup()<br>
<br>
<br>
As I told you, If the call is ok dialplan goes on s, 1<br>
If the call fails I proceed on _.X,2 and 3 and I need to set a
globalvariable to let to handle it in the failed extension.<br>
It works but I don't know if it could work on multi request environment
. It would be much better to use a channel variable or even better, to
have DIALSTATUS directly available .<br>
Regards<br>
Luca Casavola<br>
<br>
<br>
Nicolás Gudiño wrote:<br>
<blockquote type="cite"
cite="mide7d413aa041114065239058045@mail.gmail.com">
<pre wrap="">Hello,
Comments inline..
</pre>
<blockquote type="cite">
<pre wrap=""> 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@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?
</pre>
</blockquote>
<pre wrap=""><!---->
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,
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>