# Volume Issue with Custom Headset

**URL:** <https://devforum.zoom.us/t/volume-issue-with-custom-headset/117743>\
**Category:** iOS\
**Tags:** ios\
**Created:** [September 19, 2024, 1:07pm UTC](https://devforum.zoom.us/t/volume-issue-with-custom-headset/117743 "2024-09-19T13:07:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![niki](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/niki/32/63447_2.png) [@niki](https://devforum.zoom.us/u/niki)\
**Post date:** [September 19, 2024, 1:07pm UTC](https://devforum.zoom.us/t/volume-issue-with-custom-headset/117743/1 "2024-09-19T13:07:33Z")

</div>

In our iOS application, we have a custom headset without a microphone. We want users to listen through this headset while speaking via an ipad microphone. However, when we use the default route-changing code in Swift, the iOS system recognizes the iPad as a complete device and routes the audio output through the iPad’s speaker instead.

How can we improve this to ensure that audio input is correctly routed to the ipad microphone while allowing audio playback through our custom headset?

```auto

```

do {  
let audioSession = AVAudioSession.sharedInstance()

```
        try audioSession.setCategory(AVAudioSession.Category.playAndRecord, options: [.allowBluetoothA2DP])
        try audioSession.setActive(true)
    }catch {
        print("Failed to set up audio session: \(error)")
    }

```

```auto

```

do {  
let availableInputs = try audioSession.availableInputs  
if let inputs = availableInputs {  
for input in inputs {  
if input.portType == .bluetoothHFP || input.portType == .headsetMic {  
try audioSession.setPreferredInput(input)  
break  
}  
}  
}  
} catch {  
print(“Failed to configure audio routing: (error)”)  
}

```auto

}

```

---

<div class="post-metadata">

**Author:** ![richard.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/richard.zoom/32/41061_2.png) [@richard.zoom](https://devforum.zoom.us/u/richard.zoom)\
**Post date:** [October 2, 2024, 10:24pm UTC](https://devforum.zoom.us/t/volume-issue-with-custom-headset/117743/2 "2024-10-02T22:24:55Z")

</div>

Hello Niki,

Unfortunately at this time neither Video SDK nor Meeting SDK for iOS supports routing across multiple audio or video devices, as the Zoom iOS client does not support this functionality.

Thank you for your patience,  
Richard

---

<div class="post-metadata">

**Author:** ![niki](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/niki/32/63447_2.png) [@niki](https://devforum.zoom.us/u/niki)\
**Post date:** [October 7, 2024, 5:50am UTC](https://devforum.zoom.us/t/volume-issue-with-custom-headset/117743/3 "2024-10-07T05:50:57Z")

</div>

I have solved this issue using twilio default engine .

```auto
/// Twilio Video Call Code
            let audioDevice = DefaultAudioDevice()
             self.audioDevice = audioDevice
             audioDevice.block = { [weak self] in
                 do {
                     DefaultAudioDevice.DefaultAVAudioSessionConfigurationBlock()
                     let audioSession = AVAudioSession.sharedInstance()
                    // try audioSession.setMode(.default)
                     try audioSession.setCategory(AVAudioSession.Category.playAndRecord, options: [.allowBluetoothA2DP])
                     try audioSession.setActive(true)

                 } catch let error as NSError {
                     AppDebug.printLog(value: "Error Setting Up Audio Session",level: .error)
                    ShowMessage.show(.error, "Error Setting Up Audio Session")
                 }
             }
            TwilioVideoSDK.audioDevice = audioDevice

```

SO , Is there way to achieve using the zoom sdk .

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 6, 2024, 3:51pm UTC](https://devforum.zoom.us/t/volume-issue-with-custom-headset/117743/4 "2024-11-06T15:51:08Z")

</div>

Closed on November 6, 2024, 3:51pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
