mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@342061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
			
			
This commit is contained in:
		| @@ -25654,13 +25654,19 @@ static int sip_poke_peer(struct sip_peer *peer, int force) | ||||
| 	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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user