powered by Jive Software

Unable to succesfully dial

I’'m running Asterisk 1.2.5, Wildfire 2.6.0 from the 4/7/06 nightly build and the latest asterisk-im from SVN. Smack is ver 2.1.0.

When we try to perform a dial from the spark GUI (in this case, extension 1004, but all attempte to dial fail), a dialog appears that says ‘‘Calling 1004’’, and it just hangs.

I checked the Smack debug window, and the outbound message for the dial event is:

So something is definitely going wrong (Spark really should put up an error message here, but that’'s a small detail).

We are connecting to the Asterisk server itself (had to use IP address, and not host name) - the connection log messages appear in the logs and I can see our phone extensions in the plugin configuration web page.

Further, if I receive a call, Spark does put up the popup with ‘‘incoming call’’, and counts the duration of the call - so asterisk events are being received. It just seems like the dial command is failing.

The context should be set properly (it is a context that allows internal calls) - is it possible that something needs to be set in the dial command variables?

Thanks in advance for any help,

  • K

Found the problem. There is a bug in the org.jivesoftware.phone.asterisk.AsteriskPhoneManager class. If the dial command variables are empty, they can get posted as an empty string instead of not being posted at all (I believe that this is dependent on the browser). If that happens, then you wind up with an ArrayIndexOutOfBounds exception at line 328/329.

The fix is simple, but I don’‘t see a decent way of submitting patches, so I’'ll just include the patch in this posting:

Index: C:/Program Files/Eclipse Data/workspace/asterisk-im/server/src/java/org/jivesoftware/phone/asterisk/Aste riskP honeManager.java

===================================================================

— C:/Program Files/Eclipse Data/workspace/asterisk-im/server/src/java/org/jivesoftware/phone/asterisk/Aste riskP honeManager.java (revision 3732)

+++ C:/Program Files/Eclipse Data/workspace/asterisk-im/server/src/java/org/jivesoftware/phone/asterisk/Aste riskP honeManager.java (working copy)

@@ -316,9 +316,9 @@

action.setContext(context);

action.setPriority(1);

  • String variables = getProperty(Properties.DIAL_VARIABLES);
  • String variables = getProperty(Properties.DIAL_VARIABLES).trim();
  • if (variables != null) {
  • if (variables != null && !"".equals(variables)) {

String[] varArray = variables.split(",");

Thanks for this fix. This has been applied in svn trunk.In the future you can attach patches to the thread as an attachment. I gave you attach access.

Message was edited by: andrew