Closed krajay015 closed 5 years ago
@krajay015 I can't see anything wrong in your code, but you mentioned that the console returned was from the callback and not from the catch block console. I would recommend you to make sure and debug your params you're sending to pjsip. I mean if it sends you this type of response it should be working if the values you supplied are correct. I can recommend you to contact your SIP service (cloud or else), that's how I made it work
endpoint.createAccount({ name, username, domain, password }).then(acnt => { console.log(acnt); //metion response below }) .catch(error => { console.log(error); })
@pazualo Can you please help me finding the issue in my code ? Actually I'm also getting the same issue. Actually I have server URL, username and password and I want to createAccount but always getting this error -
"_registration": {"_active": false, "_reason": undefined, "_status": "PJSIP_SC_TRYING", "_statusText": "In Progress"}
let configuration = {} configuration.username = 'xxxxxx'; configuration.domain = 'sip.xxxxx.com'; configuration.password = "xxxxxxxx"; configuration.transport = "WSS", configuration.regServer = 'wss://xxxxxxx/ws', configuration.regTimeout = null, configuration.regHeaders = { "X-Custom-Header": "Value" }, configuration.regContactParams = ";unique-device-token-id=XXXXXXXXX" console.log(configuration)
await endpoint.createAccount(configuration) .then((returnAcc) => { console.log("-------", returnAcc); this.setState({ account: returnAcc }); }).catch((e) => { console.log("Error", e); });
I'm using
react-native-pjsip
library for my project and in iOS, everything seems to work perfectly but in android it's throwing following error oncreateAccount
method. I'm attaching my code here to make it more visible. start the endpoint :after that creating account via using createAccount method:
and in response I'm getting :
The same thing is working perfectly on iPhone emulator.
@cmendes0101 @aronStein @pazualo @tophed can you help me, guys?