[asterisk-commits] russell: trunk r321617 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 2 17:09:10 CDT 2011


Author: russell
Date: Thu Jun  2 17:09:05 2011
New Revision: 321617

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321617
Log:
Fix message destination extension.

Don't send all messages to 's'.  Get the destination from the request URI.
(Found using automated test cases).

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=321617&r1=321616&r2=321617
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Jun  2 17:09:05 2011
@@ -16044,10 +16044,11 @@
 		return;
 	}
 
+	copy_request(&p->initreq, req);
+
 	if (sip_cfg.auth_message_requests) {
 		int res;
 
-		copy_request(&p->initreq, req);
 		set_pvt_allowed_methods(p, req);
 		res = check_user(p, req, SIP_MESSAGE, e, XMIT_UNRELIABLE, addr);
 		if (res == AUTH_CHALLENGE_SENT) {
@@ -16084,6 +16085,8 @@
 			peer = unref_peer(peer, "from find_peer() in receive_message");
 		}
 	}
+
+	get_destination(p, NULL, NULL);
 
 	if (!(msg = ast_msg_alloc())) {
 		transmit_response(p, "500 Internal Server Error", req);




More information about the asterisk-commits mailing list