linphone-users
[Top][All Lists]
Advanced

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

[Linphone-users] [announce] Multiple calls API in liblinphone


From: Simon Morlat
Subject: [Linphone-users] [announce] Multiple calls API in liblinphone
Date: Tue, 31 Aug 2010 11:52:05 +0200

Hi,

This mail is too inform about some important changes in liblinphone.
Since a few months, a work has be done in 'dev_multicall' branch of git repo to implement multi-calls features in liblinphone. This consists in: All this work is now done and finalized, and the dev_multicall branch has been merged into 'master' branch.

The "only one call" original design of liblinphone had to be changed to enable all theses new features. Some of these changes are not compatible with previous versions of liblinphone, requiring some changes in applications using liblinphone.
Here is a summary of the changes:

* linphone_core_invite() and linphone_core_invite_address() now return a LinphoneCall object instead of an int. This LinphoneCall object represents a call. An application can safely store its pointer after calling linphone_call_ref() and then use it later to performs some actions on it: for example linphone_core_terminate(LinphoneCore *lc, LinphoneCall *call). When the application no more needs to hold a reference to the call, it must call linphone_call_unref().

* linphone_core_terminate() and linphone_core_accept_call 's 2nd arguments become a LinphoneCall.

* linphone_core_pause_call() and linphone_core_resume_call() have been added to pause and resume a call.

* The LinphoneCoreVTable structure holding callbacks has been cleaned:
  - all callbacks are optional, which facilitates the writing of very simple applications that don't need all notifications.
  - inv_recv and bye_recv callbacks are removed
  - general_state callback is removed, as well as the gstate_t structure and LinphoneGeneralState enum that went with it.
  - instead 3 new callbacks have been added to notify all events related to the 3 distinct domains: general state, call state (, and registration state. These callbacks are:

**Call state notification callback prototype*/
typedef void (*LinphoneGlobalStateCb)(struct _LinphoneCore *lc, LinphoneGlobalState gstate, const char *message);
/**Call state notification callback prototype*/
typedef void (*LinphoneCallStateCb)(struct _LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message);
/**Registration state notification callback prototype*/
typedef void (*LinphoneRegistrationStateCb)(struct _LinphoneCore *lc, LinphoneProxyConfig *cfg, LinphoneCallState cstate, const char *message);

The 3 enums describing the states are quite self-explaining:

typedef enum _LinphoneCallState{
LinphoneCallIdle,
LinphoneCallIncomingReceived,
LinphoneCallOutgoingInit,
LinphoneCallOutgoingProgress,
LinphoneCallOutgoingRinging,
LinphoneCallOutgoingEarlyMedia,
LinphoneCallConnected,
LinphoneCallStreamsRunning,
LinphoneCallPausing,
LinphoneCallPaused,
LinphoneCallResuming,
LinphoneCallRefered,
LinphoneCallError,
LinphoneCallEnd,
} LinphoneCallState;

typedef enum _LinphoneGlobalState{
LinphoneGlobalOff,
LinphoneGlobalStartup,
LinphoneGlobalOn,
LinphoneGlobalShutdown
}LinphoneGlobalState;

typedef enum _LinphoneRegistrationState{
LinphoneRegistrationNone,
LinphoneRegistrationProgress,
LinphoneRegistrationOk,
LinphoneRegistrationCleared,
LinphoneRegistrationFailed
}LinphoneRegistrationState;

* Additionnaly, linphone_core_set_play_file() can be used to setup a music file (wav, 16bit) to be played while putting somebody on hold.

These new features have been tested and validated using linphonec. Linphonec has been enriched with new commands for that purpose:
'pause' : to pause call
'resume <callid> : to resume a call
'calls' : lists all calls with their associated ids.
'transfer <call id> <destination>'

The gtk+ interface has not been modified yet to support all these new features. This will come in the future.

The related API documentation can be browsed here:
http://download-mirror.savannah.gnu.org/releases/linphone/docs/liblinphone/modules.html

A simple tutorial showing liblinphone usage to place an outgoing call has been added to the sources and the documentation:
http://download-mirror.savannah.gnu.org/releases/linphone/docs/liblinphone/group__tutorial__liblinphone.html

A tarball can be downloaded here:
http://download-mirror.savannah.gnu.org/releases/linphone/unstable/source/linphone-3.3.99.1.tar.gz

As usual feedback is welcome.

Warm thanks to Maxim Podbereznyy, the CEO of MENTOREL company, who sponsored the development of these new features,
as well to Aurélien Bouin who contributed the multicall patch on which this work is based on.

Best regards,

Simon




reply via email to

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