krunal09 / sample

Automatically exported from code.google.com/p/csipsimple
0 stars 0 forks source link

Conflict with GV Dialer Integration #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install the Google Voice app and configure it with your GV number.
2. Set the GV app to prompt the user on each dial whether or not to use GV.
3. Set cSIPSimple to integrate with the dialer.
4. Select a contact to call, or dial a number from the dialer.

What is the expected output? What do you see instead?

The result is that you're first prompted with the GV integration. Whether you 
choose to use GV or not, it then passes to the cSIPSimple integration, which 
prompts you to choose between SIP and GSM. Selecting either one of these 
returns you to the GV prompt, and you keep looping between the two. In short, 
you can never complete your call.

What version of the product are you using? On what operating system?

Motorola Droid, Android 2.2, latest Google Voice.

Original issue reported on code.google.com by pcmst...@gmail.com on 24 Jun 2010 at 8:28

GoogleCodeExporter commented 9 years ago
Well I've no google voice to test it and google voice is not open source.
Will be hard to test for me.

I don't really know how google voice manage outgoing calls.

Just something you can try and that will help me :
Go to CSipSimple, Menu > Option > User interface and uncheck the Activate 
integration box. Then retry to place a call using the native dialer. Say me if 
GV dialer loop alone or if you can place a call.

Original comment by r3gis...@gmail.com on 25 Jun 2010 at 9:34

GoogleCodeExporter commented 9 years ago
Results:

1) Enable GV to "ask each time I call" and enable active integration on 
cSIPSimple -- loops between GV selector and cSIPSimple selector infinitely 
until you select SIP. Can't place non-SIP call.

2) Disable cSIPSimple active integration -- GV selector works as intended.

3) Enable cSIPSimple active integration and set GV integration to "always use 
GV" (no prompt from GV) -- loops through cSIPSimple prompt infinitely until 
selecting SIP. Can't place non-SIP call.

4) Disable GV integration entirely, enable cSIPSimple integration -- cSIPSimple 
integration works as expected, but GV does not.

Hope this helps.

(Note, I can install adb and run commands to debug if that would help. I'm 
already rooted, etc.)

Original comment by pcmst...@gmail.com on 25 Jun 2010 at 7:45

GoogleCodeExporter commented 9 years ago
This is an excellent report, thanks for the detail. I'm new to Android dev and 
taking baby steps with CSipSimple to help Regis. This one sounds like something 
I can dig into. I'm assuming that (3) above allows placing a SIP call (only)? 
Basically CSipSimple needs to activate the mobile dialer or its own SIP service 
in a way that doesn't allow the GV filter/selector to operate AGAIN.

So Regis, did you maybe fix this already? I just want to know before I spend 
time learning what I need to attack the problem.

Original comment by dc3de...@gmail.com on 14 Jul 2010 at 3:18

GoogleCodeExporter commented 9 years ago
Researching I found at 
http://developer.android.com/reference/android/content/Intent.html#ACTION_NEW_OU
TGOING_CALL that the priority should not be negative, yet it is -1 in 
AndroidManifest. Could this be the source of the problem? I might play with 
this if I get time tomorrow.

Original comment by dc3de...@gmail.com on 14 Jul 2010 at 4:04

GoogleCodeExporter commented 9 years ago
No I didn't start this point. You can try with a non negative value for 
NEW_OUTGOING_CALL action but I'm not sure it will work.

I think that there is surely something to do inside .service.OutgoingCall to 
prevent the next ask to the currently dialed number to be handled by csipsimple 
chooser.
That's already the way it prevent looping with other sip dialers such as 
sipdroid one for example.
What is possible is that GV add something to the phone number that make it 
different between the first call of OutgoingCall and the second one made after 
the GV popup.

If you can try to debug this point it's cool. It's hard to me to create a GV 
account (since not available with french google accounts).

P.S. : Really happy to see at my wake-up that there where a lot of activity :) 
Great job!

Original comment by r3gis...@gmail.com on 14 Jul 2010 at 8:55

GoogleCodeExporter commented 9 years ago
OK, I'll try.

Original comment by dc3de...@gmail.com on 14 Jul 2010 at 11:24

GoogleCodeExporter commented 9 years ago
Here is what I am seeing (r147):

1. Call, select "without GV"
2. Now see CSipSimple, select "use Mobile"
3. Now see GV selector again, select "without GV"
4. Call is placed via Mobile

