naresh924 / csipsimple

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

[Android 2.3] Add interface to use new stock SIP instead of pjsip #452

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
 * Abstract the interface used for pjsip in the same than the interface available on android 2.3
 * Add a glue to choose android 2.3 sip stack/pjsip stack alternatively and regarding the phone we are running on.

Original issue reported on code.google.com by r3gis...@gmail.com on 6 Dec 2010 at 4:55

GoogleCodeExporter commented 9 years ago
"This allows VoIP dialing without going through the third party applications" 
(http://www.google.com/nexus/#!/features) - does it mean they have frontend 
too, and csipsimple and the rest of sip agents are becoming redundant?

Original comment by egcros...@gmail.com on 6 Dec 2010 at 9:51

GoogleCodeExporter commented 9 years ago
Yes, they have frontend (integrated with standard dialer). Although some 
features are missing (e.g. filters, use of mobile network for sip calls), it 
looks like the end of third party SIP apps.

http://static.googleusercontent.com/external_content/untrusted_dlcp/www.google.c
om/en//googlephone/AndroidUsersGuide-2.3.pdf

Original comment by egcros...@gmail.com on 6 Dec 2010 at 10:11

GoogleCodeExporter commented 9 years ago
My understand is that there is no frontend on the stock app (unless carrier add 
it) :

http://developer.android.com/sdk/android-2.3-highlights.html
---
Internet calling

The user can make voice calls over the internet to other users who have SIP 
accounts. The user can add an internet calling number (a SIP address) to any 
Contact and can initiate a call from Quick Contact or Dialer. To use internet 
calling, the user must create an account at the SIP provider of their choice 
— SIP accounts are not provided as part of the internet calling feature. 
Additionally, support for the platform's SIP and internet calling features on 
specific devices is determined by their manufacturers and associated carriers. 

---

Besides tried 2.3 on the emulator and no front end...

So there is a need of an app to allow to configure it !!

And besides CSipSimple is already designed to abstract the UI and the sip 
stack. My API interface between sip stack (for now pjsip) and UI is almost the 
same than the one proposed by Android. 
So CSipSimple is really the best project to have something working really soon 
on the top of the android SIP stack.

It will be optional. CSipSimple will allow users to choose between pjsip or the 
stock android sip stack if available (2.3).
It's amazingly exciting cause it also mean that contact API in android will be 
enriched with SIP entries.
All my work was not the SIP stack (SIP stack is pjsip) but the user interface 
to manage SIP accounts and SIP calls !! 

And now I'm really happy with the fact I did a true split between the SIP stack 
and the java application :). It doesn't mean that I'll drop pjsip. Just that 
I'll allow users to use the CSipSimple with the stock stack (which will be 
probably much more optimized for android - battery consumption etc etc) but 
probably not with all features of pjsip.

So my approach was already modular. And now it will take all its sense ! We can 
even imagine to switch the same account from pjsip to stock sip stack. 
(depending on codecs we want to use etc etc).

Well a *lot* of work. But really exciting !! I hope that it will also lead 
people to help me on the project since it really absolutely make sense now ! 
And definitely if we succeed to do that, all other SIP agents will sounds 
really outdated compared to CSipSimple (with the availability to rely on pjsip 
*or* on the android stock sip stack).

The only thing that it outdate it is the plugin approach of CSipSimple for Sip 
providers. (even if some will need more features than the stock sip stack). But 
plugin approach was almost pjsip_android + an java API on the top of it. Not 
the UI effort (which actually is CSipSimple).

Original comment by r3gis...@gmail.com on 6 Dec 2010 at 10:20

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Well, still didn't find the "Account config" in the emulator setting !!

Is SIP a non opensource part of Android??? 

Original comment by r3gis...@gmail.com on 6 Dec 2010 at 10:26

