Closed herlarb closed 6 years ago
I've the same problem
+1
It does not work only on a real Android device. In the emulator it works fine.
Same problem here (physical device) and my code worked well before I reinstalled the lib.
Could you please provide logs from adb logcat
from start till error ?
@pohodnya
Do you have <uses-permission android:name="android.permission.INTERNET" />
in AndroidManifest ?
It is very strange that library fails on pj_sockaddr_get_port function :(
Please provide device details, at least Android version.
* BTW I rechecked the library on real device and it works well for me. * Remove also receiver com.carusto.ReactNativePjSip.PjSipConnectivityReceiver in AndroidManifest - connectivity status was removed from the library.
@datso
<uses-permission android:name="android.permission.INTERNET" />
- yes, I have@pohodnya I don't see pjsip initialization in your logs, please add it to your gist.
02-07 13:46:30.916 19094 20044 D PjSipLogWriter: 13:46:30.915 sip_endpoint.c !.Module "mod-pjsua-log" registered
02-07 13:46:30.916 19094 20044 D PjSipLogWriter: 13:46:30.916 sip_endpoint.c .Module "mod-tsx-layer" registered
02-07 13:46:30.916 19094 20044 D PjSipLogWriter: 13:46:30.916 sip_endpoint.c .Module "mod-stateful-util" registered
02-07 13:46:30.917 19094 20044 D PjSipLogWriter: 13:46:30.917 sip_endpoint.c .Module "mod-ua" registered
02-07 13:46:30.917 19094 20044 D PjSipLogWriter: 13:46:30.917 sip_endpoint.c .Module "mod-100rel" registered
02-07 13:46:30.917 19094 20044 D PjSipLogWriter: 13:46:30.917 sip_endpoint.c .Module "mod-pjsua" registered
02-07 13:46:30.917 19094 20044 D PjSipLogWriter: 13:46:30.917 sip_endpoint.c .Module "mod-invite" registered
02-07 13:46:30.924 19094 20044 D PjSipLogWriter: 13:46:30.924 opensl_dev.c ..OpenSL sound library initialized
02-07 13:46:30.924 19094 20044 D PjSipLogWriter: 13:46:30.924 pjlib ..select() I/O Queue created (0xcf76f614)
02-07 13:46:30.925 19094 20044 D PjSipLogWriter: 13:46:30.925 speex_codec.c ..Adjusting quality to 5 for uwb
02-07 13:46:30.925 19094 20044 D PjSipLogWriter: 13:46:30.925 conference.c ..Creating conference bridge with 12 ports
02-07 13:46:30.925 19094 20044 D PjSipLogWriter: 13:46:30.925 Master/sound ..Using delay buffer with WSOLA.
02-07 13:46:30.933 19094 20044 D PjSipLogWriter: 13:46:30.933 pjsua_vid.c ..Initializing video subsystem..
02-07 13:46:30.933 19094 20044 D PjSipLogWriter: 13:46:30.933 openh264.cpp ...OpenH264 codec initialized
02-07 13:46:30.933 19094 20044 D PjSipLogWriter: 13:46:30.933 opengl_dev.c ...OpenGL device initialized
02-07 13:46:30.946 3299 3299 I CameraService: CameraService::connect call (PID -1 "com.carusto", camera ID 0) for HAL version default and Camera API version 1
02-07 13:46:30.947 3299 3299 W ServiceManager: Permission failure: android.permission.CAMERA from uid=10265 pid=19094
02-07 13:46:30.947 3299 3299 E CameraService: Permission Denial: can't use the camera pid=19094, uid=10265
02-07 13:46:30.949 19094 20044 W CameraBase: An error occurred while connecting to camera 0: Service not available
02-07 13:46:30.949 19094 20044 D IOException: Fail to connect to camera service
02-07 13:46:30.950 3299 10046 I CameraService: CameraService::connect call (PID -1 "com.carusto", camera ID 1) for HAL version default and Camera API version 1
02-07 13:46:30.951 3299 10046 W ServiceManager: Permission failure: android.permission.CAMERA from uid=10265 pid=19094
02-07 13:46:30.952 3299 10046 E CameraService: Permission Denial: can't use the camera pid=19094, uid=10265
02-07 13:46:30.952 19094 20044 W CameraBase: An error occurred while connecting to camera 1: Service not available
02-07 13:46:30.953 19094 20044 D IOException: Fail to connect to camera service
02-07 13:46:30.953 19094 20044 D PjSipLogWriter: 13:46:30.953 android_dev.c ...Android video capture initialized with 0 device(s):
02-07 13:46:30.953 19094 20044 D PjSipLogWriter: 13:46:30.953 colorbar_dev.c ...Colorbar video src initialized with 2 device(s):
02-07 13:46:30.953 19094 20044 D PjSipLogWriter: 13:46:30.953 colorbar_dev.c ... 0: Colorbar generator
02-07 13:46:30.953 19094 20044 D PjSipLogWriter: 13:46:30.953 colorbar_dev.c ... 1: Colorbar-active
02-07 13:46:30.953 19094 20044 D PjSipLogWriter: 13:46:30.953 sip_endpoint.c .Module "mod-evsub" registered
02-07 13:46:30.954 19094 20044 D PjSipLogWriter: 13:46:30.954 sip_endpoint.c .Module "mod-presence" registered
02-07 13:46:30.954 19094 20044 D PjSipLogWriter: 13:46:30.954 evsub.c .Event pkg "presence" registered by mod-presence
02-07 13:46:30.954 19094 20044 D PjSipLogWriter: 13:46:30.954 sip_endpoint.c .Module "mod-mwi" registered
02-07 13:46:30.954 19094 20044 D PjSipLogWriter: 13:46:30.954 evsub.c .Event pkg "message-summary" registered by mod-mwi
02-07 13:46:30.954 19094 20044 D PjSipLogWriter: 13:46:30.954 sip_endpoint.c .Module "mod-refer" registered
02-07 13:46:30.954 19094 20044 D PjSipLogWriter: 13:46:30.954 evsub.c .Event pkg "refer" registered by mod-refer
02-07 13:46:30.954 19094 20044 D PjSipLogWriter: 13:46:30.954 sip_endpoint.c .Module "mod-pjsua-pres" registered
02-07 13:46:30.954 19094 20044 D PjSipLogWriter: 13:46:30.954 sip_endpoint.c .Module "mod-pjsua-im" registered
02-07 13:46:30.954 19094 20044 D PjSipLogWriter: 13:46:30.954 sip_endpoint.c .Module "mod-pjsua-options" registered
02-07 13:46:30.955 19094 20044 D PjSipLogWriter: 13:46:30.955 pjsua_core.c .1 SIP worker threads created
02-07 13:46:30.955 19094 20044 D PjSipLogWriter: 13:46:30.955 pjsua_core.c .pjsua version 2.7.1 for Linux-3.190.174.126/armv8l initialized
02-07 13:46:30.955 19094 20044 D PjSipLogWriter: 13:46:30.955 pjsua_core.c .PJSUA state changed: CREATED --> INIT
02-07 13:46:30.955 4751 3095 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
02-07 13:46:30.955 4751 3095 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
02-07 13:46:30.966 3310 3816 D EnterpriseController: netId is 0
02-07 13:46:30.967 3310 3816 D Netd : getNetworkForDns: using netid 523 for uid 10265
02-07 13:46:30.967 3310 3816 D DnsProxyListener: DNSDBG::dns addrinfo af 2
02-07 13:46:30.969 19094 20044 D PjSipLogWriter: 13:46:30.968 pjsua_core.c SIP UDP socket reachable at 10.193.79.49:45155
02-07 13:46:30.969 19094 20044 D PjSipLogWriter: 13:46:30.969 udp0xc295e800 SIP UDP transport started, published address is 10.193.79.49:45155
02-07 13:46:30.970 3310 3816 D EnterpriseController: netId is 0
02-07 13:46:30.970 3310 3816 D Netd : getNetworkForDns: using netid 523 for uid 10265
02-07 13:46:30.970 3310 3816 D DnsProxyListener: DNSDBG::dns addrinfo af 2
02-07 13:46:30.972 19094 20044 D PjSipLogWriter: 13:46:30.972 tcptp:42195 SIP TCP listener ready for incoming connections at 10.193.79.49:42195
02-07 13:46:30.972 19094 20044 D PjSipLogWriter: 13:46:30.972 pjsua_core.c Error creating transport: Unsupported transport (PJSIP_EUNSUPTRANSPORT) [status=171060]
02-07 13:46:30.972 19094 20044 D PjSipLogWriter: 13:46:30.972 endpoint.cpp pjsua_transport_create(type, &tcfg, &tid) error: Unsupported transport (PJSIP_EUNSUPTRANSPORT) (status=171060) [../src/pjsua2/endpoint.cpp:1836]
02-07 13:46:30.973 19094 20044 E PjSipService: Error while starting PJSIP
02-07 13:46:30.973 19094 20044 E PjSipService: java.lang.Exception: Title: pjsua_transport_create(type, &tcfg, &tid)
02-07 13:46:30.973 19094 20044 E PjSipService: Code: 171060
02-07 13:46:30.973 19094 20044 E PjSipService: Description: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
02-07 13:46:30.973 19094 20044 E PjSipService: Location: ../src/pjsua2/endpoint.cpp:1836
02-07 13:46:30.973 19094 20044 E PjSipService:
02-07 13:46:30.973 19094 20044 E PjSipService: at org.pjsip.pjsua2.pjsua2JNI.Endpoint_transportCreate(Native Method)
02-07 13:46:30.973 19094 20044 E PjSipService: at org.pjsip.pjsua2.Endpoint.transportCreate(Endpoint.java:178)
02-07 13:46:30.973 19094 20044 E PjSipService: at com.carusto.ReactNativePjSip.PjSipService.load(PjSipService.java:189)
02-07 13:46:30.973 19094 20044 E PjSipService: at com.carusto.ReactNativePjSip.PjSipService.access$100(PjSipService.java:52)
02-07 13:46:30.973 19094 20044 E PjSipService: at com.carusto.ReactNativePjSip.PjSipService$2.run(PjSipService.java:228)
02-07 13:46:30.973 19094 20044 E PjSipService: at android.os.Handler.handleCallback(Handler.java:751)
02-07 13:46:30.973 19094 20044 E PjSipService: at android.os.Handler.dispatchMessage(Handler.java:95)
02-07 13:46:30.973 19094 20044 E PjSipService: at android.os.Looper.loop(Looper.java:154)
02-07 13:46:30.973 19094 20044 E PjSipService: at android.os.HandlerThread.run(HandlerThread.java:61)
02-07 13:46:30.991 19094 20044 D PjSipService: Handle "start" action ({"callback_id":1,"notifications":{"call":false,"account":false},"ua":"Carusto Android (1.0.1)"})
02-07 13:46:30.996 19094 19094 D PjSipBroadcastReceiver: Received "com.carusto.account.started" response from service ({"callback_id":1,"data":"{\"accounts\":[],\"calls\":[],\"settings\":{}}"})
02-07 13:46:31.016 19094 20044 D PjSipService: Handle "account_create" action ({"domain":"dev.carusto.com","password":"","username":"1000","callback_id":2,"proxy":"sip:dev.carusto.com:5060;transport\u003dtcp"})
02-07 13:46:31.046 19094 20044 D PjSipLogWriter: 13:46:31.046 pjsua_acc.c Adding account: id=<sip:1000@dev.carusto.com>
02-07 13:46:31.046 19094 20044 D PjSipLogWriter: 13:46:31.046 pjsua_acc.c .Account <sip:1000@dev.carusto.com> added with id 0
02-07 13:46:31.046 19094 20044 D PjSipLogWriter: 13:46:31.046 pjsua_acc.c .Acc 0: setting registration..
02-07 13:46:31.048 3310 3816 D EnterpriseController: netId is 0
02-07 13:46:31.048 3310 3816 D Netd : getNetworkForDns: using netid 523 for uid 10265
02-07 13:46:31.048 3310 3816 D DnsProxyListener: DNSDBG::dns addrinfo af 0
02-07 13:46:31.095 19094 20044 D PjSipLogWriter: 13:46:31.095 tcpc0xcf723814 ..TCP client transport created
02-07 13:46:31.097 19094 20044 D PjSipLogWriter: 13:46:31.097 tcpc0xcf723814 ..TCP transport 10.193.79.49:37961 is connecting to 37.97.232.22:5060...
02-07 13:46:31.097 19094 20044 D PjSipLogWriter: 13:46:31.097 pjsua_acc.c ..Contact for acc 0 updated: <sip:1000@10.193.79.49:37961;transport=TCP;ob>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-0000-0000-0000e922f243>"
02-07 13:46:31.099 19094 20044 D PjSipLogWriter: 13:46:31.098 endpoint ..Request msg REGISTER/cseq=7014 (tdta0xc4a4f064) created.
02-07 13:46:31.100 3310 3816 D EnterpriseController: netId is 0
02-07 13:46:31.100 3310 3816 D Netd : getNetworkForDns: using netid 523 for uid 10265
02-07 13:46:31.100 3310 3816 D DnsProxyListener: DNSDBG::dns addrinfo af 0
02-07 13:46:31.102 19094 20044 D PjSipLogWriter: 13:46:31.102 tsx0xc2990064 ...Transaction created for Request msg REGISTER/cseq=7015 (tdta0xc4a4f064)
02-07 13:46:31.103 19094 20044 D PjSipLogWriter: 13:46:31.103 tsx0xc2990064 ..Sending Request msg REGISTER/cseq=7015 (tdta0xc4a4f064) in state Null
02-07 13:46:31.103 19094 20044 D PjSipLogWriter: 13:46:31.103 sip_resolve.c ...DNS resolver not available, target 'dev.carusto.com:5060' type=TCP will be resolved with getaddrinfo()
02-07 13:46:31.104 3310 3816 D EnterpriseController: netId is 0
02-07 13:46:31.104 3310 3816 D Netd : getNetworkForDns: using netid 523 for uid 10265
02-07 13:46:31.104 3310 3816 D DnsProxyListener: DNSDBG::dns addrinfo af 2
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: 13:46:31.105 sip_resolve.c ...Target 'dev.carusto.com:5060' type=TCP resolved to '37.97.232.22:5060' type=TCP (TCP transport)
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: 13:46:31.106 pjsua_core.c ...TX 716 bytes Request msg REGISTER/cseq=7015 (tdta0xc4a4f064) to TCP 37.97.232.22:5060:
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: REGISTER sip:dev.carusto.com SIP/2.0
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: Via: SIP/2.0/TCP 10.193.79.49:37961;rport;branch=z9hG4bKPj85c148ed-78b8-45d8-a460-82bdc39a53cf;alias
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: Route: <sip:dev.carusto.com:5060;transport=tcp;lr>
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: Max-Forwards: 70
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: From: <sip:1000@dev.carusto.com>;tag=b91e575e-d6f7-4596-b99f-55aa51dc361b
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: To: <sip:1000@dev.carusto.com>
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: Call-ID: 3a5ec4c0-4d3a-4d7d-9dfa-35ef5ec8037a
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: CSeq: 7015 REGISTER
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: User-Agent: React Native PjSip (2.7.1)
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: Supported: outbound, path
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: Contact: <sip:1000@10.193.79.49:37961;transport=TCP;ob>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-0000-0000-0000e922f243>"
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: Expires: 300
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: Content-Length: 0
02-07 13:46:31.106 19094 20044 D PjSipLogWriter:
02-07 13:46:31.106 19094 20044 D PjSipLogWriter:
02-07 13:46:31.106 19094 20044 D PjSipLogWriter: --end msg--
I've found there is a problem with TLS transport, do you use TLS ?
i've UDP
I have tried TCP and UDP. Fails in both cases
I've UDP too
Please re-check again with 2.7.3, I've fixed TLS transport for armeabi-v7. This version works well on my samsung s7.
Fixed! Thanks!
@datso @rcorrie When i attempt to make a call using the makeCall method the endpoint Instance I get a PJ_EBUSY (object is busy) error with an error code 70011.