On 28-08-14 11:57, Positively Optimistic wrote:
Has anyone had success patching chan_sip.c so that Asterisk will
recognize the tel: header for RDNIS information?
exten = get_in_brackets(tmp);
if (!strncasecmp(exten, "sip:", 4)) {
exten += 4;
} else if (!strncasecmp(exten, "sips:", 5)) {
exten += 5;
} else {
ast_log(LOG_WARNING, "Huh? Not an RDNIS SIP header
(%s)?\n", exten);
return -1;
}
Audiocodes Mediant 2000 devices send this header as a tel:...
*[Aug 28 02:25:42] WARNING[1283][C-00001574] chan_sip.c: Huh? Not an
RDNIS SIP header (tel:41068558XX)?*
*
*
*(number obscured for privacy purposes)*
Not a dev but have you tried something like this (hope the formatting
stays sane):
exten = get_in_brackets(tmp);
if (!strncasecmp(exten, "sip:", 4)) {
exten += 4;
} else if (!strncasecmp(exten, "tel:", 4)) {
exten += 4;
} else if (!strncasecmp(exten, "sips:", 5)) {
exten += 5;
} else {
ast_log(LOG_WARNING, "Huh? Not an RDNIS SIP header (%s)?\n", exten);
return -1;
}
HTH,
Patrick
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users