powered by Jive Software

Incoming Call Managment

I have the beta 3.3 server and Spark 2.5.1 running just fine. The plugin appears and the management interface to astersik appears to by working. I see the defined phones in the Asterisk-IM tab and can dial calls through SPARk. What I can;t do is get a notification for incoming calls and the presence does not seem to work. I see this note in the asterisk-im readme but i;m not sur ewhat to do with it:

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());

}

});

The message in the readme only applies to developers who want to add support for Asterisk-IM to their clients.

With Spark it works out of the box.

How did you configure your phone mapping? Which channels did you use?

The fields are as follows:

usersname: test.user

device : SIP/4132412515

extension: 4132412515

callerid: 4132412515

I don;t see a refenrce to channels!

thanks

Sorry, channel is Asterisk speak for what Asterisk-IM calls a device, so in your case this is SIP/4132412515.

Your configuration looks good and as you are able to dial through Spark the connection to your Asterisk seems to work, too. So I don’‘t see any reason why call notification and presence updates don’'t work.

Did you check your presence in the Openfire admin UI while on the phone?

I did check this. Just made a call between to phones, left the call open and watched the status from the OpenFire admin console… it stayed green and “Available” thorughout the call… Also, should i get somekind of incoming call notice or screen popup from spark?

Please post what you see in the INFO log of Openfire.

2007.04.12 14:31:16 Initializing phone plugin

2007.04.12 14:31:16 Initializing Asterisk Manager connection

2007.04.12 14:31:16 Connecting to 10.240.2.154:5038

2007.04.12 14:31:16 Connected via Asterisk Call Manager/1.0

2007.04.12 14:31:16 Successfully logged in

2007.04.12 14:31:16 Determined Asterisk version: Asterisk 1.2

2007.04.12 14:31:16 Adding new channel SIP/3053515822-00887380

2007.04.12 14:31:16 Adding new channel SIP/10.230.230.100-0077cf60

2007.04.12 14:31:16 Adding new channel SIP/3053515005-0077fe00

2007.04.12 14:31:16 Adding new channel SIP/10.230.230.100-0099edd0

2007.04.12 14:31:16 Adding new channel SIP/3053515525-0069ddd0

2007.04.12 14:31:16 Adding new channel SIP/3053515282-00985840

2007.04.12 14:31:16 Adding new channel SIP/3053515287-009b8cc0

2007.04.12 14:31:16 Adding new channel SIP/10.230.230.100-008b97d0

2007.04.12 14:31:16 Adding new channel SIP/3053515523-007f92a0

2007.04.12 14:31:16 Adding new channel SIP/10.230.230.100-009335a0

2007.04.12 14:31:16 Adding new channel SIP/10.240.2.156-008a8da0

2007.04.12 14:31:16 Adding new channel SIP/3053515047-008798b0

2007.04.12 14:31:16 Adding new channel SIP/10.240.2.156-0068b8e0

2007.04.12 14:31:16 Adding new channel SIP/3053515287-008bd540

2007.04.12 14:31:16 Adding new channel SIP/10.240.2.156-007bbb40

2007.04.12 14:31:16 Adding new channel SIP/3053515812-00823e40

2007.04.12 14:31:16 Adding new channel SIP/10.240.2.156-00947b30

2007.04.12 14:31:16 Adding new channel SIP/3053513791-008a0a50

2007.04.12 14:31:16 Adding new channel SIP/10.240.2.156-00820530

2007.04.12 14:31:16 Adding new channel SIP/3053515535-008e79d0

2007.04.12 14:31:16 Adding new channel SIP/10.240.2.156-009b5e20

2007.04.12 14:31:16 Adding new channel SIP/3053515286-0091b050

2007.04.12 14:31:16 Adding new channel SIP/10.240.2.156-007db290

2007.04.12 14:31:16 Initializing done

2007.04.12 14:31:17 Starting transport service: aim

2007.04.12 14:31:17 Starting transport service: yahoo

2007.04.12 14:31:17 Starting transport service: msn

2007.04.12 14:32:42 OSCAR connection to 205.188.8.178:5190

2007.04.12 14:32:55 Registered david.thor@t5mapwake01/spark as dthor@msn.com in rosterless mode.

2007.04.12 14:41:02 Registered david.thor@t5mapwake01/spark as dthor@msn.com in rosterless mode.

2007.04.12 15:11:16 Registered david.thor@t5mapwake01/spark as dthor@msn.com in rosterless mode.

2007.04.12 15:12:43 OSCAR connection to 205.188.8.178:5190

2007.04.12 20:17:11 Registered ira.greenfield@t5mapwake01/spark as igreenfield@excite.com in rosterless mode.

2007.04.13 08:03:32 OSCAR connection to 205.188.8.177:5190

2007.04.13 16:42:23 OSCAR connection to 205.188.8.177:5190

2007.04.13 16:50:50 Registered nick.jarratt@t5mapwake01/spark as bandwannabe in rosterless mode.

2007.04.13 16:51:09 Registered nick.jarratt@t5mapwake01/spark as bandwannabe in rosterless mode.

2007.04.13 16:51:10 OSCAR connection to 64.12.28.161:5190

2007.04.13 16:52:23 OSCAR connection to 64.12.28.160:5190

2007.04.13 16:55:22 OSCAR connection to 205.188.8.177:5190

2007.04.13 16:55:49 Registered nick.jarratt@t5mapwake01/spark as bandwannabe in rosterless mode.

2007.04.13 16:55:49 OSCAR connection to 64.12.28.160:5190

2007.04.14 09:59:24 OSCAR connection to 205.188.8.178:5190

2007.04.15 15:54:05 Started multiplexer (unencrypted) socket on port: 5262

2007.04.15 15:57:45 Started component (unencrypted) socket on port: 5275

2007.04.15 16:06:27 OSCAR connection to 205.188.8.176:5190

2007.04.16 08:00:36 OSCAR connection to 205.188.8.178:5190

2007.04.16 08:29:10 OSCAR connection to 64.12.28.161:5190

2007.04.16 13:34:54 OSCAR connection to 205.188.8.178:5190

2007.04.16 13:37:16 OSCAR connection to 205.188.8.178:5190

2007.04.16 21:27:43 OSCAR connection to 205.188.8.177:5190

2007.04.17 08:35:08 OSCAR connection to 64.12.28.161:5190

2007.04.17 12:41:53 OSCAR connection to 64.12.28.162:5190

2007.04.17 12:45:53 OSCAR connection to 205.188.8.176:5190

2007.04.17 15:35:27 OSCAR connection to 205.188.8.178:5190

2007.04.17 15:43:16 OSCAR connection to 205.188.8.178:5190

2007.04.17 15:54:03 OSCAR connection to 205.188.8.177:5190

2007.04.17 19:54:11 OSCAR connection to 205.188.8.177:5190

2007.04.18 06:09:35 OSCAR connection to 205.188.8.177:5190

2007.04.18 07:41:30 OSCAR connection to 205.188.8.177:5190

So it correctly reconizes the channels like “SIP/3053515523”.

Place a call to SIP/4132412515 (if thats the device you configured) and watch the info log.

You should get something like this:

2007.04.21 17:25:30 Adding channel SIP/1310-0821b4e0(asterisk-9620-1177172740.259)

2007.04.21 17:25:30 OnPhoneTask called for user PhoneUser{id=1, username=’‘stefan.reuter’’}

I tried this and found no additonal entries added to teh log… I tried the conventional why by dialing the call on my hardphone and then the same call using the asterisk-im plugin to allow Spark to setup the call between my hardphone and the target phone… It’‘s as ig the only Asterisk Manager funtion that is being watched or provoked is for outbound call setup. It’'s as if its talking but not listen for events!

Then Asterisk is not sending these events.

Make sure your manager.conf is correct. Mine looks like this:

[general]

enabled = yes

port = 5038

bindaddr = 0.0.0.0

displayconnects = yes

timestampevents = yes

[asteriskim]

secret = somepassword

deny=0.0.0.0/0.0.0.0

permit=10.12.0.1/255.255.255.255

permit=127.0.0.1/255.255.255.255

read = system,call,log,verbose,command,agent,user

write = system,call,log,verbose,command,agent,user

its working now… thanks… I did have these in place but only as global defaults. As soon as i pasted them into the “record” for my manager account it started to work

read = system,call,log,verbose,command,agent,user

write = system,call,log,verbose,command,agent,user

Thanks again for your guidance

Message was edited by: dthor