[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] incoming call, audio, behind NAT

From: Rick Sewill
Subject: Re: [Linphone-developers] incoming call, audio, behind NAT
Date: Mon, 28 Mar 2005 04:30:50 -0600
User-agent: Mutt/1.4.1i

On Sun, Mar 27, 2005 at 08:44:55PM -0800, Shailabh... wrote:
> Hi Rick,
> Can you please also tell me the procedure how to check
> this with . I tried but I failed
> earlier and also the procedure how to patch this code
> with the linphone code?
> Regards,
> Shailabh

I am running Fedora Core 3.  I have the latest updates to Fedora Core 3.

My gcc version is "gcc -v"
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)

I had previosly installed linphone from RPMs using
yum install linphone
I have the following RPMs installed:
a) libosip2-2.2.0-1.1.fc3.rf
   This rpm came from Vendor: Dag Apt Repository,
b) speex-1.0.4-4
   This rpm came from Vendor: Red Hat, Inc.
c) linphone-1.0.0-1.1.fc3.rf
   This rpm came from Vendor: Dag Apt Repository,

   I have added the Dag RPM Repository for Fedora Core 
   to the list of yum repositories.

I found I could not receive incoming calls from without applying a patch.

ethereal showed the SIP/SDP Status: 200 OK, with session description
message was passing my internal IP address on the 
Owner/Creator, Session Id
  Owner Address: 192.168.2.x
and also
Connection Information (c):  IN IP4 192.168.2.x

I wanted linphone to work for me, and was curious, so I looked at the
source code.  I needed to download and build the code.  

I did the following.

To build linphone 1.0.1,
1) I created a directory where I wanted to build and downloaded sources:
   a) mkdir ~/downloads/linphone
   b) I downloaded linphone-1.0.1 from
   c) I downloaded libosip2-2.2.0.tar.gz from
   d) I downloaded speex-1.0.4.tar.gz (I forget where I got it from),
      think it was

2) I untarred the files in the ~/downloads/linphone directory
   a) tar -xzf libosip2-2.2.0.tar.gz
   b) tar -xzf linphone-1.0.1.tar.gz
   c) tar -xzf speex-1.0.4.tar.gz

3) I did not wish to put any files in /usr/local/bin or /usr/bin
   so I build and "install" binaries in a local directory:
   I made a RUN script to build each package and built in the
   following order:
   a) To build libosip2-2.2.0, my RUN script in libosip2-2.2.0 looked

./configure --prefix=/home/rsewill/root/usr || exit
make || exit
make install || exit

   b) To build speex-1.0.4, my RUN script in speex-1.0.4 looked like:

./configure --prefix=/home/rsewill/root/usr || exit
make || exit
make install || exit

   c) To build linphone-1.0.1, my RUN script in linphone-1.0.1 looked

./configure --prefix=/home/rsewill/root/usr \
--with-osip=/home/rsewill/root/usr \
--with-speex=/home/rsewill/root/usr \
|| exit
make || exit
make install || exit

I would suggest building the above without making any patches and
executing the resultant linphone binary to insure the above procedure
works for you before you add any patches.  

My PATH variable has /home/rsewill/root/usr/bin before other bin directories
echo $PATH

To apply a patch, I went to
and did the following command:
patch -p1 < ../linphone-1.0.1.patch
where ../linphone-1.0.1.patch contained the patch I wanted to apply.

===== BEGIN ../linphone-1.0.1.patch =====
diff -Naur orig-linphone-1.0.1/coreapi/sdphandler.c 
--- orig-linphone-1.0.1/coreapi/sdphandler.c    2005-03-07 08:50:36.000000000 
+++ linphone-1.0.1/coreapi/sdphandler.c 2005-03-26 10:42:47.012711392 -0600
@@ -256,6 +256,19 @@
+       if( eXosip_is_public_address(tmp))
+       {
+               char *firewall_address;
+               firewall_address = eXosip_get_firewallip();
+               if (firewall_address != NULL)
+               {
+                       free(ctx->localip);
+                       ctx->localip = osip_strdup(firewall_address);
+               }
+       }
        answer = sdp_context_generate_template (ctx);
        /* for each m= line */
diff -Naur orig-linphone-1.0.1/exosip/eXosip.c linphone-1.0.1/exosip/eXosip.c
--- orig-linphone-1.0.1/exosip/eXosip.c 2005-02-22 11:30:10.000000000 -0600
+++ linphone-1.0.1/exosip/eXosip.c      2005-03-26 02:13:42.000000000 -0600
@@ -56,6 +56,15 @@
 eXosip_t eXosip;
+char *eXosip_get_firewallip(void)
+       if (eXosip.j_firewall_ip[0]!='\0')
+       {
+               return eXosip.j_firewall_ip;
+       }
+       return NULL;
 void eXosip_set_firewallip(const char *firewall_address)
        if (firewall_address==NULL) return;
