how can i confige the asterisk in spark, waiting online!!

Discussion created by godsun on Sep 6, 2006
Latest reply on Sep 7, 2006 by LG

in the "Asterisk-IM Plugin Readme" says:


Client API

The client API first requires that the Asterisk-IM server plugin is installed. To initialize the client do the following:


XMPPConnection conn = new XMPPConnection("myserver.foo.com", "user", "password");

PhoneClient client = new PhoneClient(conn);

Note that the XMPPConnection passed in must be authenticated. If an unauthenticated connection is passed in an exception will be thrown.



To listen for events, register an event listener with PhoneClient.addEventListener(..) method:


PhoneClient client = new PhoneClient(conn);

client.addEventListener(new BasePhoneEventListener() {


   // Override the handleRing event to see when we are receiving a call

   public void handleRing(RingEvent event) {

      log.info("receiving a call from " + event.getCallerID());





so where should i add these codes to?  help me?

in wihch files of spark?