mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	res_pjsip: Add TEL URI support for basic calls.
This change allows TEL URI requests to come through for basic calls. The allowed requests are INVITE, ACK, BYE, and CANCEL. The From and To headers will now allow TEL URIs, as well as the request URI. Support is only for TEL URIs present in traffic from a remote party. Asterisk does not generate any TEL URIs on its own. ASTERISK-26894 Change-Id: If5729e6cd583be7acf666373bf9f1b9d653ec29a
This commit is contained in:
		
				
					committed by
					
						 Friendly Automation
						Friendly Automation
					
				
			
			
				
	
			
			
			
						parent
						
							bb8b2259bc
						
					
				
				
					commit
					1f685d6969
				
			| @@ -32,14 +32,14 @@ | ||||
| static int get_from_header(pjsip_rx_data *rdata, char *username, size_t username_size, char *domain, size_t domain_size) | ||||
| { | ||||
| 	pjsip_uri *from = rdata->msg_info.from->uri; | ||||
| 	pjsip_sip_uri *sip_from; | ||||
|  | ||||
| 	if (!PJSIP_URI_SCHEME_IS_SIP(from) && !PJSIP_URI_SCHEME_IS_SIPS(from)) { | ||||
| 	if (!ast_sip_is_uri_sip_sips(from)) { | ||||
| 		return -1; | ||||
| 	} | ||||
| 	sip_from = (pjsip_sip_uri *) pjsip_uri_get_uri(from); | ||||
| 	ast_copy_pj_str(username, &sip_from->user, username_size); | ||||
| 	ast_copy_pj_str(domain, &sip_from->host, domain_size); | ||||
|  | ||||
| 	ast_copy_pj_str(username, ast_sip_pjsip_uri_get_username(from), username_size); | ||||
| 	ast_copy_pj_str(domain, ast_sip_pjsip_uri_get_hostname(from), domain_size); | ||||
|  | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user