Closed datso closed 6 years ago
Documentation shows this as being possible:
let options = { headers: { "P-Assserted-Identity": "Header example", "X-UA": "React native" } }
let call = await endpoint.makeCall(account, destination, options);
However it isn't there in the current version.
Hello, please use with_video branch (https://github.com/Carusto/react-native-pjsip/tree/with-video), and iOS version. I will make a PR soon.
{ "hdr_list": { "P-Assserted-Identity": "Header example", "X-UA": "React native" } }
So the video branch on iOS will allow call options, but android doesn't?
@james-ovens Yeap, I will make a PR on this weekend to support additional parameters for Java version.
@datso https://github.com/Carusto/react-native-pjsip/commit/23260490bbaa159e6719a99c848f5cfdfaf4e54c still work in progress?
How I can add custom header to call on ios?
let options = { headers: { "P-Assserted-Identity": "Header example", "X-UA": "React native" } }
let call = await endpoint.makeCall(account, destination, options);
or
let options = { hdr_list: { "P-Assserted-Identity": "Header example", "X-UA": "React native" } }
let call = await endpoint.makeCall(account, destination, options);
Finally, I've decided to use camelCase, current master supports following configuration:
const callSettings = {
audioCount: 1,
videoCount: 1
}
const messageSettings = {
headers: {
"A": "B",
"C": "D"
},
targetURI: "...",
contentType: "...",
body: "..."
}
endpoint.makeCall(account, destination, callSettings, messageSettings)
Add ability to send custom headers and determine whether audio or video are enabled.