mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: backend-native: Create call on +CLCC event if supported
Wait for +CLCC event to create the call so the remote phone number can be set.
This commit is contained in:
		
							parent
							
								
									f5e08677a2
								
							
						
					
					
						commit
						056c2dd535
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		| 
						 | 
					@ -1891,7 +1891,7 @@ static bool rfcomm_hfp_hf(struct rfcomm *rfcomm, char* token)
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					if (!found) {
 | 
										if (!found && !rfcomm->hfp_hf_clcc) {
 | 
				
			||||||
						spa_log_info(backend->log, "Incoming call");
 | 
											spa_log_info(backend->log, "Incoming call");
 | 
				
			||||||
						if (hfp_hf_add_call(rfcomm, rfcomm->telephony_ag, CALL_STATE_INCOMING, NULL) == NULL)
 | 
											if (hfp_hf_add_call(rfcomm, rfcomm->telephony_ag, CALL_STATE_INCOMING, NULL) == NULL)
 | 
				
			||||||
							spa_log_warn(backend->log, "failed to create incoming call");
 | 
												spa_log_warn(backend->log, "failed to create incoming call");
 | 
				
			||||||
| 
						 | 
					@ -1908,7 +1908,7 @@ static bool rfcomm_hfp_hf(struct rfcomm *rfcomm, char* token)
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					if (!found) {
 | 
										if (!found && !rfcomm->hfp_hf_clcc) {
 | 
				
			||||||
						spa_log_info(backend->log, "Dialing call");
 | 
											spa_log_info(backend->log, "Dialing call");
 | 
				
			||||||
						if (hfp_hf_add_call(rfcomm, rfcomm->telephony_ag, CALL_STATE_DIALING, NULL) == NULL)
 | 
											if (hfp_hf_add_call(rfcomm, rfcomm->telephony_ag, CALL_STATE_DIALING, NULL) == NULL)
 | 
				
			||||||
							spa_log_warn(backend->log, "failed to create dialing call");
 | 
												spa_log_warn(backend->log, "failed to create dialing call");
 | 
				
			||||||
| 
						 | 
					@ -2064,7 +2064,12 @@ static bool rfcomm_hfp_hf(struct rfcomm *rfcomm, char* token)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!found) {
 | 
							if (!found) {
 | 
				
			||||||
			spa_log_warn(backend->log, "unknown call index: %u", idx);
 | 
								spa_log_info(backend->log, "New call, initial state: %u", status);
 | 
				
			||||||
 | 
								call = hfp_hf_add_call(rfcomm, rfcomm->telephony_ag, status, strlen(number) ? number : NULL);
 | 
				
			||||||
 | 
								if (call == NULL)
 | 
				
			||||||
 | 
									spa_log_warn(backend->log, "failed to create call");
 | 
				
			||||||
 | 
								else if (call->id != idx)
 | 
				
			||||||
 | 
									spa_log_warn(backend->log, "wrong call index: %d, expected: %d", call->id, idx);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else if (spa_strstartswith(token, "OK")) {
 | 
						} else if (spa_strstartswith(token, "OK")) {
 | 
				
			||||||
		switch(rfcomm->hf_state) {
 | 
							switch(rfcomm->hf_state) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue