Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start the endpoint #232

Open
saikiran402 opened this issue Apr 1, 2021 · 9 comments
Open

Unable to start the endpoint #232

saikiran402 opened this issue Apr 1, 2021 · 9 comments

Comments

@saikiran402
Copy link

saikiran402 commented Apr 1, 2021

Endpoint {
"_events": Object {},
"_maxListeners": undefined,
}

[Unhandled promise rejection: TypeError: null is not an object (evaluating '_reactNative.NativeModules.PjSipModule.start')]

Can someone help me with this

@maurojones
Copy link

I have the same problem, someone knows why ?

@utnhim
Copy link

utnhim commented Mar 22, 2022

i have the same problem.
Do you help me ?

@saikiran402
Copy link
Author

I Moved to websockets and used some other library to achieve the requirement.

@mcaon
Copy link

mcaon commented Jun 9, 2022

I Moved to websockets and used some other library to achieve the requirement.

@saikiran402 can u help me to do the same thing? what library u used? Its happening exactly the same thing here

@erokhovama
Copy link

@mcaon Hello! Did you find solution?

@DevMrTV
Copy link

DevMrTV commented Jan 30, 2024

Hey guys, for fix problem:
Add this command on AndroidManifest: <service android:name="com.carusto.ReactNativePjSip.PjSipService" />

Bye !

@kiranNegiloni
Copy link

com.carusto.ReactNativePjSip.PjSipService

Hi @DevMrTV , I have added the service to the manifest and manually linked the library, but still getting the endpoint as undefined. Kindly let me know if there is something i am missing.

@jmagdada
Copy link

jmagdada commented Aug 8, 2024

I Moved to websockets and used some other library to achieve the requirement.

saikiran402 do you still remember what library you used?

I'm getting this TypeError: null is not an object (evaluating '_reactNative.NativeModules.PjSipModule.start') for ios.
I was able to run it in android though

@joel-renambl
Copy link

@DevMrTV thanks it worked? but its not connecting to server
`import React, { useEffect, useState } from 'react';
import { Text, View, Button } from 'react-native';
import { Endpoint } from 'react-native-pjsip';

const App = () => {

const [endpoint, setEndpoint] = useState(null);
const [account, setAccount] = useState(null);

const handleSIP = async () => {
let endpoint = new Endpoint();
setEndpoint(endpoint);
// console.log("endpoint:", endpoint);

let state = await endpoint.start();
// console.log("state:", state);

const configuration = {
  "name": "8008",
  "username": "8008",
  "domain": "198.168.4.64:5060",
  "password": "8008",
  "proxy": null,
  "transport": "UDP", // Default TCP
  "regServer": null, // Default wildcard
  "regTimeout": null, // Default 3600
  "regHeaders": {
    "X-Custom-Header": "Value"
  },
  "regContactParams": ";unique-device-token-id=XXXXXXXXX"
};

let accounts = endpoint.getAccounts();
console.log("Current accounts:", accounts);


try {
  const account = await endpoint.createAccount(configuration);

  setAccount(account);
  console.log("ACCOUNT CREATED:", account);
} catch (e) {
  console.log(e);
}

};

// useEffect(() => {
// handleSIP();
// }, []);

return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
SIP Call Example


);
};

export default App;
`
LOG ACCOUNT CREATED: {"_data": {"domain": "198.168.4.64:5060", "id": 0, "name": "8008", "password": "8008", "regContactParams": ";unique-device-token-id=XXXXXXXXX", "regHeaders": "{X-Custom-Header=Value}", "regOnAdd": true, "regTimeout": "600", "registration": {"active": false, "reason": "Network is unreachable", "status": "PJSIP_SC_SERVICE_UNAVAILABLE", "statusText": "Service Unavailable"}, "transport": "UDP", "uri": "8008 sip:[email protected]:5060", "username": "8008"}, "_registration": {"_active": false, "_reason": "Network is unreachable", "_status": "PJSIP_SC_SERVICE_UNAVAILABLE", "_statusText": "Service Unavailable"}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants