[asterisk-dev] [svn-commits] mmichelson: branch 1.8 r370769 - in /branches/1.8/channels: ./ sip/ sip/include/

Paul Belanger paul.belanger at polybeacon.com
Mon Aug 6 08:40:48 CDT 2012


On 12-08-03 05:35 PM, SVN commits to the Digium repositories wrote:
> Author: mmichelson
> Date: Fri Aug  3 16:35:00 2012
> New Revision: 370769
>
> URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370769
> Log:
> Fix error in the "IPorHost" section of a SIP dialstring.
>
> This is based on the review request posted by Walter Doekes
> (referenced lower in the commit message)
>
> The main fix here is to treat the IPorHost portion of the dial
> string as a temporary outbound proxy. This ensures requests
> get sent to the proper location.
>
> Due to the age of the request, some parts were no longer relevant.
> For instance, the request moved outbound proxy parsing code into
> a single method. This is done in a previous commit, so it was not
> necessary to do again.
>
> Also, the review request fixed some errors with regards to request
> routing for CANCEL and ACK requests. This has also been fixed in
> more recent commits.
>
> (closes issue ASTERISK-19677)
> reported by Walter Doekes
>
> Review https://reviewboard.asterisk.org/r/1859
>
>
> Modified:
>      branches/1.8/channels/chan_sip.c
>      branches/1.8/channels/sip/config_parser.c
>      branches/1.8/channels/sip/include/sip.h
>
> 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=370769&r1=370768&r2=370769
> ==============================================================================
> --- branches/1.8/channels/chan_sip.c (original)
> +++ branches/1.8/channels/chan_sip.c Fri Aug  3 16:35:00 2012
> @@ -1513,7 +1513,7 @@
>   static const struct ast_sockaddr *sip_real_dst(const struct sip_pvt *p);
>   static void build_via(struct sip_pvt *p);
>   static int create_addr_from_peer(struct sip_pvt *r, struct sip_peer *peer);
> -static int create_addr(struct sip_pvt *dialog, const char *opeer, struct ast_sockaddr *addr, int newdialog, struct ast_sockaddr *remote_address);
> +static int create_addr(struct sip_pvt *dialog, const char *opeer, struct ast_sockaddr *addr, int newdialog);
>   static char *generate_random_string(char *buf, size_t size);
>   static void build_callid_pvt(struct sip_pvt *pvt);
>   static void change_callid_pvt(struct sip_pvt *pvt, const char *callid);
> @@ -1936,7 +1936,7 @@
>
>   	sip_pvt_lock(monitor_instance->subscription_pvt);
>   	ast_set_flag(&monitor_instance->subscription_pvt->flags[0], SIP_OUTGOING);
> -	create_addr(monitor_instance->subscription_pvt, monitor_instance->peername, 0, 1, NULL);
> +	create_addr(monitor_instance->subscription_pvt, monitor_instance->peername, 0, 1);
>   	ast_sip_ouraddrfor(&monitor_instance->subscription_pvt->sa, &monitor_instance->subscription_pvt->ourip, monitor_instance->subscription_pvt);
>   	monitor_instance->subscription_pvt->subscribed = CALL_COMPLETION;
>   	monitor_instance->subscription_pvt->expiry = when;
> @@ -3174,6 +3174,12 @@
>   /*! \brief Get default outbound proxy or global proxy */
>   static struct sip_proxy *obproxy_get(struct sip_pvt *dialog, struct sip_peer *peer)
>   {
> +	if (dialog && dialog->options && dialog->options->outboundproxy) {
> +		if (sipdebug) {
> +			ast_debug(1, "BLAH\n");
> +		}
> +		return dialog->options->outboundproxy;
> +	}
>   	if (peer && peer->outboundproxy) {
>   		if (sipdebug) {
>   			ast_debug(1, "OBPROXY: Applying peer OBproxy to this call\n");
>
A good BLAH to you.  Please use another debug log message in place of 
BLAH. Since 'BLAH' means so many things, BLAH might not BLAH able to 
BLAH BLAH BLAH are talking BLAH.

BLAH
-- 
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: 
https://twitter.com/pabelanger



More information about the asterisk-dev mailing list