[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] Cannot make call in local network without conn
From: |
Simon Morlat |
Subject: |
Re: [Linphone-developers] Cannot make call in local network without connectting to internet |
Date: |
Wed, 4 Apr 2007 17:06:04 +0200 |
User-agent: |
KMail/1.9.5 |
Hi,
Linphone does not connect to the IP (it does not send any packet nor receive
any response). The code you've seen is just a hack so that the kernel
automatically sets the socket to the interface that connects to this
(randomly choosen by me) public IP address.
However your patch is OK and I'm going to apply it to the cvs.
Thanks a lot.
SImon
Le mardi 27 mars 2007 08:42, Roy Huang a écrit :
> 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->u
>rl->username); linphone_call_init_common(call, osip_strdup(from),
> osip_strdup(to)); osip_from_free(me);
>
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Linphone-developers] Cannot make call in local network without connectting to internet,
Simon Morlat <=