]> sjero.net Git - linphone/blobdiff - coreapi/linphonecore.h
improve call quality indicator (takes into account video)
[linphone] / coreapi / linphonecore.h
index 81044fff54e5c6373b74958ae34f47b7aa64a022..37001d367a4663dd5ce8c5369aa6da8f41a91a44 100644 (file)
@@ -37,26 +37,40 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 extern "C" {
 #endif
 
-struct _MSSndCard;
 struct _LinphoneCore;
 /**
  * Linphone core main object created by function linphone_core_new() .
  * @ingroup initializing
  */
 typedef struct _LinphoneCore LinphoneCore;
-struct SalOp;
 
 struct _LpConfig;
 
 
-struct _LCSipTransports{
+/**
+ * Linphone core SIP transport ports.
+ * Use with #linphone_core_set_sip_transports
+ * @ingroup initializing
+ */
+typedef struct _LCSipTransports{
+       /**
+        * udp port to listening on, negative value if not set
+        * */
        int udp_port;
+       /**
+        * tcp port to listening on, negative value if not set
+        * */
        int tcp_port;
+       /**
+        * dtls port to listening on, negative value if not set
+        * */
        int dtls_port;
+       /**
+        * tls port to listening on, negative value if not set
+        * */
        int tls_port;
-};
+} LCSipTransports;
 
-typedef struct _LCSipTransports LCSipTransports;
 
 /**
  * Object that represents a SIP address.
@@ -141,23 +155,7 @@ typedef enum _LinphoneCallStatus {
  * @ingroup call_logs
  *
 **/
-typedef struct _LinphoneCallLog{
-       LinphoneCallDir dir; /**< The direction of the call*/
-       LinphoneCallStatus status; /**< The status of the call*/
-       LinphoneAddress *from; /**<Originator of the call as a LinphoneAddress object*/
-       LinphoneAddress *to; /**<Destination of the call as a LinphoneAddress object*/
-       char start_date[128]; /**<Human readable string containg the start date*/
-       int duration; /**<Duration of the call in seconds*/
-       char *refkey;
-       void *user_pointer;
-       rtp_stats_t local_stats;
-       rtp_stats_t remote_stats;
-       float quality;
-    int video_enabled;
-       struct _LinphoneCore *lc;
-       time_t start_date_time; /**Start date of the call in seconds as expressed in a time_t */
-} LinphoneCallLog;
-
+typedef struct _LinphoneCallLog LinphoneCallLog;
 
 /**
  * Enum describing type of media encryption types.
@@ -174,12 +172,22 @@ enum LinphoneMediaEncryption {
 typedef enum LinphoneMediaEncryption LinphoneMediaEncryption;
 
 /*public: */
+LinphoneAddress *linphone_call_log_get_from(LinphoneCallLog *cl);
+LinphoneAddress *linphone_call_log_get_to(LinphoneCallLog *cl);
+LinphoneAddress *linphone_call_log_get_remote_address(LinphoneCallLog *cl);
+LinphoneCallDir linphone_call_log_get_dir(LinphoneCallLog *cl);
+LinphoneCallStatus linphone_call_log_get_status(LinphoneCallLog *cl);
+LinphoneCallStatus linphone_call_log_video_enabled(LinphoneCallLog *cl);
+time_t linphone_call_log_get_start_date(LinphoneCallLog *cl);
+int linphone_call_log_get_duration(LinphoneCallLog *cl);
+float linphone_call_log_get_quality(LinphoneCallLog *cl);
 void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up);
 void *linphone_call_log_get_user_pointer(const LinphoneCallLog *cl);
 void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey);
 const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl);
 const rtp_stats_t *linphone_call_log_get_local_stats(const LinphoneCallLog *cl);
 const rtp_stats_t *linphone_call_log_get_remote_stats(const LinphoneCallLog *cl);
+const char *linphone_call_log_get_call_id(const LinphoneCallLog *cl);
 char * linphone_call_log_to_str(LinphoneCallLog *cl);
 
 struct _LinphoneCallParams;
