Positively Optimistic
2014-Aug-28 09:57 UTC
[asterisk-users] RDNIS with tel: vs. sip: header
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)* -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140828/8ffc377a/attachment.html>
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