mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	res_pjsip_sdp_rtp: Use negotiated DTMF Payload types on bitrate mismatch
When Asterisk sends an offer to Bob that includes 48K and 8K codecs with
matching 4733 offers, Bob may want to use the 48K audio codec but can not
accept 48K digits and so negotiates for a mixed set.
Asterisk will now check Bob's offer to make sure Bob has indicated this is
acceptible and if not, will use Bob's preference.
Fixes: #847
(cherry picked from commit cf5a6435c2)
			
			
This commit is contained in:
		
				
					committed by
					
						 Asterisk Development Team
						Asterisk Development Team
					
				
			
			
				
	
			
			
			
						parent
						
							463178f0d5
						
					
				
				
					commit
					8fdcbf61ce
				
			| @@ -344,6 +344,14 @@ static void get_codecs(struct ast_sip_session *session, const struct pjmedia_sdp | ||||
|  | ||||
| 		ast_copy_pj_str(name, &rtpmap->enc_name, sizeof(name)); | ||||
| 		if (strcmp(name, "telephone-event") == 0) { | ||||
| 			if (tel_event == 0) { | ||||
| 				int dtmf_rate = 0, dtmf_code = 0; | ||||
| 				char dtmf_pt[8]; | ||||
| 				ast_copy_pj_str(dtmf_pt, &rtpmap->pt, sizeof(dtmf_pt)); | ||||
| 				dtmf_code = atoi(dtmf_pt); | ||||
| 				dtmf_rate = rtpmap->clock_rate; | ||||
| 				ast_rtp_codecs_set_preferred_dtmf_format(codecs, dtmf_code, dtmf_rate); | ||||
| 			} | ||||
| 			tel_event++; | ||||
| 		} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user