@@ -203,7 +211,12 @@ bool_t linphone_call_params_early_media_sending_enabled(const LinphoneCallParams
 bool_t linphone_call_params_local_conference_mode(const LinphoneCallParams *cp);
 void linphone_call_params_set_audio_bandwidth_limit(LinphoneCallParams *cp, int bw);
 void linphone_call_params_destroy(LinphoneCallParams *cp);
-
+bool_t linphone_call_params_low_bandwidth_enabled(const LinphoneCallParams *cp);
+void linphone_call_params_enable_low_bandwidth(LinphoneCallParams *cp, bool_t enabled);
+void linphone_call_params_set_record_file(LinphoneCallParams *cp, const char *path);
+const char *linphone_call_params_get_record_file(const LinphoneCallParams *cp);
+void linphone_call_params_add_custom_header(LinphoneCallParams *params, const char *header_name, const char *header_value);
+const char *linphone_call_params_get_custom_header(const LinphoneCallParams *params, const char *header_name);
 /**
  * Enum describing failure reasons.
  * @ingroup initializing
@@ -214,7 +227,8 @@ enum _LinphoneReason{
        LinphoneReasonBadCredentials, /**<Authentication failed due to bad or missing credentials*/
        LinphoneReasonDeclined, /**<The call has been declined*/
        LinphoneReasonNotFound, /**<Destination of the calls was not found.*/
-       LinphoneReasonNotAnswered
+       LinphoneReasonNotAnswered, /**<The call was not answered in time*/
+       LinphoneReasonBusy /**<Phone line was busy */
 };
 
 /**
@@ -261,6 +275,46 @@ typedef struct _LinphoneCall LinphoneCall;
 #define LINPHONE_CALL_STATS_AUDIO 0
 #define LINPHONE_CALL_STATS_VIDEO 1
 
+/**
+ * Enum describing ICE states.
+ * @ingroup initializing
+**/
+enum _LinphoneIceState{
+       LinphoneIceStateNotActivated, /**< ICE has not been activated for this call */
+       LinphoneIceStateFailed, /**< ICE processing has failed */
+       LinphoneIceStateInProgress, /**< ICE process is in progress */
+       LinphoneIceStateHostConnection, /**< ICE has established a direct connection to the remote host */
+       LinphoneIceStateReflexiveConnection, /**< ICE has established a connection to the remote host through one or several NATs */
+       LinphoneIceStateRelayConnection /**< ICE has established a connection through a relay */
+};
+
+/**
+ * Enum describing Ice states.
+ * @ingroup initializing
+**/
+typedef enum _LinphoneIceState LinphoneIceState;
+
+/**
+ * Enum describing uPnP states.
+ * @ingroup initializing
+**/
+enum _LinphoneUpnpState{
+       LinphoneUpnpStateIdle, /**< uPnP is not activate */
+       LinphoneUpnpStatePending, /**< uPnP process is in progress */
+       LinphoneUpnpStateAdding,   /**< Internal use: Only used by port binding */
+       LinphoneUpnpStateRemoving, /**< Internal use: Only used by port binding */
+       LinphoneUpnpStateNotAvailable,  /**< uPnP is not available */
+       LinphoneUpnpStateOk, /**< uPnP is enabled */
+       LinphoneUpnpStateKo, /**< uPnP processing has failed */
+};
+
+/**
+ * Enum describing uPnP states.
+ * @ingroup initializing
+**/
+typedef enum _LinphoneUpnpState LinphoneUpnpState;
+
+
 /**
  * The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams.
  *
@@ -285,14 +339,20 @@ struct _LinphoneCallStats {
        mblk_t*         received_rtcp; /**<Last RTCP packet received, as a mblk_t structure. See oRTP documentation for details how to extract information from it*/
        mblk_t*         sent_rtcp;/**<Last RTCP packet sent, as a mblk_t structure. See oRTP documentation for details how to extract information from it*/
        float           round_trip_delay; /**<Round trip propagation time in seconds if known, -1 if unknown.*/
+       LinphoneIceState        ice_state; /**< State of ICE processing. */
+       LinphoneUpnpState       upnp_state; /**< State of uPnP processing. */
+       float download_bandwidth; /**<Download bandwidth measurement of received stream, expressed in kbit/s, including IP/UDP/RTP headers*/
+       float upload_bandwidth; /**<Download bandwidth measurement of sent stream, expressed in kbit/s, including IP/UDP/RTP headers*/
+       float local_late_rate; /**<percentage of packet received too late over last second*/
+       float local_loss_rate; /**<percentage of lost packet over last second*/
 };
 
 /**
  * @}
 **/
 
-const LinphoneCallStats *linphone_call_get_audio_stats(const LinphoneCall *call);
-const LinphoneCallStats *linphone_call_get_video_stats(const LinphoneCall *call);
+const LinphoneCallStats *linphone_call_get_audio_stats(LinphoneCall *call);
+const LinphoneCallStats *linphone_call_get_video_stats(LinphoneCall *call);
 
 
 /** Callback prototype */
@@ -321,7 +381,7 @@ typedef enum _LinphoneCallState{
        LinphoneCallPausedByRemote, /**<The call is paused by remote end*/
        LinphoneCallUpdatedByRemote, /**<The call's parameters change is requested by remote end, used for example when video is added by remote */
        LinphoneCallIncomingEarlyMedia, /**<We are proposing early media to an incoming call */
-       LinphoneCallUpdated, /**<The remote accepted the call update initiated by us */
+       LinphoneCallUpdating, /**<A call update has been initiated by us */
        LinphoneCallReleased /**< The call object is no more retained by the core */
 } LinphoneCallState;
 
