caller/ee id cleanup

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15474 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2009-11-15 02:16:10 +00:00
1 parent f06f3a5de7
commit f05737e3ba
5 files changed
+60 -13

No files matched your search

+20
View File
@@ -308,6 +308,26 @@ switch_mutex_unlock(obj->flag_mutex);
#define switch_set_string(_dst, _src) switch_copy_string(_dst, _src, sizeof(_dst))
static inline char *switch_sanitize_number(char *number)
{
char *p = number, *q;
char warp[] = "/:";
int i;
if (!(strchr(p, '/') || strchr(p, ':') || strchr(p, '@'))) {
return number;
}
while((q = strrchr(p, '@'))) *q = '\0';
for(i = 0; i < strlen(warp); i++) {
while(p && (q = strchr(p, warp[i]))) p = q + 1;
}
return p;
}
static inline switch_bool_t switch_string_var_check(char *s, switch_bool_t disable)
{
char *p;