Dial such number from spark, e.g "031 123 45 67", "+41 31 123 45 67"

Hello,

At the moment, spark is not able to dial numbers containing spaces or a leadind +. I tried to patch AsteriskPhoneManager.java, but it does not work

— AsteriskPhoneManager.java.old 2006-05-08 23:40:13.000000000 +0200

+++ AsteriskPhoneManager.java 2006-05-09 22:50:20.000000000 +0200

@@ -152,6 +152,8 @@

throw new PhoneException(“User has not identified a number with himself”);

}

  •    extension = extension.replaceAll( "
    

s+", “” );

  •    extension = extension.replaceAll( "^
    

+" , “00” );

dial(username, extension, target);

}

Any ideas?

Greets

Jean-Marc

Ok I patched at the wrong place. Here is the correct patch and it works.

Perhaps this could be included in the next version of asterisk-im

+++ AsteriskPhoneManager.java 2006-05-15 14:17:03.000000000 +0200

@@ -307,6 +307,8 @@

action.setChannel(primaryDevice.getDevice());

action.setCallerId(primaryDevice.getCallerId() != null ? primaryDevice.getCallerId() :

getProperty(Properties.DEFAULT_CALLER_ID, “”));

  •        extension = extension.replaceAll( "
    

s+", “” );

  •        extension = extension.replaceAll( "^
    

+", “00” );

action.setExten(extension);

String context = getProperty(Properties.CONTEXT, DEFAULT_CONTEXT);

if ("".equals(context)) {

Greets jm

Thanks for the patch. This has been fixed in subversion trunk.