@@ -341,13 +401,14 @@ const char *linphone_call_get_refer_to(const LinphoneCall *call);
 bool_t linphone_call_has_transfer_pending(const LinphoneCall *call);
 LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call);
 int linphone_call_get_duration(const LinphoneCall *call);
-const LinphoneCallParams * linphone_call_get_current_params(const LinphoneCall *call);
+const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call);
 const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *call);
 void linphone_call_enable_camera(LinphoneCall *lc, bool_t enabled);
 bool_t linphone_call_camera_enabled(const LinphoneCall *lc);
 int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file);
 LinphoneReason linphone_call_get_reason(const LinphoneCall *call);
 const char *linphone_call_get_remote_user_agent(LinphoneCall *call);
+const char *linphone_call_get_remote_contact(LinphoneCall *call);
 float linphone_call_get_play_volume(LinphoneCall *call);
 float linphone_call_get_record_volume(LinphoneCall *call);
 float linphone_call_get_current_quality(LinphoneCall *call);
@@ -360,7 +421,17 @@ void *linphone_call_get_user_pointer(LinphoneCall *call);
 void linphone_call_set_user_pointer(LinphoneCall *call, void *user_pointer);
 void linphone_call_set_next_video_frame_decoded_callback(LinphoneCall *call, LinphoneCallCbFunc cb, void* user_data);
 LinphoneCallState linphone_call_get_transfer_state(LinphoneCall *call);
-    
+void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy);
+void linphone_call_start_recording(LinphoneCall *call);
+void linphone_call_stop_recording(LinphoneCall *call);
+/**
+ * Return TRUE if this call is currently part of a conference
+ *@param call #LinphoneCall
+ *@return TRUE if part of a conference.
+ *
+ @ingroup call_control
+ */
+bool_t linphone_call_is_in_conference(const LinphoneCall *call);
 /**
  * Enables or disable echo cancellation for this call
  * @param call
@@ -474,6 +545,8 @@ const char *linphone_proxy_config_get_addr(const LinphoneProxyConfig *obj);
 int linphone_proxy_config_get_expires(const LinphoneProxyConfig *obj);
 bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *obj);
 void linphone_proxy_config_refresh_register(LinphoneProxyConfig *obj);
+const char *linphone_proxy_config_get_contact_parameters(const LinphoneProxyConfig *obj);
+void linphone_proxy_config_set_contact_parameters(LinphoneProxyConfig *obj, const char *contact_params);
 struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig *obj);
 
 bool_t linphone_proxy_config_get_dial_escape_plus(const LinphoneProxyConfig *cfg);
@@ -562,10 +635,14 @@ LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *useri
 void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
 void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username);
 void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid);
+void linphone_auth_info_set_realm(LinphoneAuthInfo *info, const char *realm);
+void linphone_auth_info_set_ha1(LinphoneAuthInfo *info, const char *ha1);
 
 const char *linphone_auth_info_get_username(const LinphoneAuthInfo *i);
 const char *linphone_auth_info_get_passwd(const LinphoneAuthInfo *i);
 const char *linphone_auth_info_get_userid(const LinphoneAuthInfo *i);
+const char *linphone_auth_info_get_realm(const LinphoneAuthInfo *i);
+const char *linphone_auth_info_get_ha1(const LinphoneAuthInfo *i);
 
 /* you don't need those function*/
 void linphone_auth_info_destroy(LinphoneAuthInfo *info);
@@ -577,41 +654,72 @@ struct _LinphoneChatRoom;
  * @addtogroup chatroom
  * @{
  */
+
+/**
+ * A chat room message to old content to be sent.
+ * <br> Can be created by linphone_chat_room_create_message().
+ */
+typedef struct _LinphoneChatMessage LinphoneChatMessage;
+       
 /**
  * A chat room is the place where text messages are exchanged.
  * <br> Can be created by linphone_core_create_chat_room().
  */
 typedef struct _LinphoneChatRoom LinphoneChatRoom;
+
 /**
- * Create a new chat room for messaging from a sip uri like sip:joe@sip.linphone.org
- * @param lc #LinphoneCore object
- * @param to destination address for messages
- * @return #LinphoneChatRoom where messaging can take place.
+ *LinphoneChatMessageState is used to notify if messages have been succesfully delivered or not.
  */
-LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const char *to);
-/**
- * Destructor
- * @param cr #LinphoneChatRoom object
+typedef enum _LinphoneChatMessageStates {
+       LinphoneChatMessageStateIdle, /**<initial state*/
+       LinphoneChatMessageStateInProgress, /**<delivery in progress**/
+       LinphoneChatMessageStateDelivered, /**<message succesffully delivered an acknoleged by remote end point*/
+       LinphoneChatMessageStateNotDelivered /**<message was not delivered*/
+}LinphoneChatMessageState;
+
+/**
+ * Call back used to notify message delivery status
+ *@param msg #LinphoneChatMessage object
+ *@param status LinphoneChatMessageState
+ *@param ud application user data
  */
