Puppy Phone - VOIP using SIP

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#316 Post by smokey01 »

The spreadsheet located at https://docs.google.com/spreadsheet/ccc ... c&hl=en_US should now be editable. I thought I had already made it so before, guess not :cry: :oops:

Please try again.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#317 Post by Lobster »

thanks Grant - look forward to putting in my details

- conference call in less than 2 hours, hope it is not too late for anybody
Grant has also been working on a start up sound setting wizard - look forward to hearing about that :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

gcmartin

Form

#318 Post by gcmartin »

smokey01 wrote:The spreadsheet ...
Hi @Smokey01. Please check your PM.

Hope this helps.

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#319 Post by smokey01 »

I have written a bit of code below that will run as a First-Run-Wizard. I call it psip-run and it can be placed anywhere, I suggest in /root/
It checks to see if .psip.conf exists in /root/

If it doesn't then it does the following:

1. Announces this is the first time you have used Psip
2. It will then turn on your input and output sound functions
3. It will then ask you to speak into your Mic for 5 seconds
4. Your voice will then be played back if all went well
5. If no voice playback you will need to adjust sound manually
6. Ports 4000-4007 and 5060 are opened
7. Psip is then run.

If the .psip.conf file is found it will run Psip without the sound setup and test.

For people running the 64bit version you will need to change psip32 to psip64 in the script.

There are so many combinations of sound cards and settings it's difficult to cater for them all.

Good luck and report back.

Code: Select all

Bad, naughty code deleted. New code further down the page.
Last edited by smokey01 on Thu 29 Sep 2011, 02:36, edited 2 times in total.

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#320 Post by smokey01 »

friendlybiker wrote:I've got an old droid, that's totally wireless and using GrooVe totally, just need to have a wifi connection.
I haven't tried that. It would be nice to test it though.

Keep an eye on the forum for our next conference. More than likely 1300h GMT British Summer time on Sundays.

It would be good if you could login with droid.

Sorry I didn't reply earlier, I missed your post.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#321 Post by Lobster »

Yep - Thursdays dropped - so next is:
1300h GMT British Summer time on Sundays

Yesterdays conference was interesting. I seem to have more problems with 1.1
than 1.0. Frustrating.
- that might be early optimisation (making the code more efficient)?

I am back to using the original HairyWill Psip (pre Puppy Phone) that Barry has in the Puppy Racy beta.
http://bkhome.org/blog/?viewDetailed=02510
and that is 94.5MB (will it inspire Micko to include Puppy Phone?)
I know Dogle, your caution is well advised but well . . . Puppy Phone . . . we are worth it (I think I have been owned by ads)

If possible will add iptel connection and try out . . . m m m . . . may just add 1.1 of Puppy Phone . . . decisions . . . decisions . . . :roll:

Thanks guys - testing is critical and we need more :roll:
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#322 Post by technosaurus »

The increased size of puppy phone over previous generations could be a limiting factor to inclusion. I looked into it myself and there are just too many additional libs that aren't already used (but they probably could be)
Which ones can be safely excluded ... all but gsm and spx?
can libgsm (and friends) be used by ffmpeg/mplayer/gstreamer instead of internal options ... or vice versa
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Caneri
Posts: 1513
Joined: Tue 04 Sep 2007, 13:23
Location: Canada

#323 Post by Caneri »

Hi T,

My apologies Techno....I was thinking in an entirely different direction.

E
Last edited by Caneri on Thu 29 Sep 2011, 16:54, edited 1 time in total.
[color=darkred][i]Be not afraid to grow slowly, only be afraid of standing still.[/i]
Chinese Proverb[/color]

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

Psip Sound Wizard

#324 Post by smokey01 »

My previous script was a resounding failure. It locked up my old desktop computer good and properly. I had to do a complete power off.

I think it was because I tried to include both 0 and 1 input and output devices which not all computers have. I have been a little bit more conservative this time. Below is the modified script.

Code: Select all

#!/bin/sh
#If you are running Psip64 then you need to replace all instances of psip32 with psip64.
#There are no guarantees this script will work, but it should in most cases.
if [ ! -f /root/.psip.conf ] 							#This tests to see if .psip.conf does not exist.
then
Xdialog --title "Psip Sound Wizard" --msgbox "It appears this is your first run of Psip.\n
					I'm going to attempt to setup your sound Card.\n
					It makes the following assumptions:\n\n
					Your Mic Jack is on the front of your computer and
					Your sound card is equiped with Capture and Digital.\n" 0 0
amixer sset 'Headphone',0 on 							#Turns on your headphones
amixer sset 'Input Source',0 'Front Mic' 				#Sets your input source 0 to Front Mic
amixer sset Mic,0 75% unmute cap 						#Sets the Mic gain to 75%
amixer sset Capture,0 75% unmute cap 					#Sets Capture to 75%
amixer sset Digital,0 75% unmute cap 					#Sets Digital to 75%
amixer sset Master,0 80% unmute 						#Sets the Master Volumr to 80%
amixer sset PCM,0 100% unmute 							#Sets PCM 100%
amixer sset Front,0 100% unmute 						#Sets the front speaker/headphone Jack to 100%
alsactl store
Xdialog --title "Psip Sound Wizard" --msgbox  "Click OK and speak into the microphone for about 5 seconds\n
					You should hear your voice played back to you." 0 0
