VOIP

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#31 Post by Lobster »

Update - this program now available for testing - Freebasic dropped now gtkdialog3 only . . .
http://tmxxine.com/sip/ps6.tar.gz


NB:
Latest Code in first post


Now updated 26 June to merge with CEL's code and drop the FreeBasic part
CEL's code implemented but not tested. . .

this is an example of how I filled in the details
yours should be similar but not identical . .
If you recieved a voicemail about adding password each time
- don't worry - you just have to do it once and it is saved then just press the PJSAU button to run . . .

Code: Select all

--id sip:crusty_lobster@proxy01.sipphone.com
--registrar sip:proxy01.sipphone.com
--realm *
--username crusty_lobster
--password *******
Below is the code part of the updated file

Code: Select all

#!/bin/bash
# GPL v3 License
# PS v 0.5 June 25 008
# created by Lobster, CEL, HairyWill
###################

export PJCFG='config2.cfg' # config-file

export DIALOG='
<window title="PS" window-position="1">
<vbox>
  <hbox>
     <text><label>PS5 ~ frontend for PJSUA VOIP ~ Puppy Community June 25 2008</label></text>
  </hbox>   
  <frame>
         <pixmap>
         <input file>logo.jpg</input>
       </pixmap>
         <text><label>Fill in details and save config</label></text>
         <text><label>Click PJSUA to run - Press return in console for menu options</label></text>
   </frame>
  <hbox>
    <text>
      <label>Your SIP URL:</label>
    </text>
    <entry>
      <input>sed -rn /^--id/s/^--id.//p /$PJCFG</input>
       <variable>SIP_ID</variable>
     </entry>
    <text>
      <label>ex: sip:yourname@proxy01.sipphone.com</label>
    </text>
  </hbox>
  <hbox>
    <text>
      <label>Registrar URL:</label>
    </text>
    <entry>
      <input>sed -rn /^--registrar/s/^--registrar.//p /$PJCFG</input>
       <variable>SIP_REGISTRAR</variable>
     </entry>
    <text>
      <label>ex: sip:proxy01.sipphone.com</label>
    </text>
  </hbox>
  <hbox>
    <text>
      <label>Auth Realm:</label>
    </text>
    <entry>
      <input>sed -rn /^--realm/s/^--realm.//p /$PJCFG</input>
       <variable>SIP_REALM</variable>
     </entry>
    <text>
      <label>ex: *</label>
    </text>
  </hbox>
  <hbox>
    <text>
      <label>Username:</label>
    </text>
    <entry>
      <input>sed -rn /^--username/s/^--username.//p /$PJCFG</input>
       <variable>SIP_USERNAME</variable>
     </entry>
    <text>
      <label>ex: yourname</label>
    </text>
  </hbox>
  <hbox>
    <text>
      <label>Password:</label>
    </text>
    <entry invisible_char="*" visibility="false">
      <input>sed -rn /^--password/s/^--password.//p /$PJCFG</input>
      <variable>SIP_PASSWORD</variable>
    </entry>
  </hbox>
  <hbox> 
      <text>
      <label>Save config details</label>
      </text>
         <button ok></button>
          <button>
            <label>Run PJSAU</label>
            <action>rxvt -e ./pjsua --config-file=config2.cfg &</action>
          </button>    
     <button cancel></button>
  </hbox> 
</vbox>
 </window>'

I=$IFS; IFS=""
for STATEMENTS in $(gtkdialog3 --program DIALOG --name PuppySIPConfig); do
  eval $STATEMENTS
done
IFS=$I

if [ "$EXIT" = "OK" ]; then
  sed -e /^--id/d -e /^--registrar/d -e /^--realm/d -e /^--username/d -e /^--password/d $PJCFG > /tmp/puppysiptmp
  mv /tmp/puppysiptmp $PJCFG
  echo "
--id $SIP_ID
--registrar $SIP_REGISTRAR
--realm $SIP_REALM
--username $SIP_USERNAME
--password $SIP_PASSWORD" >> $PJCFG 
fi
Last edited by Lobster on Tue 01 Jul 2008, 06:26, edited 4 times in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

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

#32 Post by Lobster »

HairyWill has recompiled pjsau - download the updated prog from here and see if that produces better result - we have had some success with it . . .
http://tmxxine.com/sip/ps5.tar.gz
Will was able to send a voice message . . .