-void linphone_chat_room_destroy(LinphoneChatRoom *cr);
-
+typedef void (*LinphoneChatMessageStateChangeCb)(LinphoneChatMessage* msg,LinphoneChatMessageState state,void* ud);
 
-/**
- * get peer address \link linphone_core_create_chat_room() associated to \endlink this #LinphoneChatRoom
- * @param cr #LinphoneChatRoom object
- * @return #LinphoneAddress peer address
- */
+void linphone_core_set_chat_database_path(LinphoneCore *lc, const char *path);
+LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const char *to);
+LinphoneChatRoom *linphone_core_get_chat_room(LinphoneCore *lc, const LinphoneAddress *addr);
+void linphone_chat_room_destroy(LinphoneChatRoom *cr);
+LinphoneChatMessage* linphone_chat_room_create_message(LinphoneChatRoom *cr,const char* message);
 const LinphoneAddress* linphone_chat_room_get_peer_address(LinphoneChatRoom *cr);
-/**
- * send a message to peer member of this chat room.
- * @param cr #LinphoneChatRoom object
- * @param msg message to be sent
- */
 void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg);
-
+void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage* msg,LinphoneChatMessageStateChangeCb status_cb,void* ud);
+MSList *linphone_chat_room_get_history(LinphoneChatRoom *cr,int nb_message);
+void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr);
+void linphone_chat_room_delete_history(LinphoneChatRoom *cr);
+int linphone_chat_room_get_unread_messages_count(LinphoneChatRoom *cr);
+LinphoneCore* linphone_chat_room_get_lc(LinphoneChatRoom *cr);
 void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud);
 void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr);
 
+LinphoneChatMessageState linphone_chat_message_get_state(const LinphoneChatMessage* message);
+const char* linphone_chat_message_state_to_string(const LinphoneChatMessageState state);
+LinphoneChatMessage* linphone_chat_message_clone(const LinphoneChatMessage* message);
+void linphone_chat_message_destroy(LinphoneChatMessage* msg);
+void linphone_chat_message_set_from(LinphoneChatMessage* message, const LinphoneAddress* from);
+const LinphoneAddress* linphone_chat_message_get_from(const LinphoneChatMessage* message);
+const LinphoneAddress* linphone_chat_message_get_to(const LinphoneChatMessage* message);
+const char* linphone_chat_message_get_external_body_url(const LinphoneChatMessage* message);
+void linphone_chat_message_set_external_body_url(LinphoneChatMessage* message,const char* url);
+const char * linphone_chat_message_get_text(const LinphoneChatMessage* message);
+time_t linphone_chat_message_get_time(const LinphoneChatMessage* message);
+void* linphone_chat_message_get_user_data(const LinphoneChatMessage* message);
+void linphone_chat_message_set_user_data(LinphoneChatMessage* message,void*);
+LinphoneChatRoom* linphone_chat_message_get_chat_room(LinphoneChatMessage *msg);
+const LinphoneAddress* linphone_chat_message_get_peer_address(LinphoneChatMessage *msg);
+LinphoneAddress *linphone_chat_message_get_local_address(const LinphoneChatMessage* message);
+void linphone_chat_message_add_custom_header(LinphoneChatMessage* message, const char *header_name, const char *header_value);
+const char * linphone_chat_message_get_custom_header(LinphoneChatMessage* message, const char *header_name);
+
 /**
  * @}
  */
