Charles Wang
2007-Feb-20 23:40 UTC
[asterisk-users] Help! How to get ANSWEREDTIME after DIAL a ZAP channel?
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? Is it the problem of my ZAP channel's configuration? My zapata.conf is as below: [channels] language=en context=default busydetect=no callprogress=no switchtype=euroisdn pridialplan=unknown prilocaldialplan=unknown overlapdial=yes signalling=pri_cpe usecallerid=yes hidecallerid=no callwaiting=yes usecallingpres=yes callwaitingcallerid=yes threewaycalling=yes transfer=yes cancallforward=yes callreturn=yes echocancel=yes echocancelwhenbridged=yes echotraining=yes rxgain=0.0 txgain=0.0 group=1 callgroup=1 pickupgroup=1 immediate=no channel => 1-15,17-31 -- Best Regards Charles
Charles Wang
2007-Feb-21 04:48 UTC
[asterisk-users] Help! How to get ANSWEREDTIME after DIAL a ZAP channel?
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@tinsleyviaduct.com>:> > Quoting Charles Wang <lazy.charles@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@tinsleyviaduct.com > |L_ \ / Web: http://www.tinsleyviaduct.com/phil/ > (_)- \/ Waltham 66, Emley Moor 69, Droitwich 79, Windows 95 > >-- Best Regards Charles
Charles Wang
2007-Feb-21 23:30 UTC
[asterisk-users] Help! How to get ANSWEREDTIME after DIAL a ZAP channel?
Dear Phil, The extension 'h' was a great idea although I still got the error "exited non-zero". Thank you for your help. Best regards, Charles 2007/2/21, Phil Reynolds <phil@tinsleyviaduct.com>:> > Quoting Charles Wang <lazy.charles@gmail.com>: > > > 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}) > > Still wrong... exten => h,1,NoOp... > > > exten=> _00[1-9].,102,Hangup > > This line is superfluous. > > -- > Phil Reynolds > o ____ mail: phil@tinsleyviaduct.com > |L_ \ / Web: http://www.tinsleyviaduct.com/phil/ > (_)- \/ Waltham 66, Emley Moor 69, Droitwich 79, Windows 95 > >-- Best Regards Charles