[asterisk-dev] Fwd: [svn-commits] russell: trunk r61478 - in /trunk: ./ channels/chan_sip.c

Marc Blanchet marc.blanchet at viagenie.ca
Mon Apr 16 07:10:59 MST 2007


given a possible lifespan of a few years for a major release (1.4)  
and the usefulness to know which version of asterisk one is currently  
debugging with SIP, I would like to propose that the new default  
useragent header with asterisk version be also committed to the 1.4  
branch.

Marc.

Le 07-04-16 à 07:28, Olle E Johansson a écrit :

> ...and in trunk we added a default useragent header with Asterisk  
> version that now will never be used, or?
>
> /O
>
> Vidarebefordrat brev:
>
>> Från: svn-commits at lists.digium.com
>> Datum: onsdag 11 apr 2007 18.06.38 GMT+02:00
>> Till: asterisk-commits at lists.digium.com, svn-commits at lists.digium.com
>> Ämne: [svn-commits] russell: trunk r61478 - in /trunk: ./ channels/ 
>> chan_sip.c
>>
>> Author: russell
>> Date: Wed Apr 11 11:06:37 2007
>> New Revision: 61478
>>
>> URL: http://svn.digium.com/view/asterisk?view=rev&rev=61478
>> Log:
>> Merged revisions 61477 via svnmerge from
>> https://origsvn.digium.com/svn/asterisk/branches/1.4
>>
>> ................
>> r61477 | russell | 2007-04-11 11:05:29 -0500 (Wed, 11 Apr 2007) |  
>> 13 lines
>>
>> Merged revisions 61476 via svnmerge from
>> https://origsvn.digium.com/svn/asterisk/branches/1.2
>>
>> ........
>> r61476 | russell | 2007-04-11 11:01:25 -0500 (Wed, 11 Apr 2007) |  
>> 5 lines
>>
>> If someone sets the "useragent" option in sip.conf to be empty,  
>> then don't add
>> the User-Agent header at all.  It is an optional header, anyway.   
>> Also, the bug
>> report says that some of Japan's SIP providers don't allow it for  
>> some weird
>> reason.  (issue #9488, reported by makoto, fixed by me)
>>
>> ........
>>
>> ................
>>
>> 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=61478&r1=61477&r2=61478
>> ===================================================================== 
>> =========
>> --- trunk/channels/chan_sip.c (original)
>> +++ trunk/channels/chan_sip.c Wed Apr 11 11:06:37 2007
>> @@ -6000,7 +6000,8 @@
>>  	add_header(resp, "To", ot);
>>  	copy_header(resp, req, "Call-ID");
>>  	copy_header(resp, req, "CSeq");
>> -	add_header(resp, "User-Agent", global_useragent);
>> +	if (!ast_strlen_zero(global_useragent))
>> +		add_header(resp, "User-Agent", global_useragent);
>>  	add_header(resp, "Allow", ALLOWED_METHODS);
>>  	add_header(resp, "Supported", SUPPORTED_EXTENSIONS);
>>  	if (msg[0] == '2' && (p->method == SIP_SUBSCRIBE || p->method ==  
>> SIP_REGISTER)) {
>> @@ -6117,7 +6118,8 @@
>>  	copy_header(req, orig, "Call-ID");
>>  	add_header(req, "CSeq", tmp);
>>
>> -	add_header(req, "User-Agent", global_useragent);
>> +	if (!ast_strlen_zero(global_useragent))
>> +		add_header(req, "User-Agent", global_useragent);
>>
>>  	if (!ast_strlen_zero(p->rpid))
>>  		add_header(req, "Remote-Party-ID", p->rpid);
>> @@ -7269,7 +7271,8 @@
>>  	add_header(req, "Contact", p->our_contact);
>>  	add_header(req, "Call-ID", p->callid);
>>  	add_header(req, "CSeq", tmp);
>> -	add_header(req, "User-Agent", global_useragent);
>> +	if (!ast_strlen_zero(global_useragent))
>> +		add_header(req, "User-Agent", global_useragent);
>>  	if (!ast_strlen_zero(p->rpid))
>>  		add_header(req, "Remote-Party-ID", p->rpid);
>>  }
>> @@ -7863,7 +7866,8 @@
>>  	add_header(&req, "To", to);
>>  	add_header(&req, "Call-ID", p->callid);
>>  	add_header(&req, "CSeq", tmp);
>> -	add_header(&req, "User-Agent", global_useragent);
>> +	if (!ast_strlen_zero(global_useragent))
>> +		add_header(&req, "User-Agent", global_useragent);
>>
>>  	
>>  	if (auth) 	/* Add auth header */
>>
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> svn-commits mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/svn-commits
>
> ---
> * Olle E Johansson - oej at edvina.net
> * Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden
>
>
>
> _______________________________________________
> --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

-----
IPv6 book: Migrating to IPv6, Wiley, 2006, http://www.ipv6book.ca




More information about the asterisk-dev mailing list