[asterisk-commits] mmichelson: branch mmichelson/caller_id r384548 - /team/mmichelson/caller_id/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 2 13:09:08 CDT 2013
Author: mmichelson
Date: Tue Apr 2 13:09:05 2013
New Revision: 384548
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384548
Log:
Fix issues encountered during some tests.
* Put "sip" in the SIP URI for P-Asserted-Identity
* Don't vomit if a malformed P-Asserted-Identity arrives in a response.
Modified:
team/mmichelson/caller_id/res/res_sip_caller_id.c
Modified: team/mmichelson/caller_id/res/res_sip_caller_id.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/caller_id/res/res_sip_caller_id.c?view=diff&rev=384548&r1=384547&r2=384548
==============================================================================
--- team/mmichelson/caller_id/res/res_sip_caller_id.c (original)
+++ team/mmichelson/caller_id/res/res_sip_caller_id.c Tue Apr 2 13:09:05 2013
@@ -68,6 +68,10 @@
id_name_addr = (pjsip_name_addr *)pjsip_parse_uri(rdata->tp_info.pool,
header_content.ptr, header_content.slen, PJSIP_PARSE_URI_AS_NAMEADDR);
+
+ if (!id_name_addr) {
+ return -1;
+ }
set_id_from_nameaddr(id_name_addr, id);
@@ -193,7 +197,7 @@
ast_str_append(&pai_value, 0, "\"%s\" ", id->name.str);
}
- ast_str_append(&pai_value, 0, "<%s@%.*s", id->number.str, (int) pj_strlen(&uri->host),
+ ast_str_append(&pai_value, 0, "<sip:%s@%.*s", id->number.str, (int) pj_strlen(&uri->host),
pj_strbuf(&uri->host));
if (uri->port) {
More information about the asterisk-commits
mailing list