[asterisk-commits] file: branch 11 r411022 - in /branches/11: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 24 16:37:30 CDT 2014
Author: file
Date: Mon Mar 24 16:37:26 2014
New Revision: 411022
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411022
Log:
chan_sip: Always use fromdomain if set for domain, even if callerid is set to restricted.
(closes issue ASTERISK-20841)
Reported by: Kelly Goedert
........
Merged revisions 411021 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/11/ (props changed)
branches/11/channels/chan_sip.c
Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_sip.c?view=diff&rev=411022&r1=411021&r2=411022
==============================================================================
--- branches/11/channels/chan_sip.c (original)
+++ branches/11/channels/chan_sip.c Mon Mar 24 16:37:26 2014
@@ -13819,7 +13819,9 @@
snprintf(p->lastmsg, sizeof(p->lastmsg), "Init: %s", sip_methods[sipmethod].text);
- d = S_OR(p->fromdomain, ast_sockaddr_stringify_host_remote(&p->ourip));
+ if (ast_strlen_zero(p->fromdomain)) {
+ d = ast_sockaddr_stringify_host_remote(&p->ourip);
+ }
if (p->owner) {
connected_id = ast_channel_connected_effective_id(p->owner);
@@ -13869,6 +13871,12 @@
n = p->fromname;
else /* Save for any further attempts */
ast_string_field_set(p, fromname, n);
+
+ /* Allow domain to be overridden */
+ if (!ast_strlen_zero(p->fromdomain))
+ d = p->fromdomain;
+ else /* Save for any further attempts */
+ ast_string_field_set(p, fromdomain, d);
ast_copy_string(tmp_l, l, sizeof(tmp_l));
if (sip_cfg.pedanticsipchecking) {
More information about the asterisk-commits
mailing list