[asterisk-users] Help! How to get ANSWEREDTIME after DIAL a ZAP channel?

Charles Wang lazy.charles at gmail.com
Wed Feb 21 04:48:08 MST 2007


Dear Phil,

Thank you for your reply.

I have changed by extensions.conf as below.
And I also put my debug information for your reference.

It is a strange behavior. I got exited non-zero in it when I use ZAP channel.
If I use my SIP trunking gateway(outside), I got the return value is zero.

********** extensions.conf **************************************************
exten=> _00[1-9].,1,Dial(zap/g1/${EXTEN})
exten=> _00[1-9].,h,NoOP(ANSWEREDTIME=${ANSWEREDTIME})
exten=> _00[1-9].,102,Hangup

*******************************************************************************
myserver*CLI> agi debug
AGI Debugging Enabled
    -- Seeding '24012100' at 61.217.xxx.xxx:8400 for 60
    -- Accepting AUTHENTICATED call from 61.217.xxx.xxx:
       > requested format = ilbc,
       > requested prefs = (),
       > actual format = ilbc,
       > host prefs = (ilbc),
       > priority = mine
    -- Executing Dial("IAX2/24012100-1", "zap/g1/008621xxxxxxxx") in new stack
    -- Requested transfer capability: 0x00 - SPEECH
    -- Called g1/0028621xxxxxxxx
    -- Zap/29-1 is proceeding passing it to IAX2/24012100-1
    -- Zap/29-1 is ringing
    -- Zap/29-1 answered IAX2/24012100-1
    -- Hungup 'Zap/29-1'
  == Spawn extension (default, 008621xxxxxxxx, 1) exited non-zero on
'IAX2/24012100-1'
    -- Hungup 'IAX2/24012100-1'




2007/2/21, Phil Reynolds <phil at tinsleyviaduct.com>:
>
> Quoting Charles Wang <lazy.charles at gmail.com>:
>
> > Dear all,
> >
> > I tried to make a call with extensions.conf.
> >
> > exten=> _00[1-9].,1,Dial(zap/g1/${EXTEN})
> > exten=> _00[1-9].,2,NoOP(ANSWEREDTIME=${ANSWEREDTIME})
> > exten=> _00[1-9].,102,Hangup
> >
> > But the 2 and 102 will not be executed.
> >
> > So I can get the correct answered time via 2.
> >
> > Is any idea about it?
>
> The Dial() exits when the call is finished - then control passes to
> the h extension if present.
>
> Therefore, I think you need to put the NoOp in the h extension. It
> only continues at 2 if the Dial() times out.
>
> Not sure but that's how I understand it.
>
> --
> Phil Reynolds
>  o  ____ mail: phil at tinsleyviaduct.com
> |L_ \  / Web: http://www.tinsleyviaduct.com/phil/
> (_)- \/  Waltham 66, Emley Moor 69, Droitwich 79, Windows 95
>
>


-- 

Best Regards
Charles


More information about the asterisk-users mailing list