@@ -680,6 +788,7 @@ typedef void (*AuthInfoRequested)(struct _LinphoneCore *lc, const char *realm, c
 typedef void (*CallLogUpdated)(struct _LinphoneCore *lc, struct _LinphoneCallLog *newcl);
 /**
  * Callback prototype
+ * @deprecated use #MessageReceived instead.
  *
  * @param lc #LinphoneCore object
  * @param room #LinphoneChatRoom involved in this conversation. Can be be created by the framework in case \link #LinphoneAddress the from \endlink is not present in any chat room.
@@ -687,6 +796,15 @@ typedef void (*CallLogUpdated)(struct _LinphoneCore *lc, struct _LinphoneCallLog
  * @param message incoming message
  *  */
 typedef void (*TextMessageReceived)(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message);
+/**
+ * Chat message callback prototype
+ *
+ * @param lc #LinphoneCore object
+ * @param room #LinphoneChatRoom involved in this conversation. Can be be created by the framework in case \link #LinphoneAddress the from \endlink is not present in any chat room.
+ * @param LinphoneChatMessage incoming message
+ * */
+typedef void (*MessageReceived)(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message);
+       
 /** Callback prototype */
 typedef void (*DtmfReceived)(struct _LinphoneCore* lc, LinphoneCall *call, int dtmf);
 /** Callback prototype */
@@ -710,7 +828,8 @@ typedef struct _LinphoneVTable{
        NewSubscribtionRequestCb new_subscription_request; /**< Notify about pending subscription request */
        AuthInfoRequested auth_info_requested; /**< Ask the application some authentication information */
        CallLogUpdated call_log_updated; /**< Notifies that call log list has been updated */
-       TextMessageReceived text_received; /**< A text message has been received */
+       TextMessageReceived text_received; /** @deprecated, use #message_received instead <br> A text message has been received */
+       MessageReceived message_received; /** a message is received, can be text or external body*/
        DtmfReceived dtmf_received; /**< A dtmf has been received received */
        ReferReceived refer_received; /**< An out of call refer was received */
        CallEncryptionChangedCb call_encryption_changed; /**<Notifies on change in the encryption of call streams */
@@ -718,11 +837,11 @@ typedef struct _LinphoneVTable{
        BuddyInfoUpdated buddy_info_updated; /**< a LinphoneFriend's BuddyInfo has changed*/
        NotifyReceivedCb notify_recv; /**< Other notifications*/
        CallStatsUpdated call_stats_updated; /**<Notifies on refreshing of call's statistics. */
-       DisplayStatusCb display_status; /**< Callback that notifies various events with human readable text.*/
-       DisplayMessageCb display_message;/**< Callback to display a message to the user */
-       DisplayMessageCb display_warning;/** Callback to display a warning to the user */
-       DisplayUrlCb display_url;
-       ShowInterfaceCb show; /**< Notifies the application that it should show up*/
+       DisplayStatusCb display_status; /**< DEPRECATED Callback that notifies various events with human readable text.*/
+       DisplayMessageCb display_message;/**< DEPRECATED Callback to display a message to the user */
+       DisplayMessageCb display_warning;/**< DEPRECATED Callback to display a warning to the user */
+       DisplayUrlCb display_url; /**< DEPRECATED */
+       ShowInterfaceCb show; /**< DEPRECATED Notifies the application that it should show up*/
 } LinphoneCoreVTable;
 
 /**
@@ -740,7 +859,9 @@ typedef struct _LCCallbackObj
 typedef enum _LinphoneFirewallPolicy{
        LinphonePolicyNoFirewall,
        LinphonePolicyUseNatAddress,
-       LinphonePolicyUseStun
+       LinphonePolicyUseStun,
+       LinphonePolicyUseIce,
+       LinphonePolicyUseUpnp,
 } LinphoneFirewallPolicy;
 
 typedef enum _LinphoneWaitingState{
@@ -756,15 +877,37 @@ typedef void * (*LinphoneWaitingCallback)(struct _LinphoneCore *lc, void *contex
 void linphone_core_enable_logs(FILE *file);
 void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc);
 void linphone_core_disable_logs(void);
-/*sets the user-agent string in sip messages, must be set before linphone_core_new() or linphone_core_init() */
-void linphone_core_set_user_agent(const char *ua_name, const char *version);
 const char *linphone_core_get_version(void);
+const char *linphone_core_get_user_agent_name(void);
+const char *linphone_core_get_user_agent_version(void);
 
 LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
                                                const char *config_path, const char *factory_config, void* userdata);
 
 /* function to be periodically called in a main loop */
+/* For ICE to work properly it should be called every 20ms */
 void linphone_core_iterate(LinphoneCore *lc);
+#if 0 /*not implemented yet*/
+/**
+ * @ingroup initializing
+ * Provide Linphone Core with an unique identifier. This be later used to identified contact address coming from this device.
+ * Value is not saved.
+ * @param lc object
+ * @param string identifying the device, can be EMEI or UDID
+ *
+ */
+void linphone_core_set_device_identifier(LinphoneCore *lc,const char* device_id);
+/**
+ * @ingroup initializing
+ * get Linphone unique identifier
+ *
+ */
+const char*  linphone_core_get_device_identifier(const LinphoneCore *lc);
+
+#endif
+
+/*sets the user-agent string in sip messages, ideally called just after linphone_core_new() or linphone_core_init() */
+void linphone_core_set_user_agent(LinphoneCore *lc, const char *ua_name, const char *version);
 
 LinphoneAddress * linphone_core_interpret_url(LinphoneCore *lc, const char *url);
 
@@ -794,6 +937,8 @@ int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call);
 
 int linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const char *redirect_uri);
 
