linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Linphone Iphone : Corrupt contact phone number


From: Luis Soltero
Subject: Re: [Linphone-developers] Linphone Iphone : Corrupt contact phone numbers with space
Date: Sat, 19 Jul 2014 00:57:35 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


here is a patch which will fix your problem...

Index: Classes/ContactDetailsTableViewController.m
===================================================================
--- Classes/ContactDetailsTableViewController.m    (revision 3935)
+++ Classes/ContactDetailsTableViewController.m    (revision 3939)
@@ -636,11 +636,20 @@
         }
         if(dest != nil) {
             NSString *displayName = [FastAddressBook getContactDisplayName:contact];
+           
+            // only dial digits.  the iOS address book uses extended characters which causes issues with asterisk.
+            // added by Luis Soltero
+            NSMutableString *digits = [[NSMutableString alloc] init];
+            for (int i=0; i<[dest length]; i++) {
+                if (isdigit([dest characterAtIndex:i]) || [dest characterAtIndex:i] == '+') {
+                    [digits appendFormat:@"%c",[dest characterAtIndex:i]];
+                }
+            }
             if([ContactSelection getSelectionMode] != ContactSelectionModeMessage) {
                 // Go to dialer view
                 DialerViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController);
                 if(controller != nil) {
-                    [controller call:dest displayName:displayName];
+                    [controller call:digits displayName:displayName];
                 }
             } else {
                 // Go to Chat room view

On 7/18/14, 3:23 AM, Leonard Fodje wrote:
All,
 
Storing a contact’s number in iphone is automatically formated with spaces. Calling such numbers with Linphone, Linphone adds some strange characters in the place of those spaces and the call fails.  Is there a way to make linphone clean the sip uri before dialing or can we do the cleaning on the switch side such as in an asterisk dialplan?
 
E.g an IOS contact with number 011 23 1234, Linphone will dial 011▒23▒1234
 
Any help?
 
Thanks,
 
Leonard
 
 


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

-- 


Luis Soltero, Ph.D., MCS
Director of Software Development, CTO
Global Marine Networks, LLC
StarPilot, LLC
Tel: +1.865.379.8723
Fax: +1.865.681.5017
E-Mail: address@hidden
Web: http://www.globalmarinenet.net
Web: http://www.redportglobal.com
Web: http://www.starpilotllc.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]