[asterisk-users] Re : Re : Re : Re : Controlling calls
Adil Zaaraoui
adilzeaaraoui at yahoo.fr
Mon Jun 7 15:32:21 CDT 2010
Hi Steve,
You do really grasp Asterisk, it works, i added transfer=no in iax.conf for eithet users 200 and 400, and now it hangs up.
For the S option it works too, i write it like this :
exten=>888,1, Dial(IAX2/400, ,S(10))
For the script there is a method getChannel().setVariable(param1,param2).
now i stock the SECONDS-REMAINING in set Variable like this:
getChannel().setVariable("SECONDS-REMAINING","15").
and in the Dial i did
exten=>888,1, Dial(IAX2/400, ,S(${SECONDS-REMAINING}))
AND it works perfectly.
Thanks again Steve for sharing your knowledge.
RESPECTFULLY
________________________________
De : Steve Edwards <asterisk.org at sedwards.com>
À : Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
Envoyé le : Lun 7 juin 2010, 21h 45min 21s
Objet : Re: [asterisk-users] Re : Re : Re : Controlling calls
On Mon, 7 Jun 2010, Adil Zaaraoui wrote:
> Yes you were right, the " exten=> 777,1, Goto(absolute-timeout-test,777,1)" was not in the context 200, Now here is the output:
>
> -- Accepting AUTHENTICATED call from 192.168.1.34:
> > requested format = ulaw,
> > requested prefs = (),
> > actual format = ulaw,
> > host prefs = (ulaw|alaw),
> > priority = mine
> -- Executing [777 at IAX:1] Goto("IAX2/200-11946", "absolute-timeout-test|777|1") in new stack
> -- Goto (absolute-timeout-test,777,1)
> -- Executing [777 at absolute-timeout-test:1] Verbose("IAX2/200-11946", "1|[absolute-timeout-test:777]") in new stack
> [absolute-timeout-test:777]
> -- Executing [777 at absolute-timeout-test:2] Set("IAX2/200-11946", "TIMEOUT(absolute)=10") in new stack
> -- Channel will hangup at 2010-06-07 21:16:11 UTC.
> -- Executing [777 at absolute-timeout-test:3] Dial("IAX2/200-11946", "IAX2/400") in new stack
> -- Called 400
> -- Call accepted by 192.168.1.33 (format ulaw)
> -- Format for call is ulaw
> -- IAX2/400-13689 is ringing
> -- IAX2/400-13689 answered IAX2/200-11946
> -- Channel 'IAX2/200-11946' ready to transfer
> -- Channel 'IAX2/400-13689' ready to transfer
> -- Releasing IAX2/400-13689 and IAX2/200-11946
Now that we have simplified the environment, eliminated the AGI, and have some console output, we can see the problem.
Your Asterisk server is optimizing itself out of the path so IAX2/400 and IAX2/200 are talking directly to each other.
> But the communication is still up, we hear each other :( .
Packets are being exchanged directly between the two end points.
Your Asterisk server is no longer in control of the call and cannot hangup the call. If you wish to retain control, you need to disable transfer in iax.conf. Gee, who knew? It would be nice if Asterisk would warn you before it optimized itself out and there was a timer (absolute or S(x)) pending.
> I tried the S option and the L one, it stops the call, it just bip in the callee and the call is terminated. Here is how i used it : exten => 777,1,Dial(IAX2/400,S(10))
Please look at the dial command documentation. The second parameter is the timeout, the third is the options.
-- Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100607/88cedc43/attachment.htm
More information about the asterisk-users
mailing list