Well thanks Stefan, for the help but when I am executing the AGI script I am getting the errors as below:
Aug 5, 2005 3:29:44 AM net.sf.asterisk.util.impl.JavaLoggingLog info INFO: Received connection. Aug 5, 2005 3:29:45 AM net.sf.asterisk.util.impl.JavaLoggingLog error SEVERE: Unable to create AGIScript instance of type HelloScript Aug 5, 2005 3:29:45 AM net.sf.asterisk.util.impl.JavaLoggingLog error SEVERE: No script configured for agi://65.125.224.207/bharat.agi What does it mean by "No Script configured for agi://" and can you please tell me how do I come up with this error? Regards, Bharat M. Sarvan Software Engineer - VoIP EZZI BPO Pvt Ltd., PUNE. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stefan Reuter Sent: Friday, August 05, 2005 6:18 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] SIPPeersAction class file not found in theAsterisk-java.jar file On Thu, 2005-08-04 at 18:25 +0530, Bharat M. Sarvan wrote: > I am working on Fastagi and I am making use of > Asterisk-java. But I don't find the class file for SIPPeersAction. The SIPPeersAction is not part of Asterisk-Java 0.1, it is available in CVS-HEAD only. Besides that the action classes in net.sf.asterisk.manager.action can only be used with the Manager API and not with FastAGI. So if you want to retrieve a list of sip peers you need to do that via the Manager API. With Asterisk 1.0.x and Asterisk-Java 0.1 you can do this via the CommandAction. Only if you are already using Asterisk CVS-HEAD and Asterisk-Java CVS-HEAD you can use the new SipPeerAction. Example with CommandAction: import java.util.Iterator; import net.sf.asterisk.manager.ManagerConnection; import net.sf.asterisk.manager.ManagerConnectionFactory; import net.sf.asterisk.manager.action.CommandAction; import net.sf.asterisk.manager.response.CommandResponse; public class Manager { private ManagerConnection c; public Manager() throws Exception { c = new ManagerConnectionFactory().getManagerConnection("host", "user", "pass"); } public void run() throws Exception { c.login(); CommandAction action; CommandResponse response; Iterator lineIterator; action = new CommandAction(); action.setCommand("sip show peers"); response = (CommandResponse) c.sendAction(action); lineIterator = response.getResult().iterator(); while (lineIterator.hasNext()) { System.out.println(lineIterator.next()); } c.logoff(); } public static void main(String[] args) throws Exception { new Manager().run(); } } This produces something like: Name/username Host Dyn Nat ACL Mask Port Status 1313/1313 10.13.0.61 D A 255.255.255.255 5061 Unmonitored 1312/1312 10.13.0.61 D A 255.255.255.255 5061 Unmonitored 1311/1311 10.13.0.61 D A 255.255.255.255 5061 Unmonitored 1310/1310 (Unspecified) D A 255.255.255.255 0 Unmonitored 1303/1303 (Unspecified) D N 255.255.255.255 0 Unmonitored 1302/1302 (Unspecified) D A 255.255.255.255 0 Unmonitored 1301/1301 (Unspecified) D A 255.255.255.255 0 Unmonitored =Stefan _______________________________________________ Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
