diff --git a/configure.in b/configure.in index fec1ed27985f016350cf069316b558a9874e5381..2ecf17659a937a72f20e13f5ee39f763731fdf8a 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([linphone],[3.2.99.5],[linphone-developers@nongnu.org]) +AC_INIT([linphone],[3.2.99.7],[linphone-developers@nongnu.org]) AC_CANONICAL_SYSTEM dnl Source packaging numbers diff --git a/coreapi/help/doxygen.dox.in b/coreapi/help/doxygen.dox.in index acdec9090a1d02294d6c2105af27d3038c1a9ba0..13502d42424b7f601c4eea830b7ce70ff517ed8c 100644 --- a/coreapi/help/doxygen.dox.in +++ b/coreapi/help/doxygen.dox.in @@ -28,6 +28,49 @@ * @verbinclude COPYING */ +/** + * @defgroup tutorial_liblinphone Tutorial: Placing and receiving calls with liblinphone + * + +<H1>Initialize liblinphone</H1> + +The first thing to do is to initialize the library passing it a set of callbacks functions to receive +various notifications: incoming calls, progress of calls etc... +These callbacks are all grouped in the LinphoneCoreVTable structure. +All are optionnals (use NULL if you don't need them). +The following code shows how initialize liblinphone: + +<PRE> + ##include <linphonecore.h> + + //callback function for notification of incoming calls + static void on_invite_recv(LinphoneCore *lc, const char *from){ + printf("Receiving a call from %s\n",from); + } + + //callback function for notification end of calls (by remote) + static void on_bye_recv(LinphoneCore *lc, const char *from){ + printf("Remote end hangup\n"); + } + + / + static void on_display_status(LinphoneCore *lc, const char *msg){ + printf("%s",msg); + } + + int main(int argc, char *argv[]){ + LinphoneCoreVTable vtable; + + memset(&vtable,0,sizeof(vtable)); + vtable.inv_recv=&on_invite_recv; + vtable.bye_recv=&on_bye_recv; + vtable.display_status=&on_display_status; + + } + +</PRE> + + /** * @defgroup initializing Initialization and destruction diff --git a/coreapi/misc.c b/coreapi/misc.c index 894c3fc2278ef8d784f6f5592dbb6d7f92899eab..55aa83d4de20982bb3593921b2bc0d05431330a2 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -567,7 +567,8 @@ void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ } } } - if (ac->addr[0]!='\0' && vc->addr[0]!='\0' && strcmp(ac->addr,vc->addr)==0){ + if ((ac->addr[0]!='\0' && vc->addr[0]!='\0' && strcmp(ac->addr,vc->addr)==0) + || sock2==-1){ strcpy(call->localdesc->addr,ac->addr); } close_socket(sock1);