Hi, Bkrous. One more question:<br>I see that in AsteriskTFOT2.pdf what it tell me to send ping action is:<br>"Action: Ping"<br>And Asterisk will send response back:<br>"Response: Pong"<br><br>But when I send "Action: Ping", there is nothing back to me. Untill I send<br>"Action: Ping<br>ActionID: xxxxxxxxxx"<br><br>Asterisk send response back:<br>"Response: Pong<br><div>ActionID: xxxxxxxxxx"<br><br>Should I contain actionID in the requset? And how long is the interval between Pings? 20 seconds?<br><br></div><div style="padding: 2px 0pt; font-size: 12px; font-family: Arial Narrow;">------------------ Original ------------------</div><div style="font-size: 12px;"><div id="menu_sender"><b>From: </b> "bkruse"<bkruse@digium.com>;</div><div><b>Date: </b> Wed, Oct 8, 2008 01:28 AM</div><div><b>To: </b> "Asterisk Developers Mailing List"<asterisk-dev@lists.digium.com>; </div><div></div><div><b>Subject: </b> Re: [asterisk-dev] How to keep the connectionwith AMIinterfaceactive?</div></div><div> </div>
<div style="font-weight: normal;">
<br>I am sorry, I should have been monitoring closer.<br><br>All you have to do is keep your session ID that is handed out to you on <br>the handshake of logging in, and ping the manager interface.<br><br>The session should not expire (I do not think), until Asterisk is <br>stopped/started, etc.<br><br>You can get a full example of the web related manager abilities in <br>config/js/astman.js or pbx.js<br>(Javascript routines for Accessing manager and manipulating the Data. <br>Same can be used in Java)<br><br>-bk<br><br>caif~ wrote:<br>> Hi, Alwin<br>> I am looking into Ping action. Below is what I found from <br>> http://www.the-asterisk-book.com/unstable/manager-interface-ajam.html.<br>><br>> "Ping<br>> When accessing the AJAM with an AJAX application, the ping command is <br>> particularly useful for keeping authenticated connections alive."<br>><br>> I don't know is it useful for Java application.<br>> <br>> ------------------ Original ------------------<br>> *From: * "Alwin Chan"<alwin@qubeconnect.com>;<br>> *Date: * Tue, Oct 7, 2008 10:29 AM<br>> *To: * "Asterisk Developers Mailing List"<asterisk-dev@lists.digium.com>;<br>> *Subject: * Re: [asterisk-dev] How to keep the connection with <br>> AMIinterfaceactive?<br>> <br>> Hi caif,<br>><br>> You may want to look into the "Ping" action in AMI, see<br>> http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Ping<br>><br>> On Tue, Oct 7, 2008 at 09:29, caif~ <caif@qq.com> wrote:<br>> > Thank you Kevin!<br>> > I added a thread to send ping action to Asterisk every 60 seconds, <br>> but the<br>> > problem goes on.<br>> > Is 60 seconds too long fot keeping active? Or just sending ping is not<br>> > enough?<br>> > What could I do to keep a connection active forever except Asterisk <br>> stopped?<br>> > I do think if there is no way to do that, any program for AMI is<br>> > meaningless. None will put up with a software that need to be <br>> restart every<br>> > few hours.<br>> ><br>> > There must be a solution but I don't know, could any one give me <br>> some help?<br>> > Thank you very much!<br>> ><br>> > ------------------ Original ------------------<br>> > From: "Kevin P. Fleming"<kpfleming@digium.com>;<br>> > Date: Mon, Oct 6, 2008 09:12 PM<br>> > To: "Asterisk Developers Mailing List"<asterisk-dev@lists.digium.com>;<br>> > Subject: Re: [asterisk-dev] How to keep the connection with AMI<br>> > interfaceactive?<br>> ><br>> > caif~ wrote:<br>> ><br>> >> Dose Asterisk AMI close the connection with my program after a few <br>> hours?<br>> >> Do I need to keep sending ping to keep the connection active?<br>> ><br>> > Yes, and yes.<br>> ><br>> > --<br>> > Kevin P. Fleming<br>> > Director of Software Technologies<br>> > Digium, Inc. - "The Genuine Asterisk Experience" (TM)<br>> ><br>> > _______________________________________________<br>> > --Bandwidth and Colocation Provided by http://www.api-digital.com--<br>> ><br>> > AstriCon 2008 - September 22 - 25 Phoenix, Arizona<br>> > Register Now: http://www.astricon.net<br>> ><br>> > asterisk-dev mailing list<br>> > To UNSUBSCRIBE or update options visit:<br>> > http://lists.digium.com/mailman/listinfo/asterisk-dev<br>> > _______________________________________________<br>> > --Bandwidth and Colocation Provided by http://www.api-digital.com--<br>> ><br>> > AstriCon 2008 - September 22 - 25 Phoenix, Arizona<br>> > Register Now: http://www.astricon.net<br>> ><br>> > asterisk-dev mailing list<br>> > To UNSUBSCRIBE or update options visit:<br>> > http://lists.digium.com/mailman/listinfo/asterisk-dev<br>> ><br>><br>><br>><br>> -- <br>> Regards,<br>> Alwin Chan<br>> Technical Lead of Software Development<br>> QubeConnect - "Communications Begin With Us"<br>><br>> _______________________________________________<br>> --Bandwidth and Colocation Provided by http://www.api-digital.com--<br>><br>> AstriCon 2008 - September 22 - 25 Phoenix, Arizona<br>> Register Now: http://www.astricon.net<br>><br>> asterisk-dev mailing list<br>> To UNSUBSCRIBE or update options visit:<br>> http://lists.digium.com/mailman/listinfo/asterisk-dev<br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> --Bandwidth and Colocation Provided by http://www.api-digital.com--<br>><br>> AstriCon 2008 - September 22 - 25 Phoenix, Arizona<br>> Register Now: http://www.astricon.net<br>><br>> asterisk-dev mailing list<br>> To UNSUBSCRIBE or update options visit:<br>> http://lists.digium.com/mailman/listinfo/asterisk-dev<br><br><br>_______________________________________________<br>--Bandwidth and Colocation Provided by http://www.api-digital.com--<br><br>AstriCon 2008 - September 22 - 25 Phoenix, Arizona<br>Register Now: http://www.astricon.net<br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:<br> http://lists.digium.com/mailman/listinfo/asterisk-dev</div>