I am not seeing an infinite loop between the two dialers. The same sequence 
occurs when selecting "with GV" or "without GV" in either or both steps 1 and 
3, it always results in the mobile call being placed in step 4.

If in step 2 (CSipSimple) you select one of the SIP accounts, the call is 
immediately placed via SIP. In this case, the behavior is already acceptable. 
The only design choice is which of the two selectors should appear first. My 
feeling is that CSipSimple should be the first to appear :-) but this may not 
be possible due to not having control over GV's intent priority.

Original comment by dc3de...@gmail.com on 14 Jul 2010 at 7:33

GoogleCodeExporter commented 9 years ago
Did you try the <<set GV integration to "always use GV" (no prompt from GV)>> 
Use Case?

The double ask from GV is "normal" since GV don't make the check that I 
implemented (and that is also done by sipdroid for example... they don't use 
the same way but the result is quietly the same).

In fact, sipdroid and csipsimple catch the "tel:" intent. If the tel number is 
unknown, (and under other network conditions), they propose the user what to do 
with the call. When they propose something to the user, the intent is cleared 
and no other application will be notified of this ongoing intent.
If you choose GSM, a new intent will be done. By the way, the app will be 
notified once again that a tel: intent is launched.
CSipsimple will be notified of this, but as it remember that the user has just 
asked to use GSM for this call, it will not catch the intent and let other 
application to handle this intent.

It appears that GV doesn't act the same way. They probably don't take care of 
this issue and use private apis. 
But unfortunately nothing can be done to solve this issue without modifying GV. 
Unless there is way to : 
* directly call gsm instead of publishing a new "tel:" intent
* stop the intent propagation while asking the user what to do with this intent 
instead of cancelling the intent.

Original comment by r3gis...@gmail.com on 14 Jul 2010 at 8:46

GoogleCodeExporter commented 9 years ago
OK, I will soon digest all of this, I am in the middle of instrumenting and 
learning how it all works now.

Original comment by dc3de...@gmail.com on 14 Jul 2010 at 8:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Well, after 4.5 hours, I cannot find a way to handle this. One problem is that 
there seems to be no way get in front of Google Voice. I wanted to have CSip's 
call selector to appear before Google Voice, and only if you choose Mobile, 
then Google Voice's selector appears. I played with several approaches, and put 
the priority of CSip's receiver even at 99999 and GV still gets control first, 
and again when you start a new cycle. I'm right back where I started :-( but I 
have learned a lot about how the OS manages things!!

Now I have an even better understanding of your insight in your post starting 
with 

> Did you try the <<set GV integration to "always use GV" (no prompt from GV)>>

I did try that, and there is no problem. Choosing Mobile results in a Google 
Voice mobile call, and choosing a CSip account results in a SIP call. Only with 
the "ask" option is there trouble.

Original comment by dc3de...@gmail.com on 15 Jul 2010 at 1:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by dc3de...@gmail.com on 16 Jul 2010 at 2:41

GoogleCodeExporter commented 9 years ago
I believe it's a limitation of Android that there is no proper way to have more 
than one app try to intercept outgoing calls.  I've tried several such 
combinations of apps, and I never found a way to have them interact in a 
reasonable way. In particular, you never know which app is going to intercept 
the call first.  Having a pair of apps set to prompt doesn't yield the expected 
result of being prompted a second time if you answer "no" to the first prompt.

The solution to this problem is to configure only one app to intercept outgoing 
calls.  

Original comment by bala...@gmail.com on 30 Oct 2010 at 2:01

GoogleCodeExporter commented 9 years ago
I can only get this to work correctly if I use GV, GV callfree (fish stix), and 
GSipSimple together. Place the call from gv app (not phone app), select call 
with GV, and CSipSimple will ring. 

Original comment by sleepgu...@gmail.com on 10 Dec 2010 at 10:31

GoogleCodeExporter commented 9 years ago
Is the integration with GV ever going to be fixed. I am not able to use the APP 
until it is. I really like the interface but the app will not let me make SIP 
calls. I have tried several other apps and they work fine. Yours still needs 
work.

Original comment by SYo...@gmail.com on 13 Apr 2012 at 4:42

GoogleCodeExporter commented 9 years ago
Issue 1737 has been merged into this issue.

Original comment by r3gis...@gmail.com on 16 May 2012 at 8:06

GoogleCodeExporter commented 9 years ago
In the settings I found an option to "Integrate Privileged Intent". The option 
tells you to disable the Dialer Integration option. If I do this, I get a 
select box like the one you get to choose which app to use to open a file 
rather than the CSIPSimple box asking to use SIP or Mobile for the call. I 
Selected "SIP" and "Always".

