I'm trying to connect to the sip server. the way i passed is installing react-native-pjsip and added the android setting like permission, ... in android folder and in javascript i did like this:
import {Endpoint} from 'react-native-pjsip';
var endpoint = new Endpoint();
let configuration = {
"name": "username",
"username": "username",
"domain": "sip:ServerIp",
"password": "password",
"proxy": null,
"transport": "UDP", // Default TCP
"regServer": "sip:ServerIp:5060", // Default wildcard
"regTimeout": 3000, // Default 3600
"regHeaders": {
"X-Custom-Header": "Value"
}
};
and simply trying to start and Login to server like this
// let endpoint = new Endpoint();
console.log("JSON Result is ==>"+JSON.stringify(endpoint));
const state = await endpoint.start();
I'm trying to connect to the sip server. the way i passed is installing react-native-pjsip and added the android setting like permission, ... in android folder and in javascript i did like this: import {Endpoint} from 'react-native-pjsip'; var endpoint = new Endpoint(); let configuration = { "name": "username", "username": "username", "domain": "sip:ServerIp", "password": "password", "proxy": null, "transport": "UDP", // Default TCP "regServer": "sip:ServerIp:5060", // Default wildcard "regTimeout": 3000, // Default 3600 "regHeaders": { "X-Custom-Header": "Value" } }; and simply trying to start and Login to server like this // let endpoint = new Endpoint(); console.log("JSON Result is ==>"+JSON.stringify(endpoint)); const state = await endpoint.start();
but i get the following error
JSON Result is ==>{"_events":{}} D:\Practice\sipapp\App.js:56 NaN D:\Practice\sipapp\App.js:58 JSON is==> [] D:\Practice\sipapp\App.js:62 Error:Title: pjsua_acc_add(&pj_acc_cfg, make_default, &id) Code: 171039 Description: Invalid URI (PJSIP_EINVALIDURI) Location: ../src/pjsua2/account.cpp:733
and the whole thing that i did is here https://paste.ofcode.org/Q3TyUtcT3xEZMdH53RtnN5