1

I am developing a sip application that do sip to sip and sip to other phone calls. I also wanted to record the both. Finally, I found out that the linphone-sdk can solve the problems. I had integrated Linphone-sdk from their maven repository to my app. I am using another Sip client for calls (Not a linphone account). Outgoing calls are working perfectly. But, whenever we receive an incoming call to the sip account, the app gets terminated with an error in log cat.

As answered in this question, I changed the corresponding linphone service to a long running service, which can receive incoming calls when the app is not in the foreground. But that doesn't solve the problem.

mHandler = new Handler();
        // This will be our main Core listener, it will change activities depending on events
        mCoreListener = new CoreListenerStub() {
            @Override
            public void onCallStateChanged(Core core, Call call, Call.State state, String message) {
                android.util.Log.i(TAG, "onCallStateChanged: ");

                if (state == Call.State.IncomingReceived || state == Call.State.IncomingEarlyMedia) {
                    Log.i(TAG, "onCallReceived: ");
                    // For this sample we will automatically answer incoming calls
                    CallParams params = getCore().createCallParams(call);
                    params.enableVideo(false);
                    call.acceptWithParams(params);
               .....
            }
        };

As per the code, the call will be answered automatically, But for incoming calls, onCallStateChanged()never gets called and the logical output is as follows :

... ...

    2019-07-23 14:56:50.468 9248-9248/com.call.mysipapp I/liblinphone: Found payload AMR/8000 fmtp=mode-change-period=2
    2019-07-23 14:56:50.469 9248-9248/com.call.mysipapp I/liblinphone: Found payload AMR/8000 fmtp=mode-change-period=1

    --------- beginning of crash
2019-07-23 14:56:50.473 9248-9248/com.call.mysipapp A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x28 in tid 9248 (m.call.mysipapp)
Romil Patel
  • 12,879
  • 7
  • 47
  • 76
Ameena Shafeer
  • 626
  • 3
  • 18
  • 1
    Try disabling instant run and see if it works: https://stackoverflow.com/questions/46999669/how-to-disable-instant-run-for-android-studio-3-0 – Zohaib Amir Jul 23 '19 at 09:47
  • Also, it seems the error is in native code, you might want to google how to trace NDK errors to find out exactly what went wrong. – Zohaib Amir Jul 23 '19 at 09:57
  • Instant run is disabled in my case. I gone through this answer : https://stackoverflow.com/questions/17840521/android-fatal-signal-11-sigsegv-at-0x636f7d89-code-1-how-can-it-be-tracked But don't found out what I want. Also the linphone application itself is still having a bug like this. – Ameena Shafeer Jul 23 '19 at 10:01

0 Answers0