console.warn(account)
let call = await endpoint.makeCall(account, '********', options);
console.warn(call)
call.getId(); // Use this id to detect changes and make actions
endpoint.addListener("call_changed", (newCall) => {
if (call.getId() === newCall.getId()) {
call.getMedia();
console.warn('接通了')
}
});
endpoint.addListener("call_terminated", (newCall) => {
if (call.getId() === newCall.getId()) {
console.warn('挂断了')
}
});
let configuration = { "name": "admin", "username": "admin", "domain": "**", "password": "**", "proxy": null, "transport": null, // Default TCP "regServer": null, // Default wildcard "regTimeout": null, // Default 3600 "regHeaders": { "X-Custom-Header": "Value" }, "regContactParams": ";unique-device-token-id=XXXXXXXXX", "regOnAdd": true, // Default true, use false for manual REGISTRATION };
let options = { headers: { "P-Assserted-Identity": "Header example", "X-UA": "React native" } };