]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm - SS7:* is now transmitted as 0x0b in Called Party Number
authorDavid Yat Sin <dyatsin@sangoma.com>
Tue, 17 May 2011 14:27:49 +0000 (10:27 -0400)
committerDavid Yat Sin <dyatsin@sangoma.com>
Tue, 17 May 2011 14:27:49 +0000 (10:27 -0400)
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c

index a60a6c48ed3280da12561ef0f38daa61e2e436cf..3ebd162f09bfd5d35a5850c8e95995bcf16a2a72 100644 (file)
@@ -586,10 +586,17 @@ ftdm_status_t copy_tknStr_to_sngss7(char* val, TknStr *tknStr, TknU8 *oddEven)
 
                /* check if the digit is a number and that is not null */
                while (!(isxdigit(tmp[0])) && (tmp[0] != '\0')) {
-                       SS7_INFO("Dropping invalid digit: %c\n", tmp[0]);
-                       /* move on to the next value */
-                       k++;
-                       tmp[0] = val[k];
+                       if (tmp[0] == '*') {
+                               /* Could not find a spec that specifies this , but on customer system, * was transmitted as 0x0b */
+                               SS7_DEBUG("Replacing * with 0x0b");
+                               k++;
+                               tmp[0] = 0x0b;
+                       } else {
+                               SS7_INFO("Dropping invalid digit: %c\n", tmp[0]);
+                               /* move on to the next value */
+                               k++;
+                               tmp[0] = val[k];
+                       }
                } /* while(!(isdigit(tmp))) */
 
                /* check if tmp is null or a digit */
@@ -1350,10 +1357,17 @@ ftdm_status_t encode_subAddrIE_nat(const char *subAddr, char *subAddrIE, int typ
 
                /* confirm it is a hex digit */
                while ((!isxdigit(tmp[0])) && (tmp[0] != '\0')) {
-                       SS7_INFO("Dropping invalid digit: %c\n", tmp[0]);
-                       /* move to the next character in subAddr */
-                       x++;
-                       tmp[0] = subAddr[x];
+                       if (tmp[0] == '*') {
+                               /* Could not find a spec that specifies this, but on customer system, * was transmitted as 0x0b */
+                               SS7_DEBUG("Replacing * with 0x0b");
+                               x++;
+                               tmp[0] = 0x0b;
+                       } else {
+                               SS7_INFO("Dropping invalid digit: %c\n", tmp[0]);
+                               /* move to the next character in subAddr */
+                               x++;
+                               tmp[0] = subAddr[x];
+                       }
                }
 
                /* check if tmp is null or a digit */