[asterisk-users] Re : Re : Re : Controlling calls

Adil Zaaraoui adilzeaaraoui at yahoo.fr
Mon Jun 7 14:21:11 CDT 2010


Back Steve,

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
    -- Hungup 'IAX2/400-13689'
  == Spawn extension (absolute-timeout-test, 777, 3) exited non-zero on 'IAX2/200-11946'
    -- Executing [T at absolute-timeout-test:1] Verbose("IAX2/200-11946", "1|[absolute-timeout-test:T]") in new stack
 [absolute-timeout-test:T]
    -- Executing [T at absolute-timeout-test:2] Hangup("IAX2/200-11946", "") in new stack
  == Spawn extension (absolute-timeout-test, T, 2) exited non-zero on 'IAX2/200-11946'
    -- Executing [h at absolute-timeout-test:1] Verbose("IAX2/200-11946", "1|[absolute-timeout-test:h]") in new stack
 [absolute-timeout-test:h]
    -- Executing [h at absolute-timeout-test:2] Hangup("IAX2/200-11946", "") in new stack
  == Spawn extension (absolute-timeout-test, h, 2) exited non-zero on 'IAX2/200-11946'
    -- Hungup 'IAX2/200-11946'



But the communication is still up, we hear each other :( .

If peer 400 does not answer the call, after 10 seconds the call (ringing), is terminated.

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))





________________________________
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, 19h 05min 09s
Objet : Re: [asterisk-users] Re :  Re :  Controlling calls

On Mon, 7 Jun 2010, Adil Zaaraoui wrote:

> We are logged using 200 account, it exists in IAX.conf, so user 200 
> calls 777, is that right i think?

Not "call" (implying dial()), "goto" a new context (so we have a "clean 
environment"), where we have a dial() command. You want to put the goto in 
the context that is set in iax.conf for 200.

> We did not write dial(IAX2/777|60) but i wrote what you wrote exten=> 
> 777,1, Goto(absolute-timeout-test,777,1) and we got the the result as 
> shown in the previous post. User 200, and 400 are registred and they 
> exist in iax.conf, so user 200 call 777, is that right?

> >  -- Executing [777 at IAX:1] Dial("IAX2/200-7016", "IAX2/777|60") in new stack

You executed dial. This is what a goto would look like:

>    -- Executing Goto("SIP/501-091068b0", "absolute-timeout-test|777|1") in new stack

> I catched ths S option, but i think this should be in my dialplan, not 
> in my script, because it goes with Dial application.

I think we should set the AGI aside until you have it working in the 
dialplan.

> But the S i can know it after i get minutes from my DB for the caller, 
> is there a way to save it in the script as a variable and get it in the 
> Dial extension.

Yes. Once you have this working in your dialplan with "hard-coded" values, 
you want to look through the documentation for your AGI library and see 
how to set a channel variable. I'm not a Java programmer and I don't know 
which library you are using, but I'm guessing it would look something like 
"getChannel().setChannelVariable('SECONDS-REMAINING', '60')." In the C 
library I wrote, it is 'agi_set_variable("STATUS", "SUCCESS").'

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users



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


More information about the asterisk-users mailing list