+int linphone_core_decline_call(LinphoneCore *lc, LinphoneCall * call, LinphoneReason reason);
+
 int linphone_core_terminate_all_calls(LinphoneCore *lc);
 
 int linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *call);
@@ -807,7 +952,12 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho
 int linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call);
 
 int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params);
-
+/**
+ * @ingroup media_parameters
+ * Get default call parameters reflecting current linphone core configuration
+ * @param LinphoneCore object
+ * @return  LinphoneCallParams
+ */
 LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *lc);
 
 LinphoneCall *linphone_core_get_call_by_remote_address(LinphoneCore *lc, const char *remote_address);
@@ -837,16 +987,8 @@ int linphone_core_get_upload_bandwidth(const LinphoneCore *lc);
 
 void linphone_core_enable_adaptive_rate_control(LinphoneCore *lc, bool_t enabled);
 bool_t linphone_core_adaptive_rate_control_enabled(const LinphoneCore *lc);
-/**
- * set audio packetization time linphone expect to receive from peer
- * @ingroup media_parameters
- *
- */
+
 void linphone_core_set_download_ptime(LinphoneCore *lc, int ptime);
-/**
- * get audio packetization time linphone expect to receive from peer, 0 means unspecified
- * @ingroup media_parameters
- */
 int  linphone_core_get_download_ptime(LinphoneCore *lc);
 
 void linphone_core_set_upload_ptime(LinphoneCore *lc, int ptime);
@@ -863,10 +1005,37 @@ const MSList *linphone_core_get_video_codecs(const LinphoneCore *lc);
 int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs);
 
 bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, const PayloadType *pt);
-
+/**
+ * Enable payload type
+ * @param linphone core
+ * @param pt payload type to enable, can be retrieve from #linphone_core_find_payload_type
+ * @param TRUE if enabled
+ * @return 0 if succed
+ *
+ */
 int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bool_t enable);
 
-PayloadType* linphone_core_find_payload_type(LinphoneCore* lc, const char* type, int rate) ;
+/**
+ * Wildcard value used by #linphone_core_find_payload_type to ignore rate in search algorithm
+ * @ingroup media_parameters
+ */
+#define LINPHONE_FIND_PAYLOAD_IGNORE_RATE -1
+/**
+ * Wildcard value used by #linphone_core_find_payload_type to ignore channel in search algorithm
+ * @ingroup media_parameters
+ */
+#define LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS -1
+/**
+ * Get payload type from mime type and clock rate
+ * @ingroup media_parameters
+ * This function searches in audio and video codecs for the given payload type name and clockrate.
+ * @param lc #LinphoneCore object
+ * @param type payload mime type (I.E SPEEX, PCMU, VP8)
+ * @param rate can be #LINPHONE_FIND_PAYLOAD_IGNORE_RATE
+ * @param channels  number of channels, can be #LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS
+ * @return Returns NULL if not found.
+ */    
+PayloadType* linphone_core_find_payload_type(LinphoneCore* lc, const char* type, int rate, int channels) ;
 
 int linphone_core_get_payload_type_number(LinphoneCore *lc, const PayloadType *pt);
 
@@ -874,6 +1043,14 @@ const char *linphone_core_get_payload_type_description(LinphoneCore *lc, Payload
 
 bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType *pt);
 
+/**
+ * @ingroup proxy 
+ *Create a proxy config with default value from Linphone core.
+ *@param lc #LinphoneCore object
+ *@return #LinphoneProxyConfig with defualt value set 
+ */
+LinphoneProxyConfig * linphone_core_create_proxy_config(LinphoneCore *lc);
+       
 int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config);
 
 void linphone_core_clear_proxy_config(LinphoneCore *lc);
