[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Linphone-developers] incoming call, audio, behind NAT
From: |
Rick Sewill |
Subject: |
[Linphone-developers] incoming call, audio, behind NAT |
Date: |
Sat, 26 Mar 2005 11:55:07 -0600 |
User-agent: |
Mutt/1.4.1i |
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] incoming call, audio, behind NAT,
Rick Sewill <=