GoogleCodeExporter commented 9 years ago
I have no idea. I, too, don't see the relevant settings in the emulator running 
"stock" gingerbread image. But NexusS user manual is quite unambiguous about 
the matter: the user can configure SIP account (page 75) and make SIP calls 
(page 85) without any third party apps. Maybe it's not open source or maybe it 
needs to be specifically enabled when building the system image.

Original comment by egcros...@gmail.com on 7 Dec 2010 at 6:20

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

Original comment by r3gis...@gmail.com on 19 Dec 2010 at 10:37

GoogleCodeExporter commented 9 years ago
Loaded Gingerbread on the HTC Desire.  Accounts can be configured under 
Settings -> Call Settings.  Under option Internel Call Settings, there are some 
basic settings to add sip accounts, and how to use the sip service.  

I don't see any indication though if I'm actually registered successfully or 
not and it seems I can't call sip using the 3G network (probably on purpose)

Original comment by mcampbel...@gmail.com on 20 Dec 2010 at 10:51

GoogleCodeExporter commented 9 years ago
The equivalent issue in sipdroid is reported here:
http://code.google.com/p/sipdroid/issues/detail?id=792

Original comment by lunatick...@gmail.com on 21 Dec 2010 at 1:43

GoogleCodeExporter commented 9 years ago
Will be more complicated for SipDroid's guys cause their code is not designed 
to separate the stack from the UI ;) .... 

I've already done some changes to have this feature landed... now I miss a 
phone with the SIP gingerbread feature available on it... (Cause else this 
feature is impossible to test on the emulator and I never do blind coding ;) ).

As soon as I'll have something to test on it will be really quick to have this 
landed. The android interfaces already really look likes mine.

I've also ported back some piece of code from the new gingerbread to csipsimple.
However there is some part of their code that afraid me a little bit in term of 
battery usage ! 
Other parts are really interesting (and I've already re-used these parts ;) 
apache license is compatible with gpl ;) ).
But other parts make me thinking that :
1 - the 2.3 stock stack will be far to be efficient in call (java code + only 
g711 & gsm codec)
2 - the 2.3 stack may consume more battery that I thought previously (I thought 
that they did something that did not need of a partial wake lock of the phone 
while reading the code they seems to simply lock the CPU activity while 
registered)

Original comment by r3gis...@gmail.com on 21 Dec 2010 at 7:10

GoogleCodeExporter commented 9 years ago
i tested an early gingerbread build on my desire and i'm a little bit 
disappointed. i couldn't register to my phonebox (running dtmfbox).

i think a alternative sip-client will be fine for a long time. first, because 
of the limited feature-set of the system sip client. secondly, because the 
userbase of 2.3+ will increase slowly (esp. for older devices - see sony X10).

Original comment by matthias...@googlemail.com on 21 Dec 2010 at 10:02

GoogleCodeExporter commented 9 years ago
I completely agree with Matthias, so I found the "Donate" link and contributed 
to the project. CSipSimple has a fabulous future ahead! 

Original comment by steve.lo...@gmail.com on 21 Dec 2010 at 11:02

GoogleCodeExporter commented 9 years ago
Ok, well in a first time I'd say good news for me ;)

However I keep this issue open and with a high priority in my mind :

Reason : if I can get it working in the ways CSipSimple -> stock SIP api... it 
will not be too much hard to make CSipSimple *provide* the stock SIP api... and 
why not replace in some custom ROMs (Cyanogen if you listen ;).... ) the google 
implementation by a part of CSipSimple+pjsip :)

Original comment by r3gis...@gmail.com on 21 Dec 2010 at 11:32

GoogleCodeExporter commented 9 years ago
I installed Oxygen Gingerbread on my Desire, so r3gis, if you want me to test 
anything - I can.

Original comment by egcros...@gmail.com on 22 Dec 2010 at 1:40

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thx egcrosser :)

Can you confirm that it still works. (There where a quick post deleted by the 
writer saying it doesn't work anymore on 2.3). So if you can confirm that for 
you it works could be a good starting point.

Also as I've a doubt on the UDP/TCP port bound locally by native stack, can you 
test that with one SIP account configured on the stock SIP stack + one other 
account configured on the CSipSimple stack, you don't get an error at the init 
of the CSipSimple stack (port already bind error for example).

For the rest, I'll wait for my N1 to be upgraded (according tweets from google 
guys should land in the next weeks). As I'm used to do unitary tests while 
developing will be easier for me to have the gingerbread version directly on it 
:).

Original comment by r3gis...@gmail.com on 23 Dec 2010 at 10:54

GoogleCodeExporter commented 9 years ago
.16 dev build works fine on Oxygen 2.0 RC2.

When "dialer integration" is enabled, it makes impossible to make mobile call. 
Without csipsimple, I am presented with a choice of mobile and native sip, but 
with csipsimple, there is a choice between csipsimple and native sip. No way to 
select mobile.

At the moment, I do not have wifi connection (LEAP stopped working in 2.3) so I 
cannot check if the local port conflict exists. Native sip does not work over 
mobile network. (I ran csipsimple over hsdpa and was impressed how well it 
worked). Will report when I have a chance to try.

Original comment by egcros...@gmail.com on 23 Dec 2010 at 1:28

GoogleCodeExporter commented 9 years ago
I configured the builtin agent and csipsimple to register with different 
accounts (202 and 201 respectively) to the same server. It works; apparently 
the builtin agent uses a random high port:

202/202  111.222.33.44   D   N      44857    Unmonitored           
201/201  111.222.33.44   D   N      5060     Unmonitored

Original comment by egcros...@gmail.com on 23 Dec 2010 at 10:22

GoogleCodeExporter commented 9 years ago
Re. dialer integration: if I enable it I actually _can_ call mobile: I am first 
presented by a choice between "CSipSimple" and "Dialer" (with SIP icon). If I 
select "CSipSimple", the next choice pops up between CSipSimple's account and 
"Use mobile".

Original comment by egcros...@gmail.com on 23 Dec 2010 at 10:29

GoogleCodeExporter commented 9 years ago
Audio driver for OpenSL .... DONE ! :D

First call on Nexus S sounds very.

I'll try to make a "Gingerbread" build tonight. 
I've to find a way to make "universal" pjsip builds for gingerbread and older 
android versions. 

Original comment by r3gis...@gmail.com on 10 Feb 2011 at 4:32

GoogleCodeExporter commented 9 years ago
For owners of devices with android 2.3 :
http://nightlies.csipsimple.com/ginger/

It uses the OpenSL driver. 
You'll probably not notice big audio difference.
It's just : 
* more reliable (should be ;) )
* consume less CPU (tested on nexus S from 26% to 23%)
* remove occasional crackling due to garbage collector.

Original comment by r3gis...@gmail.com on 13 Feb 2011 at 4:55

GoogleCodeExporter commented 9 years ago
Works on Desire/O2 2.0rc7, no problems noticed so far.
As you are working on gingerbread version, may I remind you of the ticket #535? 
The original request, not the one from the comment 1. Sorry for pestering...

Original comment by egcros...@gmail.com on 13 Feb 2011 at 5:17

GoogleCodeExporter commented 9 years ago
Does this rely on pjsip at all? I'm running the ginger build you linked 
yesterday and still am hitting the STUN not responding error from bug #545, 
which was thought to be related to pjsip.

Original comment by christop...@gmail.com on 14 Feb 2011 at 3:14

GoogleCodeExporter commented 9 years ago
@christop : yes still relying of CSipSimple this step is about the OpenSL ES 
driver, not the stock SIP application.

The Stock SIP app is the next step of this issue ;).

Original comment by r3gis...@gmail.com on 14 Feb 2011 at 9:03

GoogleCodeExporter commented 9 years ago
also with android 4.2.2 there is a stock sip feature .

i tried it but sound is very choppy thus i can't use stock sip feature .

that's why i installed Csipsimple .

what is the advantage for csipsimple using stock sip feature ?

Original comment by episteme...@gmail.com on 25 Feb 2015 at 12:05