arecord -r 16000 -d 5 /tmp/test-recording.wav			#Records your voice
aplay /tmp/test-recording.wav							#Plays you voice back
Xdialog --title "Psip Sound Wizard" --msgbox  "If you heard your own voice then Psip should work for you, if not\n
					then you need to open your sound mixer and adjust your settings.\n\n
					Many computers have more than one input, for example: you\n
					might have one on the front and another on the back of your computer.\n
					It's important to select the correct one for recording to work.\n
					The same rule applies for output EG: speakers & Headphones." 0 0
cd /usr/local/psip32									#Changes to Psip directory
#If the rc.firewall is not used then the iptable entries are not required and can be commented out
iptables -I INPUT -p udp --dport 4000:4007 -j ACCEPT	#Opens ports 4000-4007
iptables -I INPUT -p udp --dport 5060 -j ACCEPT			#Opens port 5060
./psip32												#Runs Psip after Wizard has setup sound
iptables -D INPUT -p udp --dport 4000:4007 -j ACCEPT	#Closes ports 4000-4007
iptables -D INPUT -p udp --dport 5060 -j ACCEPT			#Closes port 5060
else
cd /usr/local/psip32 #If .psip.conf file is found then the script changes to psip32 directory. Refered from line 3.
iptables -I INPUT -p udp --dport 4000:4007 -j ACCEPT	#Opens ports 4000-4007
iptables -I INPUT -p udp --dport 5060 -j ACCEPT			#Opens port 5060
./psip32												#Runs psip32
iptables -D INPUT -p udp --dport 4000:4007 -j ACCEPT	#Closes ports 4000-4007
iptables -D INPUT -p udp --dport 5060 -j ACCEPT			#Closes port 5060
fi

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#325 Post by technosaurus »

here are the extra 3rd party libs - can any of them be disabled?
or maybe they are already statically built in to another program and could be "pulled out"

Code: Select all

 ls -l;i=0; for x in `ls -l |tr -s " "|cut -d " " -f5`; do i=$(($i+$x));done; echo $(($i/1024))k
total 600
-rw-r--r-- 1 root root  76782 2011-09-29 01:06 libg7221codec-i686-pc-linux-gnu.a
-rw-r--r-- 1 root root  52474 2011-09-29 01:06 libgsmcodec-i686-pc-linux-gnu.a
-rw-r--r-- 1 root root  69366 2011-09-29 01:06 libilbccodec-i686-pc-linux-gnu.a
-rw-r--r-- 1 root root  16866 2011-09-29 01:06 libmilenage-i686-pc-linux-gnu.a
-rw-r--r-- 1 root root 203916 2011-09-29 01:06 libportaudio-i686-pc-linux-gnu.a
-rw-r--r-- 1 root root  46400 2011-09-29 01:06 libresample-i686-pc-linux-gnu.a
-rw-r--r-- 1 root root 106308 2011-09-29 01:06 libsrtp-i686-pc-linux-gnu.a
558k
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#326 Post by jamesbond »

Technosaurus, glad you join the discussion. I was already thinking to ask for your advise to make psip smaller. The bulk of size comes from pjsip (pjproject) libraries. Using standard ./configure stuff gives me 1.5MB binary. All the libraries you mentioned above are non-standard libraries and I don't think any shared version of them are installed in standard puppies. I know for a fact that libgsm (by default) only compiles to static library. PortAudio is a pain, I prefer not to have it there but support for native ALSA in pjsip is just too immature (bad sound quality, failure to open device due to sampling frequency mismatch, and such). The rest - srtp & milenage is required for SIP protocol support, while ilbc codec, G.722.1 codec are all very specific SIP stuff not available in standard puppies. Most SIP clients I've looked at support at least speex, ilbc, and gsm codec at the very least. G.722.1 codec can be dropped but if it's only 76k so why bother.

Do you think compiling with -ffunction-sections and -fdata-sections will help?

cheers!
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#327 Post by technosaurus »

With all of those compiled in statically I got around 900k in wary with all sorts of cflags.

I wonder though how many other apps could be smaller if we had a shared portaudio.
Reasoning:
Stuff like this
#ifndef HAVE_PORTAUDIO // or whatever it is
A million lines of code
#endif

BTW it turns out that puppy would be _smaller_ by adding dbus
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#328 Post by jamesbond »

Wow - that's 600k smaller! Do you mind sharing those cflags? Do you pass them to ./configure or do you edit the Makefiles yourself after configure? Or do you actually go do the code and hack to #ifndefs?
About portaudio - The only apps I know that make use of portaudio is Audacity (and even that is not a mandatory prerequisite).
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#329 Post by smokey01 »

There seems to be continuing problems with the iptel.org server.

I haven't successfully been able to connect now for about 12 hours.

I am getting an error, see screeny.

It seems to connect OK to both ekiga.net and realsip.com.

