Comments (19)
@bhtak To fix it, update the VialerPJSIP.framework in the node_modules/react-native-pjsip with a more updated version.
from react-native-pjsip.
@dariomalfatti-centropaghe
I did exactly you told and it really works. Thank you so much.
from react-native-pjsip.
+1
I'm suffering from the same issue.
When I monitored traffic by Wireshark, '401 Unauthorized' message was delivered to my notebook. But, it was not delivered to the iOS App. It seems like the iOS is blocking incoming UDP packets.
from react-native-pjsip.
@dariomalfatti-centropaghe Thank you for the advice.
Would you tell me in detail ? Should I replace VialerPJSIP.framework directory with the latest one?
Or change react-native-pjsip.podspec file ?
from react-native-pjsip.
@bhtak replace the content of VialerPJSIP.framework with the latest one.
If I remember well, I copied the content of this inside node_modules/react-native-pjsip/ios/VialerPJSIP.framework and it starts to connecting again. It was very frustating till I found this solution, I waste a lot of time with this. Hope it help.
from react-native-pjsip.
@dariomalfatti-centropaghe Thank you very much. I'll try.
from react-native-pjsip.
I have the same problem too. But if I manually copy the folder, the application no longer runs.
You can explain me step by step.
Use:
-RECT Native V0.67.2.
-Xcode v13.2.1.
from react-native-pjsip.
You should have this folder and file copyed from this:
node_modules/react-native-pjsip/ios/VialerPJSIP.framework/Headers
node_modules/react-native-pjsip/ios/VialerPJSIP.framework/VialerPJSIP
This workend to me but I've a different RN version (0.65.1)
from react-native-pjsip.
@dariomalfatti-centropaghe I need your help , having the same problem this work on android smoothly but on ios the status remains 'trying'. I tried every thing but not able to register account , i aslo replace the files you asked but its never changes its status please help me .
this is my configuartion object :
let configuration = {
name: 'acoount123',
username: sipUserName,
domain: sipUserDomain,
password: sipUserPassword,
proxy: '',
transport: 'UDP', // Default TCP
regServer: '', // Default wildcard
regTimeout: '2592000', // onemonth
};
this is my sip start function :
const startSipServer = async (
sipUserName: string,
sipUserPassword: string,
sipUserDomain: string,
vopiToken1: any,
) => {
// let endpoint = await new Endpoint();
let state = await endpoint.start(configuration); // List of available accounts and calls when RN context is started, could not be empty because Background service is working on Android
let {accounts, calls} = state;
console.log(accounts);
endpoint.on('registration_changed', account => {
console.log(account);
});
endpoint.on('connectivity_changed', online => {});
endpoint.on('call_received', call => {
setIncominingNumber(call._remoteNumber);
setPressOnDecline(false);
callType = 'Incomining';
let callId = call.getId();
if (callId !== null) {
endpoint.on('call_changed', call => {
console.log(call);
setPressOnDecline(false);
console.log(call._stateText);
callObjectSaveToDb(call);
setCallObject(call);
if (call._stateText === 'CALLING') {
setCallState('Ringing...');
InCallManager.start({media: 'audio', ringback: '_DTMF_'});
setCalling(true);
} // console.log('Call changed: ', call);
});
endpoint.on('call_terminated', call => {
console.log(call); count = 1;
hangup();
if (accounts.length === 0) {
createSipAcc(configuration, vopiToken1);
} else {
registerSipAcc(accounts[0]);
}
};
These are my logs from xcode v13.2.1 React-native version 0.64.2
12:08:17.091 os_core_unix.c !pjlib 2.8 for POSIX initialized
12:08:17.093 sip_endpoint.c .Creating endpoint instance...
12:08:17.094 pjlib .select() I/O Queue created (0x10b949e28)
12:08:17.094 sip_endpoint.c .Module "mod-msg-print" registered
12:08:17.094 sip_transport.c .Transport manager created.
12:08:17.094 pjsua_core.c .PJSUA state changed: NULL --> CREATED
12:08:17.094 sip_endpoint.c .Module "mod-pjsua-log" registered
12:08:17.094 sip_endpoint.c .Module "mod-tsx-layer" registered
12:08:17.094 sip_endpoint.c .Module "mod-stateful-util" registered
12:08:17.094 sip_endpoint.c .Module "mod-ua" registered
12:08:17.094 sip_endpoint.c .Module "mod-100rel" registered
12:08:17.094 sip_endpoint.c .Module "mod-pjsua" registered
12:08:17.095 sip_endpoint.c .Module "mod-invite" registered
12:08:17.564 coreaudio_dev.c .. dev_id 0: iPhone IO device (in=1, out=1) 8000Hz
12:08:17.564 coreaudio_dev.c ..core audio initialized
12:08:17.566 pjlib ..select() I/O Queue created (0x10f06de28)
12:08:17.567 speex_codec.c ..Adjusting quality to 5 for uwb
12:08:17.569 conference.c ..Creating conference bridge with 12 ports
12:08:17.570 Master/sound ..Using delay buffer with WSOLA.
2022-03-09 12:08:17.604141+0500 FlashLead[1559:600075] [javascript] undetermined
2022-03-09 12:08:17.633487+0500 FlashLead[1559:600075] [javascript]
2022-03-09 12:08:17.637717+0500 FlashLead[1559:600075] [javascript] { item: [Function: item], raw: [Function: raw], length: 0 }
2022-03-09 12:08:17.638007+0500 FlashLead[1559:600075] [javascript] []
12:08:17.764 transport_srtp.c ..Failed to initialize libsrtp: algorithm failed test routine
12:08:17.764 pjsua_media.c ..Error initializing SRTP library: algorithm failed test routine [status=259810]
2022-03-09 12:08:17.764451+0500 FlashLead[1559:599441] Error in pjsua_init()
12:08:17.764 pjsua_core.c SIP UDP socket reachable at 192.168.11.9:60186
12:08:17.764 udp0x122163430 SIP UDP transport started, published address is 192.168.11.9:60186
12:08:17.764 tcptp:62458 SIP TCP listener ready for incoming connections at 192.168.11.9:62458
12:08:17.765 tlstp:62459 SIP TLS listener is ready for incoming connections at 192.168.11.9:62459
12:08:17.765 pjsua_core.c PJSUA state changed: CREATED --> STARTING
12:08:17.765 sip_endpoint.c .Module "mod-unsolicited-mwi" registered
12:08:17.765 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING
2022-03-09 12:08:17.765963+0500 FlashLead[1559:600075] [javascript] []
12:08:17.783 pjsua_acc.c Adding account: id=flashlead sip:[email protected]
12:08:17.783 pjsua_acc.c .Account flashlead sip:[email protected] added with id 0
12:08:17.783 pjsua_acc.c .Acc 0: setting registration..
12:08:17.783 endpoint ..Request msg REGISTER/cseq=13284 (tdta0x10b987ca8) created.
12:08:17.783 tsx0x10b98f4a8 ...Transaction created for Request msg REGISTER/cseq=13285 (tdta0x10b987ca8)
12:08:17.783 tsx0x10b98f4a8 ..Sending Request msg REGISTER/cseq=13285 (tdta0x10b987ca8) in state Null
12:08:17.783 sip_resolve.c ...Target '192.168.1.250:0' type=UDP resolved to '192.168.1.250:5060' type=UDP (UDP transport)
12:08:17.783 pjsua_core.c ...TX 484 bytes Request msg REGISTER/cseq=13285 (tdta0x10b987ca8) to UDP 192.168.1.250:5060:
REGISTER sip:192.168.1.250 SIP/2.0
Via: SIP/2.0/UDP 10.212.134.200:60186;rport;branch=z9hG4bKPj-ZhyDHRBBdM6vPtHqrTpXhsewRZiNw4M
Max-Forwards: 70
From: "flashlead" sip:[email protected];tag=URnNe.hAsCVna6zVFg4riv50HGjtDnR8
To: "flashlead" sip:[email protected]
Call-ID: 34O09a6uPrsOBRF5QfqFY-NkOGBPVLYG
CSeq: 13285 REGISTER
Contact: "flashlead" sip:[email protected]:60186;ob
Expires: 2592000
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO
Content-Length: 0
--end msg--
12:08:17.783 tsx0x10b98f4a8 ...State changed from Null to Calling, event=TX_MSG
12:08:17.784 pjsua_acc.c ..Acc 0: Registration sent
2022-03-09 12:08:17.784828+0500 FlashLead[1559:600075] [javascript] 'Account created', { _data:
{ id: 0,
domain: '192.168.1.250',
password: 'Flash510',
registration:
{ reason: 'test',
active: 'test',
statusText: 'In Progress',
status: 'Trying' },
contactUriParams: null,
username: '510',
regTimeout: '2592000',
regHeaders: null,
regContactParams: null,
uri: 'flashlead sip:[email protected]',
name: 'flashlead',
transport: 'UDP',
proxy: '',
contactParams: null,
regServer: '' },
_registration:
{ _status: 'Trying',
_statusText: 'In Progress',
_active: 'test',
_reason: 'test' } }
from react-native-pjsip.
@abdullahrehan430 I think you have always to set the proxy property within the configuration in this way:
proxy: `<sip:${serverSip};transport=${transport.toLowerCase()}>`
Where serverSip
should be the ip address of the SIP server and trasport
should be udp or tcp
from react-native-pjsip.
@dariomalfatti-centropaghe tried but same response it never changes.
Account created {"_data": {"contactParams": null, "contactUriParams": null, "domain": "192.168.1.250", "id": 0, "name": "flashlead", "password": "Flash510", "proxy": "sip:192.168.0.250;transport=udp", "regContactParams": null, "regHeaders": null, "regServer": "", "regTimeout": "2592000", "registration": {"active": "test", "reason": "test", "status": "Trying", "statusText": "In Progress"}, "transport": "UDP", "uri": "flashlead sip:[email protected]", "username": "510"}, "_registration": {"_active": "test", "_reason": "test", "_status": "Trying", "_statusText": "In Progress"}}
from react-native-pjsip.
@abdullahrehan430 in the proxy property you must wrap the value with < > ("<sip:192.168.0.250;transport=udp>").
Can you connect to this sip server with linphone or a softphone you like?
from react-native-pjsip.
@dariomalfatti-centropaghe
tried this one but no change "proxy": "sip:192.168.0.250;transport=udp"
we can connect only with softphone by using this server , in additional I am using forticlient vpn because our server is behind the firewall . Connect with forticlient and simply create a account with given configuration and this is working fine on android but on ios this is not updating the status .
I aslo tried zoiper app on ios and this is working fine I have to connect with forticlient and have to give sip credentials on zioper in ios.
Can you share with me any project or code for reference. I am testing this on device Iphone xs :Ios 15.1 , is there are any special configuration for ios on xcode ?
I successfully created the certificaets for VOIP in developer account or add tick the voip in backgrounds modes.
Is we have to add some code on appdelegate.m?
I am new to ios development so this are confusions in my mind
Thanks for your time in advance.
from react-native-pjsip.
If with android works, configuration's parameters are ok. Sorry but I don't have any project to share, I'm not part of pjsip team, I just found a solution with missing registration on iOS that worked to me and I shared it above. Try to check the Vialer within the node_modules/react-native-pjsip/ios folder as descrived above because seems to be the same problem. I did't modify appdelegate.m just follow the README.md of this project
from react-native-pjsip.
@dariomalfatti-centropaghe first of all i am very thanksful for your time it's really save me . Yes you are right the issue with library. I download the whole Vialer library and from there i copy the files as you described above but the issue is that it contains only the reference of file stored on Git LFS . When i download the file and replace it start like a magic. Very very thanks for your time.
from react-native-pjsip.
@abdullahrehan430 I'm realy glad it helped you too! Enjoy!
from react-native-pjsip.
Hi bro,
after i replace file in VialerPJSIP.framework. i got error ios-arm64 when build.
So you can help me, how do fix errors.
thanks you
the errors:
`
Ignoring file ..*/VialerPJSIP.framework/VialerPJSIP, building for iOS-arm64 but attempting to link with file built for unknown-unsupported file format
Showing All Messages
Undefined symbol: _pjsua_acc_get_info
Undefined symbol: _pjsip_get_status_text
Undefined symbol: _pjsua_acc_set_registration
Undefined symbol: _pjsua_acc_add
Undefined symbol: _pjsua_vid_dev_get_info
Undefined symbol: _pjsua_vid_enum_wins
Undefined symbol: _pjsua_transport_config_default
Undefined symbol: _pjsua_conf_connect
Undefined symbol: _pjsip_generic_string_hdr_create
Undefined symbol: _pjsua_enum_codecs
Undefined symbol: _pjsua_codec_set_priority
Undefined symbol: _pj_pool_factory_default_policy
Undefined symbol: _pjsua_config_default
Undefined symbol: _pj_caching_pool_init
Undefined symbol: _pj_pool_create
Undefined symbol: _pjsua_call_make_call
Undefined symbol: _pjsua_vid_win_set_size
Undefined symbol: _pjsua_acc_config_default
Undefined symbol: _pjsua_vid_preview_param_default
Undefined symbol: _pjsua_acc_del
Undefined symbol: _pjsua_acc_get_config
Undefined symbol: _pjsua_update_stun_servers
Undefined symbol: _pjsua_set_snd_dev
Undefined symbol: _pjsua_acc_modify
Undefined symbol: _pjsua_logging_config_default
Undefined symbol: _pjsua_media_config_default
Undefined symbol: _pjsua_set_no_snd_dev
Undefined symbol: _pjsua_conf_disconnect
Undefined symbol: _pjsua_init
Undefined symbol: _pjsua_transport_create
Undefined symbol: _pjsip_generic_string_hdr_init2
Undefined symbol: _pj_list_insert_before
Undefined symbol: _pjsua_start
Undefined symbol: _pj_str
Undefined symbol: _pjsua_call_dial_dtmf
Undefined symbol: _pjsua_call_set_hold
Undefined symbol: _pjsua_vid_dev_count
Undefined symbol: _pjsua_call_xfer_replaces
Undefined symbol: _pjsua_call_xfer
Undefined symbol: _pjsua_vid_preview_start
Undefined symbol: _pj_pool_release
Undefined symbol: _pjsua_pool_create
Undefined symbol: _pjsua_call_answer2
Undefined symbol: _pjsua_vid_preview_get_win
Undefined symbol: _pjsua_create
Undefined symbol: _pjsua_call_get_info
Undefined symbol: _pjsua_call_reinvite
Undefined symbol: _pjsua_msg_data_init
Undefined symbol: _pjsua_vid_win_get_info
Undefined symbol: _pjsua_call_setting_default
Undefined symbol: _pjsua_vid_dev_set_setting
Undefined symbol: _pjsua_call_hangup
`
from react-native-pjsip.
@utnhim hye brother , I think the issue is here you downloaded the wrong library ,
You should have folder and file copyed from this:
node_modules/react-native-pjsip/ios/VialerPJSIP.framework/Headers
node_modules/react-native-pjsip/ios/VialerPJSIP.framework/VialerPJSIP
and also make sure on vialerPjsip.framework/VialerPsjip (on github) you have download the file not the referance.
from react-native-pjsip.
Hi, how were you able to run this in ios? Im getting this error:
TypeError: null is not an object (evaluating '_reactNative.NativeModules.PjSipModule.start')
from react-native-pjsip.
Related Issues (20)
- getting error while creating account "_registration": {"_active": false, "_reason": undefined, "_status": "PJSIP_SC_TRYING", "_statusText": "In Progress"}} HOT 4
- Unable to build on Android
- BUG
- Wrong Aspect Ratio of PreviewVideoView (iOS) HOT 1
- Stoped in PJSIP_INV_STATE_CONNECTING HOT 1
- call hangup issue
- what is default incoming call time without accept call
- Does react-native-pjsip support conference calls with video?
- Unhandled promise rejection error
- unable to detect call status while 2 call end
- call_terminated event not working. while third call end in Samsung galaxy a51 android version 11 HOT 1
- app crached after clicked in "call button" without error in log
- not work call_terminated HOT 1
- udp not work with wifi connection.
- React-native 0.67.2 HOT 1
- how do i use SRTP
- Is this library still working? if so, Can someone guide me through the installation process? HOT 3
- Increase the number of ringing HOT 2
- ha1 hash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-pjsip.