question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In BroadcastReceiver -> onIncomingCall event is not receiving when call coming.

See original GitHub issue

In BroadcastReceiver -> onIncomingCall event is not receiving when call coming. Only the onCallState receiving. Here is the log

D/SipAccount: Added incoming call with ID 0 to sip:47419
D/SipAccount: Sending 180 ringing
D/SipServiceBR: onCallState - accountID: sip:47419, callID: 0, callStateCode: 2, callStatusCode: 100, connectTimestamp: 0, isLocalHold: false, isLocalMute: false, isLocalVideoMute: false
D/SipServiceBR: onCallState - accountID: sip:47419, callID: 0, callStateCode: 3, callStatusCode: 180, connectTimestamp: 0, isLocalHold: false, isLocalMute: false, isLocalVideoMute: false
D/SipAccount: Removing call with ID: 0
D/SipServiceBR: onCallState - accountID: sip:47419, callID: 0, callStateCode: 6, callStatusCode: 487, connectTimestamp: 0, isLocalHold: false, isLocalMute: false, isLocalVideoMute: false

In Previous version it is coming as expected. Issue is in the new version.

Also Outgoing call is not woring CallStatusCode: 0 always.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
lahirutmcommented, Jun 15, 2021

Resolved the issue by commenting out and putting this in BroadcastEventEmitter.Java

//sendExplicitBroadcast(intent); mContext.sendBroadcast(intent);

0reactions
lahirutmcommented, Jun 16, 2021

Resolved the issue by commenting out and putting this in BroadcastEventEmitter.Java //sendExplicitBroadcast(intent); mContext.sendBroadcast(intent);

I use a manifest level receiver which requires that type of broadcast but I could use the implicit broadcast as a fallback in case the explicit one fails. Have you noted if it was failing (return false) ?

Looks like it is not returning anything, i will check more. Incoming call issue sorted out as mentioned above, but i am still having the issue with outgoing calls (It is not related to the broadcasting). Call is not going to server side.

This is the Run Log. D/SipAccount: New outgoing call with ID: 0 D/SipServiceBR: onCallState - accountID: sip:123456@sipdomain.com, callID: 0, callStateCode: 1, callStatusCode: 0, connectTimestamp: 0, isLocalHold: false, isLocalMute: false, isLocalVideoMute: false D/SipServiceBR: onOutgoingCall - accountID: sip:123456@sipdomain.com, callID: 0, number: 123456 D/SipServiceBR: onCallState - accountID: sip:123456@sipdomain.com, callID: 0, callStateCode: 6, callStatusCode: 408, connectTimestamp: 0, isLocalHold: false, isLocalMute: false, isLocalVideoMute: false D/SipServiceBR: onCallState - accountID: sip:123456@sipdomain.com, callID: 0, callStateCode: 6, callStatusCode: 408, connectTimestamp: 0, isLocalHold: false, isLocalMute: false, isLocalVideoMute: false D/SipAccount: Removing call with ID: 0

PCAP file 2021_06_16_091814.pcap.txt

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Broadcast receiver is not triggered for incoming calls
If you use android.intent.action.PHONE_STATE you need to request READ_PHONE_STATE permission first. Because android.permission.
Read more >
BroadcastReceiver | Android Developers
This method is called when the BroadcastReceiver is receiving an Intent broadcast. ... In particular, if the broadcast you are receiving is not...
Read more >
Android BroadcastReceiver Example Tutorial - DigitalOcean
The onReceiver() method is first called on the registered Broadcast Receivers when any event occurs. The intent object is passed with all the ......
Read more >
Android BroadcastReceiver - Tutorial - Vogella.com
If the event for which the broadcast receiver has registered happens, the onReceive() method of the receiver is called by the Android system....
Read more >
Detecting Incoming Phone Calls In Android - The App Guruz
Broadcast receiver respond to broadcast messages (intent, events etc.) ... In order to receive phone call state in an application, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found