Commit 730d42f5 authored by Simon Morlat's avatar Simon Morlat

attempt a fix for mexico dial plans

parent 4fccaf7b
...@@ -158,6 +158,8 @@ static LinphoneDialPlan const dial_plans[]={ ...@@ -158,6 +158,8 @@ static LinphoneDialPlan const dial_plans[]={
{"Mauritius" ,"MU" , "230" , 7 , "00" }, {"Mauritius" ,"MU" , "230" , 7 , "00" },
{"Mayotte Island" ,"YT" , "262" , 9 , "00" }, {"Mayotte Island" ,"YT" , "262" , 9 , "00" },
{"Mexico" ,"MX" , "52" , 10 , "00" }, {"Mexico" ,"MX" , "52" , 10 , "00" },
/*The following is a pseudo dial plan for Mexican mobile phones. See https://en.wikipedia.org/wiki/Telephone_numbers_in_Mexico*/
{"Mexico" ,"MX" , "521" , 10 , "00" },
{"Micronesia" ,"FM" , "691" , 7 , "011" }, {"Micronesia" ,"FM" , "691" , 7 , "011" },
{"Moldova" ,"MD" , "373" , 8 , "00" }, {"Moldova" ,"MD" , "373" , 8 , "00" },
{"Monaco" ,"MC" , "377" , 8 , "00" }, {"Monaco" ,"MC" , "377" , 8 , "00" },
......
...@@ -127,6 +127,11 @@ static void phone_normalization_with_proxy(void) { ...@@ -127,6 +127,11 @@ static void phone_normalization_with_proxy(void) {
BC_ASSERT_STRING_EQUAL(phone_normalization(proxy, "0123456789"), "+990123456789"); BC_ASSERT_STRING_EQUAL(phone_normalization(proxy, "0123456789"), "+990123456789");
BC_ASSERT_STRING_EQUAL(phone_normalization(proxy, "01234567890"), "+991234567890"); BC_ASSERT_STRING_EQUAL(phone_normalization(proxy, "01234567890"), "+991234567890");
// Phone normalization for mexican dial plans
linphone_proxy_config_set_dial_prefix(proxy, "52");
BC_ASSERT_STRING_EQUAL(phone_normalization(proxy, "+5217227718184"), "+5217227718184"); /*this is a mobile phone number */
BC_ASSERT_STRING_EQUAL(phone_normalization(proxy, "+528127718184"), "+528127718184"); /*this is a landline phone number from Monterrey*/
linphone_proxy_config_unref(proxy); linphone_proxy_config_unref(proxy);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment