[asterisk-commits] oej: trunk r58900 - in /trunk: ./
channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Mar 14 09:59:35 MST 2007
Author: oej
Date: Wed Mar 14 11:59:35 2007
New Revision: 58900
URL: http://svn.digium.com/view/asterisk?view=rev&rev=58900
Log:
Merged revisions 58848 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r58848 | oej | 2007-03-13 12:49:35 +0100 (Tue, 13 Mar 2007) | 10 lines
Merged revisions 58847 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r58847 | oej | 2007-03-13 12:45:52 +0100 (Tue, 13 Mar 2007) | 2 lines
Issue #9229 - No port in request URI on register to non default SIP ports (neelakantan)
........
................
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=58900&r1=58899&r2=58900
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Mar 14 11:59:35 2007
@@ -7838,7 +7838,17 @@
/* Fromdomain is what we are registering to, regardless of actual
host name from SRV */
- snprintf(addr, sizeof(addr), "sip:%s", S_OR(p->fromdomain, r->hostname));
+ if (!ast_strlen_zero(p->fromdomain)) {
+ if (r->portno && r->portno != STANDARD_SIP_PORT)
+ snprintf(addr, sizeof(addr), "sip:%s:%d", p->fromdomain, r->portno);
+ else
+ snprintf(addr, sizeof(addr), "sip:%s", p->fromdomain);
+ } else {
+ if (r->portno && r->portno != STANDARD_SIP_PORT)
+ snprintf(addr, sizeof(addr), "sip:%s:%d", r->hostname, r->portno);
+ else
+ snprintf(addr, sizeof(addr), "sip:%s", r->hostname);
+ }
ast_string_field_set(p, uri, addr);
p->branch ^= ast_random();
More information about the asterisk-commits
mailing list