[asterisk-commits] jrose: trunk r411194 - in /trunk: ./ channels/chan_sip.c configs/sip.conf.sample
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 26 11:15:16 CDT 2014
Author: jrose
Date: Wed Mar 26 11:15:12 2014
New Revision: 411194
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411194
Log:
chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)
Prior too this patch, the P-Asserted-Identity header would include anonymous
caller id information which seems to go against the point of the
P-Asserted-Identity header. Now the real caller ID information will be
included in this header. Also, no privacy header would be included.
This patch adds 'Privacy: id' to outgoing SIP messages that include the
P-Asserted-Identity header.
(closes issue AST-1301)
........
Merged revisions 411189 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 411190 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 411193 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
trunk/configs/sip.conf.sample
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=411194&r1=411193&r2=411194
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Mar 26 11:15:12 2014
@@ -12645,7 +12645,6 @@
const char *fromdomain;
const char *privacy = NULL;
const char *screen = NULL;
- const char *anonymous_string = "\"Anonymous\" <sip:anonymous at anonymous.invalid>";
struct ast_party_id connected_id;
if (!ast_test_flag(&p->flags[0], SIP_SENDRPID)) {
@@ -12671,12 +12670,11 @@
lid_num = ast_uri_encode(lid_num, tmp2, sizeof(tmp2), ast_uri_sip_user);
if (ast_test_flag(&p->flags[0], SIP_SENDRPID_PAI)) {
+ ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>", lid_name, lid_num, fromdomain);
+ add_header(req, "P-Asserted-Identity", ast_str_buffer(tmp));
if ((lid_pres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED) {
- ast_str_set(&tmp, -1, "%s", anonymous_string);
- } else {
- ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>", lid_name, lid_num, fromdomain);
- }
- add_header(req, "P-Asserted-Identity", ast_str_buffer(tmp));
+ add_header(req, "Privacy", "id");
+ }
} else {
ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>;party=%s", lid_name, lid_num, fromdomain, p->outgoing_call ? "calling" : "called");
Modified: trunk/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=411194&r1=411193&r2=411194
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Wed Mar 26 11:15:12 2014
@@ -1431,7 +1431,8 @@
;allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
;allow=g729 ; Pass-thru only unless g729 license obtained
;callingpres=allowed_passed_screen ; Set caller ID presentation
- ; See README.callingpres for more information
+ ; See function CALLERPRES documentation for possible
+ ; values.
;[xlite1]
; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
More information about the asterisk-commits
mailing list