===== END ../linphone-1.0.1.patch =====

To have call me, I go to the following URL:
   This is the Quick Start Guide web page

   a) I have already signed up so I don't need to do that again

      If I needed to sign up, I would follow the "Sign Up" URL
      on this Quick Start Guide webpage

   b) I have already configured linphone to use freeworlddialup
      so I don't have to do that again.  Running linphone, I have
      selected the following under Preferences:
      NAT traversal options (experimental)
      Enable is checked
      Firewall's external ip address (in dot notations): is
      filled in:

     My RTP properties has port 7078
     The Number of buffered milliseconds is 60 (I think that's the default)

     The Run sip user agent on port: 5060 (I thinnk that's the default)

     Your sip address:      sip: 628497 (at sign)
     where 628497is my www.freeworlddialup account number.

     I have one Remote services, Server address entry:
     sip:628497(at sign)

     Editing this entry, I have
     Send registration: checked
     Registration Period: 120     (I don't know what this value does)
     SIP Identity: sip:628497(at sign)
     SIP Proxy:    sip:628497(at sign)
     I have Publish presence information: checked

     Somewhere during execution of linphone, I was asked for my
     identity and password--I gave it my www.freeworlddialup identify
     and password.

     (at sign) is the @ symbol.  It seems e-mail to linphone-developers
     does things to e-mail addresses.  If I start receiving spam to this
     number, I will be forced to delete this number and create another.

   c) My router to the internet is a firewall/NAT device.
      This firewall/NAT device does not understand SIP.
      My internal network is

      I have configured it to send any traffic it receives from the
      internet for UDP port 5060 or UDP port 7078 to my laptop.

   d) My laptop is running iptables, so I need to open UDP port 5060
      and UDP port 7078 on my laptop.

      On a security note: I hope linphone et al doesn't have any
      problems virus writers could take advantage of.  My laptop
      is for my personal use and for play.  I use other computers
      for work.  These other computers are not directly accessible
      from the Internet.  I would be unhappy if I suffered an attack.
      There's probably not much I could do about it, except keep
      software up to date and hope virus writers look for easier pickings.

2) I run linphone, making sure its the linphone I just built
   a) which linphone

   b) run linphone

   c) For me, linphone should "register" automatically with the 
      linphone 1.0.1 fix from Simon

3) To have linphone call me,
   a) I select "Log into Call Me to for an automated call"

   b) If I am not already logged in to www.freeworlddialup through
      the web browser, I will be asked for my account and password

   c) linphone should ring when the call is placed to me.

   d) Without the patch I suggested, I would not hear audio
      when I push the "Call or Answer button",

      With the patch that I suggest, I hear a voice saying,
      "Welcome to Freeworld Dialup Conferencing...."

I need to add a disclaimer.  I haven't been able to talk any friends
into using SIP yet, so I haven't had a real live person call me.

I am assuming, if I can hear the automated voice say, 
"Welcome to Freeworld Dialup Conferencing....", 
things are working ok.  

Things are at least working better, because I couldn't hear the
automated voice say anything before applying the patch.

It would be nice if I could convince one of my friends to start using
SIP, and to call me sometime so I wouldn't have any remaining doubts.

I apologize for the length of this reply.
I don't know the level of detail appropriate for this mailing list.
I should lurk more before sending e-mail so I know what is appropriate.


> > Sailabh,
> > 
> > I apologize.  I meant to send my reply to the list.
> > In my intial response, I only replied to you.
> > 
> > On Sun, Mar 27, 2005 at 01:36:02AM -0800,
> > Shailabh... wrote:
> > > Hi rick,
> > > You mean by patching this code with the linphone
> > the NAT isssue is taken care of???
> > > Regards,
> > > Shailabh
> >  
> > I think so.  As I said, I do not know the code well
> > enough to know
> > that I haven't broken something.  I do not know the
> > code well enough
> > to know if there is a better way to fix the problem.
> >  
> > What I do know is, with the patch, I can receive
> > audio when I ask
> > freeworlddialup to call me, whereas, before, I could
> > not.
> > 
> > I would ask others to try this patch.  I expect
> > Simon Morlat will look
> > at this patch and tell us what is wrong with this
> > patch when he gets
> > back from vacation.  I will only use this patch
> > until Simon creates an
> > official fix, at which time, I will upgrade to his
> > latest code.
> > 
> > I have not run into any problem (that I know of)
> > with this patch.
> > I am new to VoIP and SIP.  
> > 
> > -Rick
> > 
> > 
> >
> > 
> La mejor manera de perder alguien deber? ser sentado luego a ellos instruido 
> que usted no los puede tener. 
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Small Business - Try our new resources site!

Rick Sewill                      Phone/FAX: +1-218-287-1075
E-mail: address@hidden    Cell Phone: +1-701-866-0266
                                      VoIP: sip:address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]