[asterisk-users] RDNIS with tel: vs. sip: header
Patrick Laimbock
patrick at laimbock.com
Thu Aug 28 07:01:52 CDT 2014
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
More information about the asterisk-users
mailing list