remember to change the permissions so it an executable program
:)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
CEL
Posts: 24
Joined: Sun 02 Sep 2007, 21:58

#33 Post by CEL »

Success! Thank you HairyWill! My calls are now all clear. One thing I had to adjust though: I added --clock-rate 22000 to my config file. Before I did that, it would hang, before every call, at "attempting to open devices @16000 Hz." So if other people confirm this I suggest we add that line to the default config file.

Another thing: You may have noticed that the account fields are blank when you open puppysip even after you've already filled them out. It's because the script doesn't have an absolute path to the config file. (This is set at line #7 in v5.) So maybe this could be put in /root/.pjsuacfg or installed in /usr/local/puppysip/

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

#34 Post by Lobster »

Image

OK updates
including sound and retaining of config details

download this to /root
http://tmxxine.com/sip/ps6.tar.gz

it should when you click on it create a directory called /root/puppysip6

the config details entered are mine

run ps6 to run prog (remember to set permissions)

change 'Your Sip URL:'

Code: Select all

sip:crusty_lobster@proxy01.sipphone.com
to something like:

Code: Select all

sip:my_gizmo_name@proxy01.sipphone.com
and 'Username' to

Code: Select all

my_gizmo_name
You should also add your Gizmo 'Password' at this point

When you click OK
the details are saved in 'config6.cfg'
and you can then press the 'Run PJSUA' button (spelling wrong on prog - will change)

I was able to (perhaps) send a message to Eric 'Caneri'
I could hear voice - progress continues . . .

At the moment only people registered with and using Gizmo have details of a sip account but maybe there are other ways to get a Sip number/proxy and password?
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#35 Post by HairyWill »

Yesterday I managed to use pjsua to make a call to my mobile using my gizmo out credit. My account credentials are stored in the config file.

Code: Select all

pjsua --config-file=config2.cfg sip:+447833111111@proxy01.sipphone.com
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#36 Post by muggins »

Lob,

nice looking frontend. I haven't used the app, but I'm wondering if it would it be possible to have traditional "Ring" & "Hang up", to replace "Run pjsua" etc, whilst still using the same underlying code?

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

#37 Post by smokey01 »

Will, I have also called a phone, not a mobile but a normal one. It rang but I didn't answer it.

What I also tried was dialing into the Gizmo server to retrieve messages. This worked fine except pressing option 2 didn't work but the sound was very clear. I think the keypad in Gizmo must generate tones, not key codes.

This could be added to the Buddies:
sip:611@proxy01.sipphone.com

Just need to work out how to generate the appropriate tone for each key.

Things are looking better all the time. All this in about .5 Meg, although compressed not too bad.

I can't wait to try a voice call with someone.

Smokey

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

#38 Post by Caneri »

Hi Lobster,

Hooray!! I got your voice mail from PuppySip version 6 and the quality was good.

I also have a response from viagenie.ca with some advice and will inform the group when I can make heads or tails of it.

One thing they recommended was to run a voip server somewhere and then use their service to punch holes through local/personal NAT routers.

I may have a spot to run this Puppy VOIP server...

and the fun continues...;-)

Best,
Eric
Attachments
lobster_416x300.jpg
(23.16 KiB) Downloaded 1878 times
[color=darkred][i]Be not afraid to grow slowly, only be afraid of standing still.[/i]
Chinese Proverb[/color]

eccentric
Posts: 186
Joined: Thu 05 Jan 2006, 11:44
Location: Khon Kaen Thailand.....NOW back in the UK
Contact:

voip

#39 Post by eccentric »

the phone is by Salvador Dahli, there is another all white phone in the same vain but i cannot remember the artist, both where on show at the V&A in London. last year. ( from :- telegraph.co.uk).

Michael in China, using two empty bean tins and a length of string.

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

#40 Post by Lobster »

Image
Thanks to Smokey01 (Grant) and Eric - received voicemail from Puppy Sip - that part works. :)

Thanks guys :)

Salvador Dali I believe created 4 Lobster phones. They worked. I have seen one in the Tate gallery London.

Tate modern may eventually have a Lobster room, where all Lobster themed artwork is displayed.

Has anyone done Puppy Sip to Puppy Sip yet?
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

charnisingh
Posts: 138
Joined: Sat 06 Oct 2007, 11:58

VOIP

#41 Post by charnisingh »

Lobster,

i tried the VOIP sip phone to day but could noy register myself, may be

my details of form filling was not correctly filled.

Charni.

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

#42 Post by Lobster »

Hi Charni :)

hope this helps:

change 'Your Sip URL:'
sip:chanrnisingh@proxy01.sipphone.com

and 'Username' to
chanrnisingh

add your gzmo password
the rest stays the same

then click on Save config details [OK]
and then [Run PjSUA]

Press enter
type m to make a call
enter the number of the person you wish to phone . . .
if they are not online leave a voicemail . . .

h to hangup
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

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

#43 Post by Lobster »

OK new version out (still in Puppy6 directory)

Puppy SIP 7
http://tmxxine.com/sip/ps7.tar.gz

New features
  • Pull down menu
    Help section, Wiki and forum thread link and configure edit section
    Suggestions implemented
Only tested in Puppy Dingo
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

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

#44 Post by smokey01 »

Guys, apart from lobsters improvements tombh and myself had a great conversation for about 2 hours today. The quality was great with less lag than skype.

The online status is a bit tricky. you can press s (subscribe) [enter] then your own address from the buddy list. This will then show you that you are online. I then pressed s [enter] 6 [enter] which is tom's address and it displayed his status as online.

Now the big discovery. When you call someone they must press a to answer. It tells you to type in a code between 100-699. You need to select between 200-299. You can then have a good clear two way conversation. To finish press h [enter]

Smokey

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#45 Post by HairyWill »

I've playing with pjsua lots and have it working in lots of ways.

I've built the windows pjsua and used it to make calls to and from the linux version both using ip-ip and making direct unauthenticated calls to another instance of pjsua connected to the gizmo network (ie pjsua sip:hairywill@proxy01.sipphone.com).

I've made direct unauthenticated calls from pjsua on linux to gizmo on windows. (spoke to puppyluvr yesterday)

What I can't do is use pjsua to make a call to gizmo on linux this gives me a big long stream of

Code: Select all

pjsip bad rtp pt 117 (expecting 103)
this probably being thrown from pjproject/trunk/pjmedia/src/pjmedia/stream.c

If anyone happens to be running gizmo this afternoon and gets a call from me (or anonymous) that dies before it starts. It would be great if you could close down gizmo and start pjsua I will try again 2 times at 2 minute intervals.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

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

#46 Post by Lobster »

Thanks guys :)
Have created a wiki page and added everyones discoveries
If I have omitted anything - please add.

New info welcome :)
http://tmxxine.com/wik/wikka.php?wakka=PuppySip

Smokey has asked me a about piping commands from gtkdialog to the command line of PjSua . . .

eh . . . :oops:

How is that done :?:
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#47 Post by HairyWill »

good work smokey,

It looks like we have a reasonable working program.
pjsua is intended as a reference implementation.
There are smaller versions in the build with less functionality.
The full version UI isn't exactly idiot proof.

I suspect that building a graphical client will involve some hacking of the source to one of the reference versions. I'm not sure whether it would be better to enhance the external bindings and try and interact with it from bash or it might just be more simple to use gtk.

If we are angling for inclusion in an official release it might be simplest to just include a very simple program that allows you to dial out and possibly answers incoming calls automatically. simpleua is 256K stripped and gzipped. I'm not exactly sure what its capabilities are.

I spoke to smokey for a while just now, good quality.

lobster you might want to consider turning down the logging
--log-level 3
--app-log-level 4
still allows IMs to work
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

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

#48 Post by smokey01 »

The easiest way to check if someone in your buddy list is on line:

Press s [enter] -1 [enter]

This will subscribe all of your buddy's and check every 300 seconds to update status.

To unsubscribe your buddy's:

Press u [enter] -1 [enter]

charnisingh
Posts: 138
Joined: Sat 06 Oct 2007, 11:58

VOIP

#49 Post by charnisingh »

Hi Lobster,

i downloaded version sip7 and filled the details just the same i did last time

and i think it did register (not sure) in the end it did say 0 call but it did show

all the buddy list and menu.

it may take me some time to understand its working in toto.

regards,
Charni.

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

Driving pjsip 101

#50 Post by smokey01 »

How to retrieve voice mail in PJSIP:

address is: 611@proxy01.sipphone.com

The voice message tells you to press 2 to retrieve messages.

Press # [enter] 2 [enter]

For new messages Press # [enter] 1 [enter]

Get the idea. Whatever you are told to do press hash [enter] first.

Smokey

Post Reply