@@ -900,20 +1077,40 @@ void linphone_core_abort_authentication(LinphoneCore *lc,  LinphoneAuthInfo *inf
 
 void linphone_core_clear_all_auth_info(LinphoneCore *lc);
 
+void linphone_core_enable_audio_adaptive_jittcomp(LinphoneCore *lc, bool_t enable);
+
+bool_t linphone_core_audio_adaptive_jittcomp_enabled(LinphoneCore *lc);
+
 int linphone_core_get_audio_jittcomp(LinphoneCore *lc);
 
 void linphone_core_set_audio_jittcomp(LinphoneCore *lc, int value);
 
+void linphone_core_enable_video_adaptive_jittcomp(LinphoneCore *lc, bool_t enable);
+
+bool_t linphone_core_video_adaptive_jittcomp_enabled(LinphoneCore *lc);
+
+int linphone_core_get_video_jittcomp(LinphoneCore *lc);
+
+void linphone_core_set_video_jittcomp(LinphoneCore *lc, int value);
+
 int linphone_core_get_audio_port(const LinphoneCore *lc);
 
+void linphone_core_get_audio_port_range(const LinphoneCore *lc, int *min_port, int *max_port);
+
 int linphone_core_get_video_port(const LinphoneCore *lc);
 
+void linphone_core_get_video_port_range(const LinphoneCore *lc, int *min_port, int *max_port);
+
 int linphone_core_get_nortp_timeout(const LinphoneCore *lc);
 
 void linphone_core_set_audio_port(LinphoneCore *lc, int port);
 
+void linphone_core_set_audio_port_range(LinphoneCore *lc, int min_port, int max_port);
+
 void linphone_core_set_video_port(LinphoneCore *lc, int port);
 
+void linphone_core_set_video_port_range(LinphoneCore *lc, int min_port, int max_port);
+
 void linphone_core_set_nortp_timeout(LinphoneCore *lc, int port);
 
 void linphone_core_set_use_info_for_dtmf(LinphoneCore *lc, bool_t use_info);
@@ -943,10 +1140,48 @@ void linphone_core_set_inc_timeout(LinphoneCore *lc, int seconds);
 
 int linphone_core_get_inc_timeout(LinphoneCore *lc);
 
+void linphone_core_set_in_call_timeout(LinphoneCore *lc, int seconds);
+
+int linphone_core_get_in_call_timeout(LinphoneCore *lc);
+
+void linphone_core_set_delayed_timeout(LinphoneCore *lc, int seconds);
+
+int linphone_core_get_delayed_timeout(LinphoneCore *lc);
+
 void linphone_core_set_stun_server(LinphoneCore *lc, const char *server);
 
 const char * linphone_core_get_stun_server(const LinphoneCore *lc);
 
+/**
+ * @ingroup network_parameters
+ * Return the availability of uPnP.
+ *
+ * @param lc #LinphoneCore
+ * @return true if uPnP is available otherwise return false. 
+ */
+bool_t linphone_core_upnp_available(const LinphoneCore *lc);
+
+/**
+ * @ingroup network_parameters
+ * Return the internal state of uPnP. 
+ *
+ * @param lc #LinphoneCore
+ * @return an LinphoneUpnpState. 
+ */
+LinphoneUpnpState linphone_core_get_upnp_state(const LinphoneCore *lc);
+
+/**
+ * @ingroup network_parameters
+ * Return the external ip address of router. 
+ * In some cases the uPnP can have an external ip address but not a usable uPnP
+ * (state different of Ok). 
+ *
+ * @param lc #LinphoneCore
+ * @return a null terminated string containing the external ip address. If the
+ * the external ip address is not available return null. 
+ */
+const char * linphone_core_get_upnp_external_ipaddress(const LinphoneCore *lc);
+
 void linphone_core_set_nat_address(LinphoneCore *lc, const char *addr);
 
 const char *linphone_core_get_nat_address(const LinphoneCore *lc);
@@ -971,9 +1206,11 @@ int linphone_core_get_rec_level(LinphoneCore *lc);
 void linphone_core_set_ring_level(LinphoneCore *lc, int level);
 void linphone_core_set_play_level(LinphoneCore *lc, int level);
 
+void linphone_core_set_mic_gain_db(LinphoneCore *lc, float level);
+float linphone_core_get_mic_gain_db(LinphoneCore *lc);
 void linphone_core_set_playback_gain_db(LinphoneCore *lc, float level);
-
 float linphone_core_get_playback_gain_db(LinphoneCore *lc);
+
 void linphone_core_set_rec_level(LinphoneCore *lc, int level);
 const char * linphone_core_get_ringer_device(LinphoneCore *lc);
 const char * linphone_core_get_playback_device(LinphoneCore *lc);
@@ -986,7 +1223,9 @@ void linphone_core_set_sound_source(LinphoneCore *lc, char source);
 void linphone_core_set_ring(LinphoneCore *lc, const char *path);
 const char *linphone_core_get_ring(const LinphoneCore *lc);
 void linphone_core_verify_server_certificates(LinphoneCore *lc, bool_t yesno);
+void linphone_core_verify_server_cn(LinphoneCore *lc, bool_t yesno);
 void linphone_core_set_root_ca(LinphoneCore *lc, const char *path);
+const char *linphone_core_get_root_ca(LinphoneCore *lc);
 void linphone_core_set_ringback(LinphoneCore *lc, const char *path);
 const char * linphone_core_get_ringback(const LinphoneCore *lc);
 
@@ -1011,7 +1250,6 @@ void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted);
 **/
 bool_t linphone_core_is_mic_muted(LinphoneCore *lc);
 
