rcsdiff -r1.1 -u chan_sip.c =================================================================== RCS file: RCS/chan_sip.c,v retrieving revision 1.1 diff -u -r1.1 chan_sip.c --- chan_sip.c 2010/12/23 21:56:53 1.1 +++ chan_sip.c 2010/12/24 14:28:40 @@ -136,7 +136,7 @@ #include "asterisk.h" -ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.1 $") +ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.3 $") #include #include @@ -4056,9 +4056,9 @@ char *c, *dom = ""; if ((c = strchr(uri, '@')) == NULL) { - /* domain-only URI, according to the SIP RFC. */ - dom = uri; - name = ""; + /* TEL INVITE does not have a domain */ + dom = ""; + name = uri; } else { *c++ = '\0'; dom = c; @@ -12524,6 +12524,8 @@ if (!ast_strlen_zero(from)) { if (!strncasecmp(from, "sip:", 4)) { from += 4; + } else if (!strncasecmp(from, "tel:", 4)) { + from += 4; } else if (!strncasecmp(from, "sips:", 5)) { from += 5; } else { @@ -13342,6 +13344,8 @@ char *t = uri2; if (!strncasecmp(t, "sip:", 4)) t+= 4; + else if (!strncasecmp(t, "tel:", 4)) + t += 4; else if (!strncasecmp(t, "sips:", 5)) t += 5; ast_string_field_set(p, exten, t); @@ -13356,7 +13360,7 @@ /* ignore all fields but name */ - if (parse_uri(of, "sip:,sips:", &of, &dummy, &domain, &dummy, &dummy, NULL)) { + if (parse_uri(of, "sip:,tel:,sips:", &of, &dummy, &domain, &dummy, &dummy, NULL)) { ast_log(LOG_NOTICE, "From address missing 'sip:', using it anyway\n"); }