Using this setup, I can make GV/Mobile calls as well as SIP calls without 
issue. I was getting stuck in a loop before using GV if dialer integration was 
enabled. Now I get the CSIPSimple prompt, and GV calls work. I tested with the 
GV app set both to "Prompt" and "Always" mode. Both work fine here. 

GSM Galaxy Nexus
AOKP nightly build (JellyBean)
CSipSimple r1841

Original comment by ttab...@gmail.com on 28 Aug 2012 at 8:13

GoogleCodeExporter commented 9 years ago
I got the looping behavior too but only when I select the Mobile option. When I 
select SIP, there was no conflict. This started happening recently. I'm using 
the csipsimple build currently available on the Play store (0.04-01). I can't 
find the option to "Integrate Privileged Intent" mentioned by ttab... I've 
posted a comment on the Google Voice board, but I'm not sure if the issue fits 
better on the csipsimple board.

Original comment by jokel...@gmail.com on 6 Sep 2012 at 3:01

GoogleCodeExporter commented 9 years ago
Zhang365
�� 2012-9-6 ����11:02�� <csipsimple@googlecode.com>���

Integration

When I select SIP, there was no conflict. This started happening recently.
I'm using the csipsimple build currently available on the Play store
(0.04-01). I can't find the option to "Integrate Privileged Intent"
mentioned by ttab... I've posted a comment on the Google Voice board, but
I'm not sure if the issue fits better on the csipsimple board.

Original comment by z.yo...@gmail.com on 6 Sep 2012 at 3:13

GoogleCodeExporter commented 9 years ago
Here is the solution approach I took.

In CSipSimple, set the integration to "Integrate privileged intent" under the 
User Interface options.
In Google Voice, set the dialing preference to "Use GV to make all calls."

Attempting to make a call in the stock dialer brings up the familiar "app 
selection" choice.  If you select CSipSimple, it still brings up the "SIP Call" 
selection dialog.  Here selecting "Use mobile" goes right through for me.  
Likewise, selecting IP works great.

Though, with this setup you will always be presented with the choice (if wifi 
is available at least).  I think this depends on your account settings within 
CSipSimple.

GL

Original comment by toby.she...@gmail.com on 12 Dec 2012 at 4:59

GoogleCodeExporter commented 9 years ago
yep same issue, gvoice installed, endless cycle when trying to select phone 
instead of sip.

To get around had to disable integrate with android, 
and in User Interface to set "Integrate privileged intent" and make sure the 
above option is diasabled.

Original comment by lanbla...@gmail.com on 21 Dec 2012 at 6:50

GoogleCodeExporter commented 9 years ago
Issue 906 has been merged into this issue.

Original comment by r3gis...@gmail.com on 10 Mar 2013 at 12:48

GoogleCodeExporter commented 9 years ago
#21 above has solved this problem for me. Wish I had found it sooner... I ended 
up in way too many loops using the standard integration. 

Original comment by m...@nocompany.org on 20 Mar 2013 at 3:19

GoogleCodeExporter commented 9 years ago
Hi, I have Xperia Go and after update to Android 4.1.2  I have problem with 
incoming calls. Without Csipsimple in phone everything works fine. With app in 
phone first 2-5sec I can´t hear nothing. I don´t speak about voip calls, but 
gsm calls :-( In 4.0.4 no problem. Phone is after hard reset. Android core 
3.0.8+, 6.2.A.0.400, CSIPS 0.04-04r1916 from Gplay.
After update to CSIPS 1.00 its better, but after first out voip call there is 
problem with ringing - on screen I see incomming GSM call and I can answer, but 
ringing sound is delayed 4sec. After phone switch off/on everything works fine, 
but one voip call and problem is back...

Original comment by seliveph...@gmail.com on 11 May 2013 at 5:34

GoogleCodeExporter commented 9 years ago
the privileged intent option doesnt seem to be working on Nexus 5, kit kat.
With normal dialer integration the loop as previously reported happens. With 
privileged intent option, it ignores csipsimple and just dials directly on 
google voice.

Original comment by guille...@krawiec.com on 13 Nov 2013 at 7:46

GoogleCodeExporter commented 9 years ago
I'm also having problems with the privileged intent option on 4.4.2, Atrix HD.  
It just goes through regular mobile with that option on and the other option 
off.

Original comment by johnny...@gmail.com on 13 Jun 2014 at 3:00