linphone-developers
[Top][All Lists]
Advanced

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

[Linphone-developers] Cannot make call in local network without connectt


From: Roy Huang
Subject: [Linphone-developers] Cannot make call in local network without connectting to internet
Date: Tue, 27 Mar 2007 14:42:26 +0800

Hi,

When I test two linphones directly in local network without connecting
them to internet, they cannot find each other.

I find that is caused by it trying to find the network interface by
connecting to "15.128.128.93", if linphone cannot connect to the ip,
it will cannot find its own network interface. That seems like a
little strange. How about some day the server with the ip down?

The following patch makes two linphone work in local network.

diff -uNr linphone-1.6.0-orig/coreapi/linphonecore.c
linphone-1.6.0/coreapi/linphonecore.c
--- linphone-1.6.0-orig/coreapi/linphonecore.c  2007-01-22
04:33:39.000000000 +0800
+++ linphone-1.6.0/coreapi/linphonecore.c       2007-03-27 11:14:17.000000000 
+0800
@@ -102,13 +102,16 @@
LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, const
char *from, const char *to, int cid, int did)
{
        char localip[LINPHONE_IPADDR_SIZE];
+       osip_from_t *from_url=NULL;
        LinphoneCall *call=ms_new0(LinphoneCall,1);
        osip_from_t *me= linphone_core_get_primary_contact_parsed(lc);
        call->dir=LinphoneCallIncoming;
        call->cid=cid;
        call->did=did;
        call->core=lc;
-       linphone_core_get_local_ip(lc,NULL,localip);
+       osip_from_init(&from_url);
+       osip_from_parse(from_url, from);
+       linphone_core_get_local_ip(lc,from_url->url->host,localip);
        
call->sdpctx=sdp_handler_create_context(&linphone_sdphandler,localip,me->url->username);
        linphone_call_init_common(call, osip_strdup(from), osip_strdup(to));
        osip_from_free(me);




reply via email to

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