5,598,779 Members 34,354 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] How to add native android SIP stack for Wifi AND 3G calls (full instructions)

Tip us?
 
mobilegalaxy
Old
(Last edited by mobilegalaxy; 4th June 2011 at 12:22 PM.)
#1  
Junior Member - OP
Thanks Meter 33
Posts: 19
Join Date: Jun 2011
Smile [GUIDE] How to add native android SIP stack for Wifi AND 3G calls (full instructions)

As most of you have probably already figured out by now the Samsung Galaxy S II, despite running Android 2.3.3, doesn’t have the native Android SIP Stack integrated.

Normally, all smartphones running Android 2.3.3 or higher come with a native SIP stack, allowing handset owners to register their SIP accounts to make and receive calls through VoIP.

Unfortunately this feature has been deliberately dropped by the Samsung cowards who obviously bowed to the pressure of greedy telecom providers (we all know how adamant these sorts of companies are about having this feature disabled).

There are various VoIP clients available on the market (both free and paid) that you can use for making VoIP calls (Sipdroid, csipsimple, etc.) but I’d definitely recommend giving the original Android SIP stack a try as it works nicely and reliably.

Here are the full step by step instructions for enabling the native SIP stack on your Galaxy S II again (I think there’s already a similar thread out there by a member named jarsiv, but I decided to create a dedicated thread describing all steps thoroughly):

- Unzip the attached file “android.software.sip.voip.zip” and add it to “system\etc\permissions\". After you’re done, reboot your phone and voila you can enjoy the benefits of the native SIP stack again

By default, the native Android SIP stack only allows for VoIP calls placed via Wifi (it seems that even the mighty G from mountain view bowed to the telecom operators), but there is a way to enable support for VoIP calls via 3G as well:

- You need to modify your framework-res.apk to enable SIP over 3G by editing the xml file "res\values\bools.xml" and setting the parameter for "config_sip_wifi_only" to false.

In order to modify your framework-res.apk you’ll need to follow the following instructions (again this is only necessary if you want to enable 3G support and not required if you only want to place VoIP calls via Wifi):

- Download the program “APK Manager” (just search the forum) and install it on your PC
- Copy your original "framework-res.apk" (via adb push or root explorer) to your PC and place your original "framework-res.apk" into the "\place-apk-here-for-modding\" folder
- Launch "script.bat"
- Press 22 to set your project and choose "framework-res.apk" as your project by pressing 1
- After setting "framework-res.apk as your project, press 9 to Decompile the apk
- Edit the xml file "res\values\bools.xml" and change the parameter for "config_sip_wifi_only" from “true” to “false”
- Recompile the apk by pressing 11
- When asked whether it is a system file, answer “yes”
- When asked "would you like to copy over any additional files...?", answer “yes”
- The script will be temporarily paused and you shouldn’t press a key now.
- Now go to the “keep” folder (located in the same folder as "script.bat")
- In the “keep” folder delete the following file:
"resources.arsc"
- Go back to the "script.bat" screen and press a key to let the program finish the job
- Your new "framework-res.apk" has been created and can be found in the "\place-apk-here-for-modding\" folder (it’s called "unsignedframework-res.apk" and doesn’t work yet).
- After unzipping the entire content of the "unsignedframework-res.apk" you should have 5 objects (3 folders and 2 files).
- Now zip these files with Winzip choosing "No compression" as zipping method
- After zipping it, rename the zip into "framework-res.apk".
- Now you can use root explorer or adb push to replace the original framework.apk with your newly created "framework-res.apk".
- Reboot your phone.


Enjoy the native SIP stack with support for both Wifi and 3G

Note: If you’re sitting behind a NAT you might not be able to receive incoming calls after a while as the keep alive packets (even when set to “always send”) sent by your android phone don’t seem to suffice to keep the connection alive. Unfortunately the keep-alive interval can’t be changed manually in Android 2.3.3 meaning this issue has nothing to do with your Galaxy S II but rather with the Android native stack.


Good luck and enjoy your VoIP calls
Attached Files
File Type: zip android.software.sip.voip.zip - [Click for QR Code] (659 Bytes, 12721 views)
The Following 20 Users Say Thank You to mobilegalaxy For This Useful Post: [ Click to Expand ]
 
till69
Old
#2  
Junior Member
Thanks Meter 9
Posts: 27
Join Date: Aug 2010
Nice, but native SIP is using wrong mic.

So its pretty useless right now. I recommend CSipSimple (nightly ginger builds), which works excellent, is integrated as well and let you choose a better codec.
The Following 2 Users Say Thank You to till69 For This Useful Post: [ Click to Expand ]
 