I will check again and report back. It appears both ekiga and realsip are working and I can register with both, so the problem is with iptel.

Caneri is getting the same problem.
Attachments
Registration Error.png
Error
(9.44 KiB) Downloaded 634 times

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#330 Post by technosaurus »

jamesbond wrote:Wow - that's 600k smaller! Do you mind sharing those cflags? Do you pass them to ./configure or do you edit the Makefiles yourself after configure? Or do you actually go do the code and hack to #ifndefs?
About portaudio - The only apps I know that make use of portaudio is Audacity (and even that is not a mandatory prerequisite).
I used to use these
CFLAGS=" -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS -DNDEBUG -DG_DISABLE_ASSERT -pipe -combine -Os -momit-leaf-frame-pointer -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants -march=i486 -mtune=i686 " LDFLAGS=" -Wl,-O4,-Os,-relax,--sort-common,--gc-sections,--as-needed,-s "

but have been adding -finline-small-functions -fweb and -mno-accumulate-outgoing-args

as an example, when I compiled mupdf, I looked for the largest directories in the source and then the largest files and it turned out, I was able to cut the size by 75% by using -DNOCJK and -DNODROIDFONT (or something like that) ... at one point I hacked out support for jpeg2000 and jbig-something or other rare image format, but combined it only saved like 50kb.

I really wish I hadn't lost my scripts that allowed (unsecure) telephony-like A/V communication using ffmpeg's udp streaming and busybox (httpd and ash based cgi scripts).
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
russoodle
Posts: 707
Joined: Fri 12 Sep 2008, 17:36
Location: Down-Under in South Oz

same error message...

#331 Post by russoodle »

I'm getting the same error as shown in Smokey's image there.

Also, when i returned from my few days away, i tried to contact some of you using FD64-520 and Psip64R-1.1, without success. Smokey01 received empty messages, so i guess Caneri and Lobster would've, too :roll: Sorry guys, however, i did receive your voicemails.

I've opened an Ekiga account but will have to try a Puppy that there's a package for.

Thank you, Smokey01, for the updated Help file. It's very useful, especially your screenshot of Retrovol!

Hope to make it to Sunday's conference, meanwhile trying to shake off a bug i caught while i was away :evil:
[i][color=Green][size=92]The mud-elephant, wading thru the sea, leaves no tracks..[/size][/color][/i]

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#332 Post by smokey01 »

Iptel seems to be up and running again.

They must have had some serious problems as they were down for a long time.

Thank iptel, your free service is really appreciated.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#333 Post by jamesbond »

technosaurus wrote:I used to use these
CFLAGS=" -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS -DNDEBUG -DG_DISABLE_ASSERT -pipe -combine -Os -momit-leaf-frame-pointer -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants -march=i486 -mtune=i686 " LDFLAGS=" -Wl,-O4,-Os,-relax,--sort-common,--gc-sections,--as-needed,-s "

but have been adding -finline-small-functions -fweb and -mno-accumulate-outgoing-args
WOW!!! Thanks for the magic recipe technosaurus :D
-rwxr-xr-x 1 root root 1689816 Sep 30 19:43 psip32-before-techno
-rwxr-xr-x 1 root root 1234736 Sep 30 19:57 psip32-techno
That's a clean 400k shaved off !!!!
I'm so so definitely keeping this magic recipe for my future compile.
as an example, when I compiled mupdf, I looked for the largest directories in the source and then the largest files and it turned out, I was able to cut the size by 75% by using -DNOCJK and -DNODROIDFONT (or something like that) ... at one point I hacked out support for jpeg2000 and jbig-something or other rare image format, but combined it only saved like 50kb.
Yes, it pays to understand that the app is doing.

Specific for psip (not the pjproject or osxcart), there is other things we can use to reduce the size. I just looked at the size of psip.glade (the main UI) - it's about 140k. With hard enough effort, this can be gzipped before embedded into the binary, and ungzipped on-the-fly when the gui is built. This 140k glade file is only 10k when gzipped. The application icon, phone128.png from smokey01, is raw un-encoded 24-bit RGB file with 128x128. Since the only purpose of this icon is to display a tray icon (which probably is 16x16) - a lot can be saved here as well. We'll probably be looking at another ~200k reduction. I'm however finding my motivation lacking ... :wink:
I really wish I hadn't lost my scripts that allowed (unsecure) telephony-like A/V communication using ffmpeg's udp streaming and busybox (httpd and ash based cgi scripts).
That would have been interesting :) But the hard problem is not the transmission I think, it's the signalling part (flow control, packet loss recovery) as well as NAT traversal.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#334 Post by jamesbond »

Hmmm spoke too soon, now psip stops working because apparently all the signal handlers can't be found by GtkBuilder. I used -export-dynamic to export these handlers, but apparently one of the LDFLAGS from technosaurus must have un-done it ....
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#335 Post by technosaurus »

that would be gc-sections removing the "unused code" (gcc cant see the calls from the glade files). you would have to manually tell it tot keep them.

the old glade 2.X would actually do the C code instead of xml, I wonder if it could be converted (it would also remove glade dependency... unless it is already using gtkbuilder)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply