[asterisk-commits] jrose: branch 1.8 r412328 - in /branches/1.8: channels/ configs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 15 10:21:36 CDT 2014
Author: jrose
Date: Tue Apr 15 10:21:27 2014
New Revision: 412328
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=412328
Log:
Reverting r411189 so that it can be put up for public review
---
r411189 | jrose | 2014-03-26 10:50:48 -0500 (Wed, 26 Mar 2014) | 12 lines
chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)
Prior to 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)
---
Modified:
branches/1.8/channels/chan_sip.c
branches/1.8/configs/sip.conf.sample
Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=412328&r1=412327&r2=412328
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Tue Apr 15 10:21:27 2014
@@ -11394,6 +11394,7 @@
const char *fromdomain;
const char *privacy = NULL;
const char *screen = NULL;
+ const char *anonymous_string = "\"Anonymous\" <sip:anonymous at anonymous.invalid>";
if (!ast_test_flag(&p->flags[0], SIP_SENDRPID)) {
return 0;
@@ -11421,11 +11422,12 @@
lid_num = ast_uri_encode(lid_num, tmp2, sizeof(tmp2), 0);
if (ast_test_flag(&p->flags[0], SIP_SENDRPID_PAI)) {
- ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>", lid_name, lid_num, fromdomain);
+ 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));
- if ((lid_pres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED) {
- 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: branches/1.8/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/configs/sip.conf.sample?view=diff&rev=412328&r1=412327&r2=412328
==============================================================================
--- branches/1.8/configs/sip.conf.sample (original)
+++ branches/1.8/configs/sip.conf.sample Tue Apr 15 10:21:27 2014
@@ -1301,8 +1301,7 @@
;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 function CALLERPRES documentation for possible
- ; values.
+ ; See README.callingpres for more information
;[xlite1]
; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
More information about the asterisk-commits
mailing list