linphone-developers
[Top][All Lists]
Advanced

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

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


From: Shailabh...
Subject: Re: [Linphone-developers] incoming call, audio, behind NAT
Date: Sun, 27 Mar 2005 01:36:02 -0800 (PST)

Hi rick,
You mean by patching this code with the linphone the NAT isssue is taken care of???
Regards,
Shailabh

Rick Sewill <address@hidden> wrote:
With linphone 1.0.x (1.0.0 or 1.0.1),
I can't seem to get audio for incoming calls.

The way I test this is to go to www.freeworlddialup.com
where I have an account,
Select an option to "Call Me" listed in the Quick Start Guide.

I am behind NAT. The NAT device does not understand the SIP protocol.

The ethernet sniff showed sdp_context_generate_template()
in coreapi/sdphandler.c was putting in my local (192.168.x.x)
IP address when sending the SIP/2.0 200 OK message.

I tried the following patch.
After this patch, I could hear the automated voice say,
"Welcome to Freeworld Dialup...."

I do not understand the code well enough to know if the following
patch is correct, or if there is a better patch that should be done.

===== BEGIN PATCH to linphone 1.0.1 =====
diff -Naur orig-linphone-1.0.1/coreapi/sdphandler.c
linphone-1.0.1/coreapi/sdphandler.c
--- orig-linphone-1.0.1/coreapi/sdphandler.c 2005-03-07
08:50:36.000000000 -0600
+++ linphone-1.0.1/coreapi/sdphandler.c 2005-03-26 10:42:47.012711392
-0600
@@ -256,6 +256,19 @@
ctx->remote=remote;
tmp=sdp_message_o_addr_get(remote);
eXosip_get_localip_for(tmp,&ctx->localip);
+
+ 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 PATCH to linphone 1.0.1 =====

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



_______________________________________________
Linphone-developers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/linphone-developers


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!
reply via email to

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