[asterisk-dev] Re: [asterisk-commits] oej: branch 1.4 r46252 - /branches/1.4/channels/chan_sip.c

Johansson Olle E olle at voop.com
Wed Oct 25 23:10:35 MST 2006


26 okt 2006 kl. 08.00 skrev Luigi Rizzo:

> On Wed, Oct 25, 2006 at 07:16:11PM -0000, asterisk- 
> commits at lists.digium.com wrote:
>> Author: oej
>> Date: Wed Oct 25 14:16:10 2006
>> New Revision: 46252
>>
>> URL: http://svn.digium.com/view/asterisk?rev=46252&view=rev
>> Log:
>> Somewhat ugly code to try to fix issue #7608.
>> Since the problem was not very well defined, the fix is a bit  
>> fuzzy too...
>> Thanks to Luigi for accidentally spotting the possible problem!
>>
>> Modified:
>>     branches/1.4/channels/chan_sip.c
>
> just to understand - taking away the part that does not
> overwrite the 'event' header (that shouldn't be an issue),
> what remains is the following:
>
> Am i wrong or the first chunk is the fix to #7608 and the
> other chunk may have some relation (though i do not clearly
> see what) with the problem i was reporting, namely the fact
> that in this setting, when B calls A:
>
> 	A-(nat)--- [ asterisk ] --- B
>
> even if A is configured with canreinvite=no,
> the SDP content from A that asterisk sends to B still has
> the 10.x addresses as if we did not have canreinvite=no ?
>
> (The problem does not occur when A calls B)

I must have referred to the wrong bug number. The issue had to do  
with sending
NOTIFY with "unknown" event types.

/O

>
> 	cheers
> 	luigi
>
>> Modified: branches/1.4/channels/chan_sip.c
>> URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/ 
>> chan_sip.c?rev=46252&r1=46251&r2=46252&view=diff
>> ===================================================================== 
>> =========
>> --- branches/1.4/channels/chan_sip.c (original)
>> +++ branches/1.4/channels/chan_sip.c Wed Oct 25 14:16:10 2006
>> @@ -8029,7 +8029,8 @@
>>  		p->laststate = state;
>>  		break;
>>  	}
>> -	transmit_state_notify(p, state, 1);
>> +	if (p->subscribed != NONE)	/* Only send state NOTIFY if we know  
>> the format */
>> +		transmit_state_notify(p, state, 1);
>>
>>  	if (option_verbose > 1)
>>  		ast_verbose(VERBOSE_PREFIX_1 "Extension Changed %s new state %s  
>> for Notify User %s\n", exten, ast_extension_state2str(state), p- 
>> >username);
>> @@ -13918,22 +13920,34 @@
>>  		return 0;
>>  	}
>>
>> -	if (!ast_test_flag(req, SIP_PKT_IGNORE) && !p->initreq.headers)  
>> {	/* Set up dialog, new subscription */
>> +	if (!ast_test_flag(req, SIP_PKT_IGNORE) && !resubscribe) {	/*  
>> Set up dialog, new subscription */
>>  		/* Use this as the basis */
>>  		if (ast_test_flag(req, SIP_PKT_DEBUG))
>>  			ast_verbose("Creating new subscription\n");
>>
>> -		/* This call is no longer outgoing if it ever was */
>> -		ast_clear_flag(&p->flags[0], SIP_OUTGOING);
>>  		copy_request(&p->initreq, req);
>>  		check_via(p, req);
>>  	} else if (ast_test_flag(req, SIP_PKT_DEBUG) && ast_test_flag 
>> (req, SIP_PKT_IGNORE))
>>  		ast_verbose("Ignoring this SUBSCRIBE request\n");
>>
>>  	/* Find parameters to Event: header value and remove them for  
>> now */
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev

---
Olle E. Johansson * Asterisk Evangelist, developer * VOOP A/S
olle at voop.com





More information about the asterisk-dev mailing list