Facebook To Replace Your VoIP Provider? May Be In Near Future!

Facebook has been experimenting a lot lately. A multi-billions dollar company should not be content with what it has, should it? Last month Facebook started the voice messaging for its iOS Messenger app. Today it has brought voice calling option in its main iOS app. Now users in US and Canada have option to call their online Facebook friends in the main Facebook app.

What is this voice call?

You can see this option when you tap on a friend’s name. If he/she is online, you can do a voice chat from your phone by clicking on the “free call” button. Of course it will cost you more data charges. No, you cannot call a friend on his/her phone number if he/she is online. At least not now. When a user is not online, the “free call” option is greyed out.

Facebook Voice Calling
Pic courtesy: TechCrunch

Bah! Sounds more like Skype and Gtalk

Yes! This was my first reaction as well. What’s the big deal. Skype and Gtalk already has this option where you can voice as well as video chat with online users. With Skype, you can also call on a friend’s phone number (using Skype credits) if he/she is not online. So what’s the fuzz about Facebook providing voice calling option?

Tip of the Zucker…oops…iceberg!

Look at the bigger picture. It could be just the tip of the iceberg. Facebook may be (and it should be) planning to roll out complete voice and video chat option in its mobile app. VoIP is a growing industry and $8 Bn selling price of Skype is a confirmation. Facebook is a social network with over a 1 billion people worldwide. It is the de facto standard in social media industry.

With the rise of smartphones, a huge population has their contacts synced with Facebook. What do you see here? An immense opportunity to utilize them for a VoIP project. After all if you have calling options straight in Facebook, why would you go and search for the same friend in Skype or Gtalk?

With its messenger service for SMS it already has reduced the phone bills for many. And with the calling option, it surely is going to reduce it further. What is your opinion on it? Will it be a hit or a miss?

Tutorial on External System Calls from PERL or TCL/TK Program

Tutorial on External System Calls from PERL or TCL/TK Program

There are several ways to call external system calls from inside the PERL or TCL/TK Program, we use many of these in several of our Integration Line Areas such as SCHAPI Software, Perl Programs etc.

1: Using System function : We use system function when we don’t want to capture the output of the command run, we can only get to know that whether the command succeeded or not.Ex: From our JOB where it just triggers the external program and doesn’t capture the output of PROGRAM.

system ‘ls -l $HOME';
if ($RUN_TYPE eq “I” || $RUN_TYPE eq “S” ) {
if ( $RUN_TYPE eq “S” ){
system(“perl D:\\scmwrk82\\J2EEServer\\config\\CRM\\Poller_Libra\\ShutDownPoller.pl ‘E'”);
}
else {
system(“perl D:\\scmwrk82\\J2EEServer\\config\\CRM\\Poller_Libra\\ShutDownPoller.pl ‘I'”);
}
}
2: exec
It is same as system function except that it does not start child process, The exec function causes the Perl process itself to perform the requested action.Ex: From our Script to call our external script of Unix.

button .frame_bottom.ok \
-relief raised \
-text “Yes” -font $MediumFont -fg red \
-borderwidth 2 \
-command { exec /opt/gemini/prj/oper/bin/cleaning_maestro.sh &
exit }

3: backticks
We want to capture the output of the command,
Like : my $now = `date`; # grab the output of date
print “The time is now $now”;
Backquotes in list context , If the output from a command has multiple lines, the scalar use of backquotes returns it as a single long string containing newline characters. However, using the same backquoted string in a list context yields a list containing one line of output per element.

my $who_text = `who`; ( stores the output in singe long string)

my @who_lines = `who`; (stores the output in list context)
4: Using open function ( process as Filehandles)
When we want to pipe the command (as input or output) to the script.There are 2 ways to do it :

a : capture the data of a command (syntax: open(“command |”))
b: feed an external command with data generated from the Perl script (syntax: open(“| command”))

open DATE, “date|” or die “cannot pipe from date: $!”;
here we are trying to run the date command and piping its output to DATE file handle
now we can read the output : my $now = ;

open MAIL, “|mail merlyn” or die “cannot pipe to mail: $!”;
Here we are trying to send data to the mail process,

print MAIL “The time is now $now”; # presume $now ends in newline;
close MAIL;
die “mail: nonzero exit of $?” if $?;

Now one small question arises ,why do we use processes as filehandles? (when the same task can be done using backquotes ? , Well, it’s the only easy way to write to a process, based on the results of a computation. If you’re only reading, backquotes can be easier , to manage unless you want to have the results as they come in.Example :

open F, “find / -atime +90 -size +1000 -print|” or die “fork: $!”;
while () {
chomp;
printf “%s size %dK last accessed on %s\n”,
$_, (1023 + -s $_)/1024, -A $_;
}

The find command is looking for all the files not accessed within the past 90 days and larger than 1,000 blocks. While find is searching, Perl can wait. As each file is found, Perl responds to the incoming name and displays some information about that file for further research.Had this been written with backquotes, we wouldn’t have seen any output until the find command had finished. It’s comforting to see that it’s actually doing the job before it’s done.