-bool_t linphone_core_is_audio_muted(LinphoneCore *lc);
 bool_t linphone_core_is_rtp_muted(LinphoneCore *lc);
 
 bool_t linphone_core_get_rtp_no_xmit_on_audio_mute(const LinphoneCore *lc);
@@ -1055,8 +1293,9 @@ const char**  linphone_core_get_video_devices(const LinphoneCore *lc);
 int linphone_core_set_video_device(LinphoneCore *lc, const char *id);
 const char *linphone_core_get_video_device(const LinphoneCore *lc);
 
-/* Set static picture to be used when "Static picture" is the video device */
+/* Set and get static picture to be used when "Static picture" is the video device */
 int linphone_core_set_static_picture(LinphoneCore *lc, const char *path);
+const char *linphone_core_get_static_picture(LinphoneCore *lc);
 
 /* Set and get frame rate for static picture */
 int linphone_core_set_static_picture_fps(LinphoneCore *lc, float fps);
@@ -1093,17 +1332,15 @@ void linphone_core_set_mtu(LinphoneCore *lc, int mtu);
 /**
  * @ingroup network_parameters
  * This method is called by the application to notify the linphone core library when network is reachable.
- * Calling this method with true trigger linphone to initiate a registration process for all proxy
- * configuration with parameter register set to enable.
- * This method disable the automatic registration mode. It means you must call this method after each network state changes
- *
+ * Calling this method with true trigger linphone to initiate a registration process for all proxies.
+ * Calling this method disables the automatic network detection mode. It means you must call this method after each network state changes.
  */
 void linphone_core_set_network_reachable(LinphoneCore* lc,bool_t value);
 /**
  * @ingroup network_parameters
- * return network state either as positioned by the application or by linphone
+ * return network state either as positioned by the application or by linphone itself.
  */
-bool_t linphone_core_is_network_reachabled(LinphoneCore* lc);
+bool_t linphone_core_is_network_reachable(LinphoneCore* lc);
 
 /**
  *  @ingroup network_parameters
@@ -1149,6 +1386,8 @@ void linphone_core_set_rtp_transport_factories(LinphoneCore* lc, LinphoneRtpTran
 
 int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *local, rtp_stats_t *remote);
 
+int linphone_core_get_calls_nb(const LinphoneCore *lc);
+
 const MSList *linphone_core_get_calls(LinphoneCore *lc);
 
 LinphoneGlobalState linphone_core_get_global_state(const LinphoneCore *lc);
@@ -1160,8 +1399,14 @@ void linphone_core_refresh_registers(LinphoneCore* lc);
 
 /* Path to the file storing secrets cache */
 void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file);
-
-
+const char *linphone_core_get_zrtp_secrets_file(LinphoneCore *lc);
+/**
+ * Search from the list of current calls if a remote address match uri
+ * @ingroup call_control
+ * @param lc
+ * @param uri which should match call remote uri
+ * @return LinphoneCall or NULL is no match is found
+ */
 const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri);
 
 int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
@@ -1174,8 +1419,21 @@ float linphone_core_get_conference_local_input_volume(LinphoneCore *lc);
 
 int linphone_core_terminate_conference(LinphoneCore *lc);
 int linphone_core_get_conference_size(LinphoneCore *lc);
-
+int linphone_core_start_conference_recording(LinphoneCore *lc, const char *path);
+int linphone_core_stop_conference_recording(LinphoneCore *lc);
+/**
+ * Get the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer
+ * @ingroup initializing
+ * @param lc core
+ * @return max number of simultaneous calls
+ */
 int linphone_core_get_max_calls(LinphoneCore *lc);
+/**
+ * Set the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer
+ * @ingroup initializing
+ * @param lc core
+ * @param max number of simultaneous calls
+ */
 void linphone_core_set_max_calls(LinphoneCore *lc, int max);
 
 bool_t linphone_core_sound_resources_locked(LinphoneCore *lc);
@@ -1205,13 +1463,21 @@ void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams *para
  */
 bool_t linphone_core_tunnel_available(void);
 
-typedef struct LinphoneTunnel LinphoneTunnel;
+typedef struct _LinphoneTunnel LinphoneTunnel;
 /**
 * get tunnel instance if available
 */
 LinphoneTunnel *linphone_core_get_tunnel(LinphoneCore *lc);
 
-void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy);
+void linphone_core_set_sip_dscp(LinphoneCore *lc, int dscp);
+int linphone_core_get_sip_dscp(const LinphoneCore *lc);
+
+void linphone_core_set_audio_dscp(LinphoneCore *lc, int dscp);
+int linphone_core_get_audio_dscp(const LinphoneCore *lc);
+
+void linphone_core_set_video_dscp(LinphoneCore *lc, int dscp);
+int linphone_core_get_video_dscp(const LinphoneCore *lc);
+
 
 #ifdef __cplusplus
 }