datso / react-native-pjsip

A PJSIP module for React Native.
http://datso.github.io/react-native-pjsip
GNU General Public License v3.0
273 stars 232 forks source link

Cannot place incoming call on hold #84

Closed mattyleggy closed 6 years ago

mattyleggy commented 6 years ago

Cannot place an incoming call on hold as it says: Call/Transaction Does Not Exist. Does this on both Android and iOS. Works fine for outbound calls.

datso commented 6 years ago

Hey, could you please attach the SIP trace ? (tcpdump, or logs from adb logcat | grep PjSip)

YawenD commented 6 years ago

Hi, similar problem I think. Put an outbound call in hold and then unhold it is fine. However I can't hear anymore when I do the same for an incoming call.

mattyleggy commented 6 years ago

@datso - Here's the log from adb logcat | grep PjSip when placing a call on hold and it failing. logs2.txt

datso commented 6 years ago

Thanks, for the logs. Could you please comment the transports creation for TCP / TLS, and try again.

{
                TransportConfig transportConfig = new TransportConfig();
                transportConfig.setQosType(pj_qos_type.PJ_QOS_TYPE_VOICE);
                mTcpTransportId = mEndpoint.transportCreate(pjsip_transport_type_e.PJSIP_TRANSPORT_TCP, transportConfig);
                mTrash.add(transportConfig);
            }
            {
                TransportConfig transportConfig = new TransportConfig();
                transportConfig.setQosType(pj_qos_type.PJ_QOS_TYPE_VOICE);
                mTlsTransportId = mEndpoint.transportCreate(pjsip_transport_type_e.PJSIP_TRANSPORT_TLS, transportConfig);
                mTrash.add(transportConfig);
            }
mattyleggy commented 6 years ago

@datso - Where should that be added?

YawenD commented 6 years ago

@mattyleggy I think its in the PjSipService class from yourProject/node_modules/react-native-pjsip/android/src/main/java/com/carusto/ReactNativePjSip/PjSipService.java

mattyleggy commented 6 years ago

@iBuntaah - Thanks for pointing me to the correct location.

I found that my issue was due to the way I was calling a different extension in Asterisk for testing purposes. Works fine in a normal Asterisk environment.