mobilegalaxy
Old
#3  
Junior Member - OP
Thanks Meter 33
Posts: 19
Join Date: Jun 2011
there's already a patch in work to fix the issue with the mic.

Btw I'm also a huge fan of CSipSimple and consider it to be the best open source SIP client out there, even surpassing sipdroid in terms of functionality and variety of settings.
The Following User Says Thank You to mobilegalaxy For This Useful Post: [ Click to Expand ]
 
js931
Old
#4  
Senior Member
Thanks Meter 44
Posts: 263
Join Date: Jul 2010
yep, csipsimple (nightly builds) is WAY better than sipdroid or built-in sip!

i'm a heavy sip user and tried everything.... csipsimple is the best!
The Following User Says Thank You to js931 For This Useful Post: [ Click to Expand ]
 
crypticc
Old
#5  
Senior Member
Thanks Meter 105
Posts: 1,057
Join Date: Aug 2009
Location: London
thanks. I am sure this is good stuff Dialling fully numeric numbers is possible if I set call settings to always ask whether to use internet calling, but the samsung dialer doesn't allow calling sip addresses in the internet call section of a contact.



Or am I missing something?
 
julianico
Old
#6  
Junior Member
Thanks Meter 2
Posts: 12
Join Date: Jun 2010
Here it is modified mi rom KE7
requires root root explorer or similar use, route to paste system / framework
perdon por mi ingles soy español
Attached Files
File Type: rar framework-res.rar - [Click for QR Code] (6.10 MB, 492 views)
The Following User Says Thank You to julianico For This Useful Post: [ Click to Expand ]
 
crypticc
Old
(Last edited by crypticc; 5th June 2011 at 12:46 AM.)
#7  
Senior Member
Thanks Meter 105
Posts: 1,057
Join Date: Aug 2009
Location: London
Quote:
Originally Posted by julianico View Post
Here it is modified mi rom KE7
requires root root explorer or similar use, route to paste system / framework
perdon por mi ingles soy español
here is same modified from

[30.05.2011][CF-Root v3.5] KE2/7 - su+bb+CWM3


I can get outbound calling to work now. inbound doesn't work at all.

update: inbound does work, just when sgsii picks-up the dialling phone continues to ring as though the phone wasn't answered (though there is echo of audio picked up by the sgsii). Maybe my dialing phone has faulty setup? i dunno.
Attached Files
File Type: zip framework-res.zip - [Click for QR Code] (4.66 MB, 276 views)
 
m_pascal
Old
#8  
m_pascal's Avatar
Member
Thanks Meter 5
Posts: 78
Join Date: Oct 2010
Location: Parma
I tried to make this trick but I don't know if it gone well.
I changed my framework-res.apk for to usa SIP under 3G but in settings I see a menu called "Use Internet Call (only WiFi)" (this in translated from italian, I don't know what is the right menu in english) with three options:
- For all calls
- Only for calls via Internet
- Ask me

Are the changes of framework-res.apk gone wrong?
 
cruiseyunfat
Old
#9  
Junior Member
Thanks Meter 1
Posts: 26
Join Date: Mar 2010
Quote:
thanks. I am sure this is good stuff Dialling fully numeric numbers is possible if I set call settings to always ask whether to use internet calling, but the samsung dialer doesn't allow calling sip addresses in the internet call section of a contact.

Or am I missing something?

For local SIP to dial you need to select allow receive calls under settings. Drains your battery like crazy though.
 
mobilegalaxy
Old
#10  
Junior Member - OP
Thanks Meter 33
Posts: 19
Join Date: Jun 2011
Quote:
Originally Posted by m_pascal View Post
I tried to make this trick but I don't know if it gone well.
I changed my framework-res.apk for to usa SIP under 3G but in settings I see a menu called "Use Internet Call (only WiFi)" (this in translated from italian, I don't know what is the right menu in english) with three options:
- For all calls
- Only for calls via Internet
- Ask me

Are the changes of framework-res.apk gone wrong?

It seems that you encountered some kind of error while editing the framework-res.apk because obviously you're stuck on the old settings. When I first attempted to add 3G VoIP calling I couldn't set it up successfully either but when I gave it another try I could eventually get it to work.

After successfully modifying your framework-res.apk you should see the following Internet calling settings:

Option "Use Internet calling":

- For all calls when mobile network available
- Only for Internet calls
- Ask for every call


You can also use one of the frameworks uploaded by julianico or crypticc and then it should work.

@crypticc are you located behind a NAT? What are your settings? What SIP provider are you using?

There are tons of factors that could potentially cause this problem but the more info you provide the more likely we can help.

The Following User Says Thank You to mobilegalaxy For This Useful Post: [ Click to Expand ]
Tags
sip, sip stack, voip
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes