PSip - Puppy SIP

Browsers, email, chat, etc.
Message
Author
User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#221 Post by smokey01 »

tide, PM me a copy of your ./psip/pjsua.cfg file and I will have a look for you.

User avatar
WB7ODYFred
Posts: 169
Joined: Sun 14 Dec 2008, 02:15
Location: Oregon & Washington

tide, on page 14 I posted a copy of /root/psip/pjsua.cfg

#222 Post by WB7ODYFred »

Hello Tide, and others. I posted a working copy of my pjsua.cfg in a previous forum entry, May 9 2008 WB7ODYFred in this forum thread, Page 14.
I also posted testing ideas, that I used to figure out why PSIP died/Hung with no errors reported. Start PSIP from command line in RXVT terminal window.
http://murga-linux.com/puppy/viewtopic. ... &start=205

Here is Tides quoted entry from above.
SIP-ID: 134xxxx
SIP password: 9xxxx
Status: offline
Nickname: No name was set Edit

Registry: sipgate.co.uk (Port: 5060)
Proxy: sipgate.co.uk (Port: 5060)
NTP: ntp.sipgate.net

SIP password: 9xxxx
Tide edit your /root/.psip/pjsua.cfg with Gedit or Geany. This is what I think your file should look like. Then start pjsua from a RXVT terminal window to see what it reports back during startup. Copy paste the line below (after the '#" prompt) into a terminal window. maybe the version of pjsua is different on your version of PuppyLinux. Use what works for you. Mine was from 4.1.11 version of Puppy Linux.
# /usr/local/psip/pjsua_custom_03-0.9.0 --config-file /root/.psip/pjsua.cfg

Code: Select all

# Account 0: Example settings
# --id sip:yourname@proxy01.sipphone.com 
# --registrar=sip:proxy01.sipphone.com 
# --realm * 
# --username=yourname 
# --password=password 
# --reg-timeout=55 
# 
# Account 0: for user Tide
--id sip:134xxxx@sipgate.co.uk
--registrar=sip:sipgate.co.uk 
--realm * 
--username=134xxxx 
--password=9xxxx # get the password from your SIP line provider 
--reg-timeout=55 
#
#  Test call  Freds voice mail for fun.  or call Ekiga Echo Test at 500.
--add-buddy sip:fredfinster@sip7.vitelity.net 
--add-buddy sip:500@ekiga.net
 
Let us all know (Smokey01 and WB7ODYFred and other readers) if the above works for you.

If you need to use a stun server with sipgate you might uncomment the last line which I modified to reflect your SIP provider, ie sipgate.co.uk.
#I think this example might only work if you have a gizmo account
# --stun-srv=stun01.sipphone.com
# --stun-srv=sipgate.co.uk

second look at creating a free Ekiga.net account at http://www.ekiga.net you can the use PSIP with your free ekiga.net account settings and call SIP 500@ekiga.net and play with echo test to verify your microphone settings.
Gizmo (ie sipphone.com ) was bought out and no longer provides free SIP accounts. Ekiga.net does provide free sip accounts and you don't have to use their Ekiga software to make ekiga.net calls. So this seems like a replacement for sipphone.com where Puppy PSIP users can talk with each other. I also wanted to try using a ekiga chat room channel to have a round table discussion with a few other PuppyLinux users on PSIP or Ekiga sip phones. At a set UTC time we could call room number 5012345@ekiga.net and have several people chat on an issue. Like testing PSIP or hearing what would you like different in the simple user interface.

from this web page https://www.ekiga.net/index.php?page=services
Dial the sip:501xxxx@ekiga.net (where x = any digits from 0 to 9). These rooms are public or private, anyone can join a conference at any time if he chooses the right number or you can protect the access with a PIN number. The first person to enter a 'room' may specify a PIN by entering a number (followed by #) to limit access to the conference room, just entering # will make this conference room public. When the last person leaves a conference room, the PIN will be cancelled and others may use the 'room'

Fred Finster WB7ODYFred 8) Waiting for your forum comments and PSIP test results via VoIP messages
SIP:wb7odyfred@ekiga.net
SIP:fredfinster@sip7.vitelity.net

ps. Smokey01, thanks for keeping PSIP going and answering questions.
Last edited by WB7ODYFred on Fri 26 Aug 2011, 21:35, edited 2 times in total.

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

#223 Post by Caneri »

Hi All,

there is a thread here as well
http://www.murga-linux.com/puppy/viewtopic.php?t=70867


Here is my psip.cfg that is working on an older 409 puppy.
http://www.murga-linux.com/puppy/viewto ... 441#556441

It's important to have the last line empty in a psip.cfg.
(dunno why to date but it needs it)

Be Well,
Eric
[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:

#224 Post by smokey01 »

Hi Fred, long time no see.

Is Psip-0.12 working for you with the latest Puppies?

Have you tried replacing the updated psip-gui?
http://www.murga-linux.com/puppy/viewto ... 750#555750

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

#225 Post by Caneri »

I'm online now..I just saw smokey01 but he disappeared.
sip:caneri@iptel.org
[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:

#226 Post by smokey01 »

Try Skype

mama21mama

#227 Post by mama21mama »

fix

Code: Select all

psip32: ../src/pjsua-lib/pjsua_pres.c:557: pjsua_buddy_update_pres: La declaración `pjsua_buddy_is_valid(buddy_id)' no se cumple.
Abortado
PSIP v1.3

raname ~/.psip.conf ~/psip.conf

work :shock:

edit: work

before

Code: Select all

{
			"category":	"puppy",
			"buddies":	[{
					"nick":	"nilsonmorales",
					"address":	"nilsonmorales@iptel.org"
				}]
now

Code: Select all

{
			"category":	"puppy",
			"buddies":	[{
					"nick":	"nilsonmorales",
					"address":	"sip:nilsonmorales@iptel.org"
				}]

chapchap70
Posts: 210
Joined: Thu 18 Nov 2010, 05:39
Location: The Island Of Long (NY, USA)

3 little letters

#228 Post by chapchap70 »

Yep those 3 little letters make a bit of difference.

Another note: I had to redo my sip:iptel.org account that I registered on July 6th. I tried to see if this was working and found iptel had no record of my account. I have made videocalls with it using linphone in early September. I still have the email from my account setup so I know I was putting in the right username and password. I reregistered with the same handle and password.

I never made a call with PSIP but I got it to show that I was Logged In.

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

#229 Post by smokey01 »

Yes, you must always precede your address with sip: just like it's explained in the help document.

http://www.smokey01.com/help/psip/psip-help.html

Cheers

zandarian
Posts: 117
Joined: Wed 14 Oct 2009, 21:10

#230 Post by zandarian »

Newer thread about this: http://www.murga-linux.com/puppy/viewtopic.php?t=70867

NB: With some routers Puppy Phone (and Ekiga) seems not to be usable, at least without doing special things. (http://www.murga-linux.com/puppy/viewto ... 418#796418)

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

#231 Post by smokey01 »

I don't believe you need to do any port forwarding in your router to make psip work however, if your router has ALG, try disabling it.

Also, psip like most voip apps use port 5060 so make sure the port is open if using a firewall.

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

#232 Post by technosaurus »

I wanted to post this google voice perl script somewhere before it gets lost in the interwebs. ... I don't know why all of them are in perl or php

Code: Select all

#!/usr/bin/perl -w


###########################################################################
##                 Google Voice Command Line Script
##
##  This script will let you utilize features of your google voice 
##  account from the command line, or triggered by some external 
##  application.  
##
##  You can send a sms, place a call or cancel a call placed
##
##  Copyright Bret McDanel 2009
##
##  LICENSE:
##  1. You may not make this GPL ever.  I want my code to be freely 
##     available to everyone forever.  The GPL restricts freedom.
##  2. Copyright notices must remain intact and distributed with
##     the program.  This includes the contributors list.
##  3. No warantee is present, whether express or implied.  Use at
##     your own risk.
##  4. This license must be included with all distributions of this
##     program and no modifications to this license are allowed.
##     This implicitly makes this program GPL incompatible but
##     compatible with virtually every other OSI approved license.
##  5. You are otherwise free to distribute this program, modify it
##     and distribute those modified works.
##
## Contributors:
##     Bret McDanel trixter AT 0xdecafbad.com
##     Pablo <undisclosed>
##     Peter pietia7 AT tlen.pl
##     Jeffrey Honig jch AT honig.net
##
###########################################################################


use strict;
use WWW::Mechanize;
use WWW::Mechanize::Plugin::FollowMetaRedirect;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
use HTTP::Cookies;
use URI::Escape;
use HTML::Entities;
use JSON -support_by_pp;
use Getopt::Std;

## EDIT ME!!!
## You have two options, you only need to do one and not both
# OPTION 1
# If Net::Netrc is installed, you may use a ~/.netrc file
# add the following line to your ~/.netrc file, make sure its mode 600
# machine voice.google.com login EMAIL password PASSWORD account 1234567890
# replace EMAIL with your email address, PASSWORD with your pass 
# and 1234567890 with the default "ring to" number
#
# OPTION 2
# Edit the variables below to have your information
my $username = undef; # dont forget to escape @ symbols
my $password = undef;
my $default_number = undef;





## nothing under here *should* need to be edited
my $cookiejar;
my $rnr_se = undef;


sub getContact {
    my ($contact_name, $contact_type) = @_;
    my $ret=undef;
    $contact_type = "MOBILE" if ! defined $contact_type;
    $cookiejar = HTTP::Cookies->new();
    
    $rnr_se = auth($cookiejar);
    
    if (!defined $rnr_se) {
	return;
    } else {
	my ($url, $client, $request, $response, $postdata);
	my $browser = WWW::Mechanize->new();
	$browser->cookie_jar($cookiejar);
	eval{
	    $browser->get( 'https://www.google.com/voice/c/ui/ContactManager');
	    my $content = $browser->content();
	    
	    $content =~ /initContactData = (.*?)\}\;/;
	    my $json_content = $1."}";
	    my $json = new JSON;
	    
	    my $json_text = $json->allow_nonref->utf8->relaxed->escape_slash->loose->allow_singlequote->allow_barekey->decode($json_content);
	    
	    foreach my $episode(@{$json_text->{Body}{Contacts}}){
		if(lc($episode->{Name}) eq lc($contact_name)) {
		    foreach my $types($episode->{Phones}) {
			foreach my $type(@$types) {
			    if(lc($type->{Type}->{'Id'}) eq lc($contact_type)) {
				$ret = $type->{Number};
				return;
			    }
			}
		    }
		}
	    }
	};
	# catch crashes:
	if($@){
	    print "[[JSON ERROR]] JSON parser crashed! $@\n";
	}
    }
    return $ret;
}



sub usage {
    my $progname = $0;
    print "$progname -c <command>  [-p phone] [-t type] [-f from] [args]\n";
    print "Commands:\n";
    print "\tsms -p <phonenumber|name> <message>\n";
    print "\tcall -p <phonenumber|name>\n";
    print "\tcancel\n";
    print "-t is only used if you specify a contact name for -p and not a number\n";
}




sub auth {
    my $url = "https://www.google.com/accounts/ServiceLogin?passive=true&service=grandcentral&ltmpl=bluebar&continue=https%3A%2F%2Fwww.google.com%2Fvoice%2Faccount%2Fsignin%2F%3Fprev%3D%252F";
    my $mech = WWW::Mechanize->new();
    
    $mech->cookie_jar($cookiejar);
    $mech->agent('Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11');
    $mech->get($url);
    $mech->follow_meta_redirect( ignore_wait => 1 );
    if(!$mech->success) {
	print "ERROR: unable to get login page\n";
	return undef;
    }
    
    if (! defined $mech->form_number(1)) {
	print "ERROR: unable to locate login form!\n";
	return undef;
    }
    $mech->field(Email => $username);
    $mech->field(Passwd => $password);
    my $resp = $mech->click();
    
    if(!$resp->is_success) {
	print "ERROR: unable to get login page\n";
	return undef;
    }
    
    my $output_page = $mech->content();
    if ($output_page =~ m/\<meta/) {
	$mech->follow_link(tag => 'meta');
	$output_page = $mech->content();
    }
    
    if ($output_page =~ m/The username or password you entered is incorrect/) {
	print "ERROR: Username or password is incorrect\n";
	return undef;
    }
    
    if ($output_page =~ m/rnr_se.*value=\"(.*?)\"/) {
	$rnr_se = uri_escape($1);
    } else {
	print "ERROR: Unable to get the rnr_se value\n";
	return undef;
    }
    
    
    return $rnr_se;
}



###
# Send SMS
###
sub sendsms {
    my ($number, $message) = @_;
    $cookiejar = HTTP::Cookies->new();
    
    $rnr_se = auth($cookiejar);
    
    if (!defined $rnr_se) {
	return;
    } else {
	my ($url, $client, $request, $response, $postdata);
	
	$client = LWP::UserAgent->new();
	$client->agent('Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11');
	$client->timeout(30);
	$client->cookie_jar($cookiejar);
	
	$url = 'https://www.google.com/voice/sms/send/';
	$postdata = "id=&phoneNumber=".$number."&text=".uri_escape($message)."&_rnr_se=".$rnr_se;
	
	$request = HTTP::Request->new(POST => $url);
	$request->content_type('application/x-www-form-urlencoded');
	$request->content($postdata);
	$response = $client->request($request);
	
	if ($response->is_success) {
	    print "SMS sent\n";
	} else {
	    print "Could not send the SMS message ".$response->status_line."\n";
	}
    }
    return;
}


###
# Place a phone call
###
sub placecall {
    my ($dst_number, $from_number) = @_;
    $cookiejar = HTTP::Cookies->new();
    
    $rnr_se = auth($cookiejar);
    
    if (!defined $rnr_se) {
	return;
    } else {
	my ($url, $client, $request, $response, $postdata);
	
	$client = LWP::UserAgent->new();
	$client->agent('Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11');
	$client->timeout(30);
	$client->cookie_jar($cookiejar);
	
	$url = 'https://www.google.com/voice/call/connect/';
	$postdata = "outgoingNumber=$dst_number&forwardingNumber=$from_number&subscriberNumber=undefined&remember=0&_rnr_se=$rnr_se";
	
	$request = HTTP::Request->new(POST => $url);
	$request->content_type('application/x-www-form-urlencoded');
	$request->content($postdata);
	$response = $client->request($request);
	
	if ($response->is_success) {
	    print "Call sent\n";
	} else {
	    print "Could not place the call ".$response->status_line."\n";
	}
    }
    return;
}


###
# Cancel a call
###
sub cancelcall {
    $cookiejar = HTTP::Cookies->new();
    
    $rnr_se = auth($cookiejar);
    
    if (!defined $rnr_se) {
	return;
    } else {
	my ($url, $client, $request, $response, $postdata);
	
	$client = LWP::UserAgent->new();
	$client->agent('Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11');
	$client->timeout(30);
	$client->cookie_jar($cookiejar);
	
	$url = 'https://www.google.com/voice/call/cancel/';
	$postdata = "outgoingNumber=undefined&forwardingNumber=undefined&cancelType=C2C&_rnr_se=$rnr_se";
	
	$request = HTTP::Request->new(POST => $url);
	$request->content_type('application/x-www-form-urlencoded');
	$request->content($postdata);
	$response = $client->request($request);
	
	if ($response->is_success) {
	    print "Call cancelled\n";
	} else {
	    print "Could not cancel the call ".$response->status_line."\n";
	}
    }
    return;
}







eval "use Net::Netrc";
if (! $@) {
    my $mach = Net::Netrc->lookup('voice.google.com');
    
    if($mach) {
	($username, $password, $default_number) = $mach->lpa;
    }
    if(! defined $username || ! defined $password || ! defined $default_number) {
	print "You must either create a ~/.netrc file or define the variables in this script\n";
	exit;
    }
}

if(! defined $username || ! defined $password || ! defined $default_number) {
    print "You dont have Net::Netrc installed so you must define the variables in this script\n";
    exit;
}




if (!defined $username || !defined $password) {
    print "You need to set the username and password\n";
    exit;
}


my %opts;

getopt ('c:t:f:p:',\%opts);

usage($0) unless ($opts{c});
$opts{t}=undef unless ($opts{t});
$opts{f}=$default_number unless $opts{f};


if (!defined $opts{c}) {
    usage($0);
    exit;
} elsif ($opts{c} eq "sms") {
    if ($opts{p} !~ /^(\+|\d)\d+$/) { 
	my $num=getContact($opts{p},$opts{t});
	if(defined $num) {
	    $opts{p}=$num;
	} else {
	    print "Unable to locate contact $opts{p}\n";
	    exit;
	}
    }
    
    if ($#ARGV ge 0) {
	my $message = join(' ', @ARGV);
	sendsms($opts{p},$message);
    } else {
	usage($0);
	exit;
    }
} elsif ($opts{c} eq "call") {
    if ($opts{p} !~ /^(\+|\d)\d+$/) { 
	my $num=getContact($opts{p},$opts{t});
	if(defined $num) {
	    $opts{p}=$num;
	} else {
	    print "Unable to locate contact $opts{p}\n";
	    exit;
	}
    }
    
    if(!defined $opts{f}) {
	print "Either specify a number or edit this script to set the default\n";
	exit;
    }
    
    placecall($opts{p},$opts{f});
} elsif ($opts{c} eq "cancel") {
    cancelcall();
} else {
    usage($0);
    exit;
}
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].

peterw
Posts: 430
Joined: Wed 19 Jul 2006, 12:12
Location: UK

Video conferencing

#233 Post by peterw »

Hi

I am not sure if this is the right place to post this but if anyone wants a simple facility to video call people then this is a good alternative - no sign up, etc. The first web site is the actual site to start the call and the second site is the web site describing it. I can't remember where I found it. I have tried it once and it worked well.

https://appear.in/
http://www.makeuseof.com/tag/move-googl ... ally-good/

peterw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: Video conferencing

#234 Post by mcewanw »

peterw wrote:Hi

I am not sure if this is the right place to post this but if anyone wants a simple facility to video call people then this is a good alternative - no sign up, etc. The first web site is the actual site to start the call and the second site is the web site describing it. I can't remember where I found it. I have tried it once and it worked well.

https://appear.in/
http://www.makeuseof.com/tag/move-googl ... ally-good/

peterw
Not sure there is an appropriate thread as yet. appear.in uses WebRTC as does the similar app linked here:

http://www.murga-linux.com/puppy/viewto ... 282#796282

William
github mcewanw

peterw
Posts: 430
Joined: Wed 19 Jul 2006, 12:12
Location: UK

An alternative to skype and hangouts

#235 Post by peterw »

Hi

You are right, perhaps I should have posted it elsewhere or started my own topic. I was not particularly concerned about the technicalities of how it worked but the functions that it had. If someone was able, it should be possible to put a front end onto it so that when a button is pressed under internet a brief description come up stating how to use it and then giving the reference to the appear.in site. It would be a very lightweight video call system useful for Puppy. It does not need any programmes installed and can be used by any operating system, I think. It does not need people to install skype or google hangouts which is a one of its big strengths.

peterw

zandarian
Posts: 117
Joined: Wed 14 Oct 2009, 21:10

#236 Post by zandarian »

Thanks. I can connect to my VoIP account unbinding the SIP ALG and the UDP 5060 port. But I listen no sound at all. Details in http://www.murga-linux.com/puppy/viewto ... 672#797672

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

PSip - Puppy SIP

#237 Post by Sky Aisling »

Hi Kennel Mates,

I have a nooby question about Psip. Bare with me please.
Can I call a regular land line telephone or a cell phone number using Puppy Phone?
I'm reading http://puppylinux.org/wikka/PuppySip.
Grant writes:
Functionality
Ok, let's take it for a spin, what can it do?
* Make free voice calls from PC to PC
* Make voice calls from PC to landlines or mobiles (You need an account at a SIP provider such as proxy01.sipphone.com)
* Instant messaging
* Leave and retrieve free voice mail messages (using proxy01.sipphone.com)
* Conference calls
* Listen to news and sports services
What is 'an account at a SIP provider'. What's a SIP provider?
It doesn't look like I can call a friend who has just a regular ole land line and have her phone ring and pick up a call like she normally would for any incoming call from another 'regular' phone.
Am I correct?

Thank you in advance for your kind response.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#238 Post by Sylvander »

Example:
Here's my SIP Service Provider:
http://www.iptel.org/service
At the moment I use an electronic box [Linksys Internet Phone Adapter] that connects to my router, and then I can connect any ordinary phone to the box.
This can accept or send phone calls via the internet.
I don't pay any money to the account, so it only ACCEPTS calls, and I've used it for this.
If I charge the account with funds I can make calls to landline phones and mobile phones anywhere in the world, but haven't done so yet.
Last edited by Sylvander on Sat 14 Mar 2015, 02:13, edited 1 time in total.

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

PSip - Puppy SIP

#239 Post by Sky Aisling »

Thank you, Sylvander.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#240 Post by Sylvander »

Oops, I wonder if this is my SIP provider?
Saved both of these in my password vault and I've forgotten which I used to set up the service.
Probably this rather than the other.

Here's the tour.

Post Reply