[asterisk-commits] jrose: branch 10 r342062 - in /branches/10: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 24 14:52:02 CDT 2011
Author: jrose
Date: Mon Oct 24 14:51:59 2011
New Revision: 342062
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=342062
Log:
Outbound SIP OPTIONS messages will now include fromuser of related peer.
This behavior matches up more closely with the way invite/register/etc are handled.
This patch also modifies some adjacent code for code style compliance. Pretty minor.
(closes issue ASTERISK-17616)
Reported by: Jeremy Kister
Patches:
chan_sip.c-options-fromuser-fix-v1.patch uploaded by Jeremy Kister (license #6232)
........
Merged revisions 342061 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/10/ (props changed)
branches/10/channels/chan_sip.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_sip.c?view=diff&rev=342062&r1=342061&r2=342062
==============================================================================
--- branches/10/channels/chan_sip.c (original)
+++ branches/10/channels/chan_sip.c Mon Oct 24 14:51:59 2011
@@ -26339,7 +26339,7 @@
return -1;
}
peer->call = dialog_ref(p, "copy sip alloc from p to peer->call");
-
+
p->sa = peer->addr;
p->recv = peer->addr;
copy_socket_data(&p->socket, &peer->socket);
@@ -26348,13 +26348,19 @@
ast_copy_flags(&p->flags[2], &peer->flags[2], SIP_PAGE3_FLAGS_TO_COPY);
/* Send OPTIONs to peer's fullcontact */
- if (!ast_strlen_zero(peer->fullcontact))
+ if (!ast_strlen_zero(peer->fullcontact)) {
ast_string_field_set(p, fullcontact, peer->fullcontact);
-
- if (!ast_strlen_zero(peer->tohost))
+ }
+
+ if (!ast_strlen_zero(peer->fromuser)) {
+ ast_string_field_set(p, fromuser, peer->fromuser);
+ }
+
+ if (!ast_strlen_zero(peer->tohost)) {
ast_string_field_set(p, tohost, peer->tohost);
- else
+ } else {
ast_string_field_set(p, tohost, ast_sockaddr_stringify_host_remote(&peer->addr));
+ }
/* Recalculate our side, and recalculate Call ID */
ast_sip_ouraddrfor(&p->sa, &p->ourip, p);
More information about the asterisk-commits
mailing list