Liblinphone 3.9.1中文--Modules--Placing and receiving calls

本文档详细介绍了Linphone库中管理音视频通话的功能,包括拨打电话、接听电话、通话参数设置等。提供了丰富的API用于控制通话状态、媒体方向及质量。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Placing and receiving calls   拨打和接听电话


    #define linphone_call_params_local_conference_mode  linphone_call_parans_get_local_conference_mode


自定义类型

      

typedef enum 
_LinphoneMediaDirection 
LinphoneMediaDirection
typedef struct _LinphoneCallParams  LinphoneCallParams
typedef struct _LinphoneConference  LinphoneConference
typedef struct 
_LinphoneCorferenceParams 
LinphoneConferenceParams
typedef struct _LinphoneCall  LinphoneCall
typedef enum _LinphonePrivacy  LinphonePrivacy
typedef struct _LinphonePlayer  LinphonePlayer
typedef void(*  LinphonePlayerEofCallback )(struct_LinphonePlayer *obj, void *user_data)
typedef enum _LinphoneCallState  LinphoneCallState
typedef enum _LinphoneAudioRoute  LinphoneAudioRoute


枚举类型

enum _LinphoneMediaDirection {

              LinphoneMediaDirectionInvalid = -1,

              LinphoneMediaDirectionInactive,

              LinphoneMediaDirectionSendOnly,

              LinphoneMediaDirectionRecvOnly,

              LinphoneMediaDirectionSendRecv

         }

enum _LinphonePrivacy {

            LinphonePrivacyNone = 0x0,

            LinphonePrivacyUser = 0x1,

            LinphonePrivacyHeader = 0x2,

            LinphonePrivacySession = 0x4,

            LinphonePrivacyId = 0x8,

            LinphonePrivacyCritical = 0x10,

            LinphonePrivacyDefault = 0x8000

       }


enum _LinphoneCallState{

           LinphoneCallIdle,

           LinphoneCallIncomingReceived,

           LinphoneCallOutgoingInit,

           LinphoneCallOutgoingProgress,

           LinphoneCallOutgoingRinging,

           LinphoneCallOutgoingEarlyMedia,

           LinphoneCallConnected,

           LinphoneCallStreamsRunning,

           LinphoneCallPausing,

           LinphoneCallPaused,

           LinphoneCallResuming,

           LinphoneCallRefered,

           LinphoneCallError,

           LinphoneCallEnd,

           LinphoneCallPausedByRemote,

           LinphoneCallUpdatedByRemote,

           LinphoneCallIncomingEarlyMedia,

           LinphoneCallUpdating,

           LinphoneCallReleased,

           LinphoneCallEarlyUpdatedByRemote,

           LinphoneCallEarlyUpdating

  }


enum   _LinphoneAudioRoute{

           LinphoneAudioRouteEarpiece = MSAudioRouteEarpiece,

           LinphoneAudioRouteSpeaker = MSAudioRouteSpeaker

}


函数


void  linphone_call_params_add_custom_header (LinphoneCallParams *cp, const char *header_name, const char *header_value)
LinphoneCallParams *  linphone_call_params_copy (const LinphoneCallParams *cp)
bool_t  linphone_call_params_early_media_sending_enabled (const LinphoneCallParams *cp)
void  linphone_call_params_enable_early_media_sending (LinphoneCallParams *cp, bool_t enabled)
void  linphone_call_params_enable_low_bandwidth (LinphoneCallParams *cp, bool_t enabled)
void  linphone_call_params_enable_audio (LinphoneCallParams *cp, bool_t enabled)
void  linphone_call_params_enable_video (LinphoneCallParams *cp, bool_t enabled)
const char *  linphone_call_params_get_custom_header (const LinphoneCallParams *cp, const char *header_name)
bool_t  linphone_call_params_get_local_conference_mode (const LinphoneCallParams *cp)
LinphoneMediaEncryption  linphone_call_params_get_media_encryption (const LinphoneCallParams *cp)
LinphonePrivacyMask  linphone_call_params_get_privacy (const LinphoneCallParams *cp)
float  linphone_call_params_get_received_framerate (const LinphoneCallParams *cp)
MSVideoSize  linphone_call_params_get_received_video_size (const LinphoneCallParams *cp)
const char *  linphone_call_params_get_record_file (const LinphoneCallParams *cp)
const char *  linphone_call_params_get_rtp_profile (const LinphoneCallParams *cp)
float  linphone_call_params_get_sent_framerate (const LinphoneCallParams *cp)
MSVideoSize  linphone_call_params_get_sent_video_size (const LinphoneCallParams *cp)
const char *  linphone_call_params_get_session_name (const LinphoneCallParams *cp)
const LinphonePayloadType *  linphone_call_params_get_used_audio_codec (const LinphoneCallParams *cp)
const LinphonePayloadType *  linphone_call_params_get_used_video_codec (const LinphoneCallParams *cp)
const LinphonePayloadType *  linphone_call_params_get_used_text_codec (const LinphoneCallParams *cp)
bool_t  linphone_call_params_low_bandwidth_enabled (const LinphoneCallParams *cp)
void  linphone_call_params_set_audio_bandwidth_limit (LinphoneCallParams *cp, int bw)
void  linphone_call_params_set_media_encryption (LinphoneCallParams *cp, LinphoneMediaEncryption enc)
void  linphone_call_params_set_privacy (LinphoneCallParams *params, LinphonePrivacyMask privacy)
void  linphone_call_params_set_record_file (LinphoneCallParams *cp, const char *path)
void  linphone_call_params_set_session_name (LinphoneCallParams *cp, const char *name)
bool_t  linphone_call_params_audio_enabled (const LinphoneCallParams *cp)
bool_t  linphone_call_params_video_enabled (const LinphoneCallParams *cp)
LinphoneMediaDirection  linphone_call_params_get_audio_direction (const LinphoneCallParams *cp)
LinphoneMediaDirection  linphone_call_params_get_video_direction (const LinphoneCallParams *cp)
void  linphone_call_params_set_audio_direction (LinphoneCallParams *cp, LinphoneMediaDirection dir)
void  linphone_call_params_set_video_direction (LinphoneCallParams *cp, LinphoneMediaDirection dir)
void *  linphone_call_params_get_user_data (const LinphoneCallParams *cp)
void  linphone_call_params_set_user_data (LinphoneCallParams *cp, void *ud)
LinphoneCallParams *  linphone_call_params_ref (LinphoneCallParams *cp)
void  linphone_call_params_unref (LinphoneCallParams *cp)
void  linphone_call_params_destroy (LinphoneCallParams *cp)
LinphoneConferenceParams *  linphone_conference_params_new (const LinphoneCore *core)
void  linphone_conference_params_free (LinphoneConferenceParams *params)
LinphoneConferenceParams *  linphone_conference_params_clone (const LinphoneConferenceParams *params)
void  linphone_conference_params_enable_video (LinphoneConferenceParams *params, bool_t enable)
bool_t  linphone_conference_params_video_requested (const LinphoneConferenceParams *params)
int  linphone_conference_remove_participant (LinphoneConference *obj, const LinphoneAddress *uri)
MSList *  linphone_conference_get_participants (const LinphoneConference *obj)
bool_t  linphone_call_get_authentication_token_verified (LinphoneCall *call)
void  linphone_call_set_authentication_token_verified (LinphoneCall *call, bool_t verified)
LinphoneCall *  linphone_call_ref (LinphoneCall *obj)
void  linphone_call_unref (LinphoneCall *obj)
const LinphoneCallParams *  linphone_call_get_current_params (LinphoneCall *call)
const LinphoneCallParams *  linphone_call_get_remote_params (LinphoneCall *call)
const LinphoneAddress *  linphone_call_get_remote_address (const LinphoneCall *call)
char *  linphone_call_get_remote_address_as_string (const LinphoneCall *call)
LinphoneCallState  linphone_call_get_state (const LinphoneCall *call)
LinphoneReason  linphone_call_get_reason (const LinphoneCall *call)
const LinphoneErrorInfo *  linphone_call_get_error_info (const LinphoneCall *call)
void *  linphone_call_get_user_data (const LinphoneCall *call)
void  linphone_call_set_user_data (LinphoneCall *call, void *user_pointer)
LinphoneCallLog *  linphone_call_get_call_log (const LinphoneCall *call)
const char *  linphone_call_get_refer_to (const LinphoneCall *call)
LinphoneCall *  linphone_call_get_transferer_call (const LinphoneCall *call)
LinphoneCall *  linphone_call_get_transfer_target_call (const LinphoneCall *call)
LinphoneCallDir  linphone_call_get_dir (const LinphoneCall *call)
const char *  linphone_call_get_remote_user_agent (LinphoneCall *call)
const char *  linphone_call_get_remote_contact (LinphoneCall *call)
bool_t  linphone_call_has_transfer_pending (const LinphoneCall *call)
int  linphone_call_get_duration (const LinphoneCall *call)
LinphoneCall *  linphone_call_get_replaced_call (LinphoneCall *call)
void  linphone_call_enable_camera (LinphoneCall *call, bool_t enable)
void  linphone_call_send_vfu_request (LinphoneCall *call)
int  linphone_call_take_video_snapshot (LinphoneCall *call, const char *file)
int  linphone_call_take_preview_snapshot (LinphoneCall *call, const char *file)
bool_t  linphone_call_camera_enabled (const LinphoneCall *call)
const char *  linphone_privacy_to_string (LinphonePrivacy privacy)
LinphoneCall *  linphone_core_invite (LinphoneCore *lc, const char *url)
LinphoneCall *  linphone_core_invite_with_params (LinphoneCore *lc, const char *url, const LinphoneCallParams *p)
LinphoneCall *  linphone_core_invite_address (LinphoneCore *lc, const LinphoneAddress *addr)
int  linphone_core_transfer_call (LinphoneCore *lc, LinphoneCall *call, const char *url)
int  linphone_core_transfer_call_to_another (LinphoneCore *lc, LinphoneCall *call, LinphoneCall *dest)
int  linphone_core_accept_early_media_with_params (LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params)
int  linphone_core_accept_early_media (LinphoneCore *lc, LinphoneCall *call)
int  linphone_core_update_call (LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params)
int  linphone_core_defer_call_update (LinphoneCore *lc, LinphoneCall *call)
int  linphone_core_accept_call_update (LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params)
int  linphone_core_accept_call (LinphoneCore *lc, LinphoneCall *call)
int  linphone_core_accept_call_with_params (LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params)
int  linphone_core_terminate_call (LinphoneCore *lc, LinphoneCall *the_call)
int  linphone_core_decline_call (LinphoneCore *lc, LinphoneCall *call, LinphoneReason reason)
int  linphone_core_terminate_all_calls (LinphoneCore *lc)
const MSList *  linphone_core_get_calls (LinphoneCore *lc)
bool_t  linphone_core_in_call (const LinphoneCore *lc)
LinphoneCall *  linphone_core_get_current_call (const LinphoneCore *lc)
int  linphone_core_pause_call (LinphoneCore *lc, LinphoneCall *call)
int  linphone_core_pause_all_calls (LinphoneCore *lc)
int  linphone_core_resume_call (LinphoneCore *lc, LinphoneCall *call)
LinphoneCall *  linphone_core_get_call_by_remote_address (LinphoneCore *lc, const char *remote_address)
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)
int  linphone_core_get_delayed_timeout (LinphoneCore *lc)
void  linphone_core_set_delayed_timeout (LinphoneCore *lc, int seconds)
int  linphone_core_get_calls_nb (const LinphoneCore *lc)
bool_t  linphone_core_can_we_add_call (LinphoneCore *lc)
LinphoneCallParams *  linphone_core_create_call_params (LinphoneCore *lc, LinphoneCall *call)
bool_t  linphone_core_sound_resources_locked (LinphoneCore *lc)
LinphoneCore *  linphone_call_get_core (const LinphoneCall *call)
const LinphoneAddress *  linphone_core_get_current_call_remote_address (LinphoneCore *lc)
int  linphone_call_send_dtmf (LinphoneCall *lc, char dtmf)
int  linphone_call_send_dtmfs (LinphoneCall *call, char *dtmfs)
void  linphone_call_cancel_dtmfs (LinphoneCall *call)
MS2_DEPRECATED bool_t  linphone_call_is_in_conference (const LinphoneCall *call)
LinphoneConference *  linphone_call_get_conference (const LinphoneCall *call)
void  linphone_call_set_audio_route (LinphoneCall *call, LinphoneAudioRoute route)
LinphoneCall *  linphone_core_invite_address_with_params (LinphoneCore *lc, const LinphoneAddress *addr, const LinphoneCallParams *params)
bool_t  linphone_core_is_incoming_invite_pending (LinphoneCore *lc)
int  linphone_core_redirect_call (LinphoneCore *lc, LinphoneCall *call, const char *redirect_uri)
LinphoneCall *  linphone_core_get_call_by_remote_address2 (LinphoneCore *lc, const LinphoneAddress *remote_address)
LinphoneCall *  linphone_core_find_call_from_uri (const LinphoneCore *lc, const char *uri)
LinphoneConference *  linphone_core_create_conference_with_params (LinphoneCore *lc, const LinphoneConferenceParams *params)
int  linphone_core_add_to_conference (LinphoneCore *lc, LinphoneCall *call)
int  linphone_core_add_all_to_conference (LinphoneCore *lc)
int  linphone_core_remove_from_conference (LinphoneCore *lc, LinphoneCall *call)
bool_t  linphone_core_is_in_conference (const LinphoneCore *lc)
int  linphone_core_enter_conference (LinphoneCore *lc)
int  linphone_core_leave_conference (LinphoneCore *lc)
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)
LinphoneConference *  linphone_core_get_conference (LinphoneCore *lc)

 

详细说明

        LinphoneCall对象代表由LinphoneCore管理的传入或传出的通话对象.当来电通过LinphoneCoreVTable::call_state_changed回调通知应用程序时,传出的通话可以由linphone_core_invite()或者linphone_core_invite_address()创建.

                   看基本的通话教程      


宏定义文档

  #define linphone_call_params_local_conference_mode   linphone_call_params_get_local_conference_mode

   已弃用

     用linphone_call_params_get_local_conference_mode()代替


自定义类型文档

    typedef enum _LinphoneAudioRoute LinphoneAudioRoute

    描述音频线路类型的枚举


    typedef struct _LinphoneCall LinphoneCall

    LinphoneCall对象代表一个由LinphoneCore对象发出或者接收的通话.


    typedef struct _LinphoneCallParams LinphoneCallParams

    LinphoneCallParams对象包含了多种调用相关的参数.它可以用来从当前运行的通话中获取到参数或者是动态地修改通话的特征


    typedef enum _LinphoneCallState LinphoneCallState

    LinphoneCallState枚举代表接入通话的不同状态.通过LinphoneCoreVTable::call_state_changed 回调通知应用程序通话状态发生修改

     

           typedef struct _LinphoneConference LinphoneConference

    LinphoneConference类

    

    typedef struct _LinphoneConferenceParams LinphoneConferenceParams

    会议的初始化参数

        

        typedef enum _LinphoneMediaDirection LinphoneMediaDirection

    描述媒体说明的枚举


    typedef struct _LinphonePlayer LinphonePlayer

    播放器界面

  

    typedef void(* LinphonePlayEofCallback)(struct _LinphonePlayer *obj, void *user_data)

    回调通知文件播放完毕

           参数

                                obj   LinphonePlayer对象

                      user_data   当调用linphone_player_open()会提供


           typedefenum _LinphonePrivacy  LinphonePrivacy

      定义隐私策略 应用类似rfc3323描述那样



枚举类型文档

         enum _LinphoneAudioRoute

    描述音频线路类型的枚举


    enum _LinphoneCallState

    LinphoneCallState枚举代表接入通话的不同状态.通过LinphoneCoreVTable::call_state_changed 回调通知应用程序通话状态发生修改

    枚举常量:

          LinphoneCallIdle                            初始化通话状态

          LinphoneCallIncomingReceived                有一个新通话接入

          LinphoneCallOutgoingInit                    开始拨出一个电话

          LinphoneCallOutgoingProgress                一个拨出电话正在处理

          LinphoneCallOutgoingRinging                 拨出电话对应的远端电话正在响铃

          LinphoneCallOutgoingEarlyMedia              拨出电话被提出的接通通知

          LinphoneCallConnected                       连接完成,通话被答复

          LinphoneCallStreamRunning                   媒体流被建立并运行

          LinphoneCallPausing                         在本地正在暂停通话

          LinphoneCallPaused                          通话暂停,远程结束并已经接受暂停

          LinphoneCallResuming                        在本地正在恢复通话

          LinphoneCallRefered                         通话被转移到另一方,一个新的拨出通话立即跟进

          LinphoneCallError                           通话遇到一个错误

          LinphoneCallEnd                             通话正常结束

          LinphoneCallPauseByRemote                   通话被远端暂停

          LinphoneCallUpdateByRemote                  改变对话的参数由远端来请求,例如远端添加一个视频

          LinphoneCallIncomingEarlyMedia              接入电话接通通知

          LinphoneCallUpdating                        一个对话更新已经被我们初始化

          LinphoneCallReleased                        会话对象不再被LinphoneCore内核保留


enum _LinphoneMediaDirection

     指定的媒体流方向(类型)

枚举常量

              LinphoneMediaDirectionInvalid = -1,       无效

              LinphoneMediaDirectionInactive,           没有活跃的媒体或者不支持

              LinphoneMediaDirectionSendOnly,           只发送模式

              LinphoneMediaDirectionRecvOnly,           只接收模式

              LinphoneMediaDirectionSendRecv            发送/接收


enum _LinphonePrivacy

        定义隐私策略  应用类似rfc3323描述那样

          枚举常量

                      LinphonePrivacyNone     隐私服务不执行任何隐私功能

           LinphonePrivacyUser     要求隐私服务提供一个用户级隐私功能,在这种模式下,"from"头被隐藏,通常被替代为   From:“匿名”<sip:anonymous@anonymous.invalid>

           LinphonePrivacyHeader                 要求隐私服务不能任由用户任意修改SIP头(Contact/Via)

           LinphonePrivacySession                请求隐私服务为媒体会话提供隐私保护

           LinphonePrivacyId                     

           LinphonePrivacyCritical               隐私服务必须执行指定的服务或者结束请求

           LinphonePrivacyDefault   特殊关键字使用隐私通过全局定义或者通过代理使用linphone_proxy_config_set_privacy()定义


函数文档         

         bool_t linphone_call_camera_enabled(const LinphoneCall* call)

       如果相机照片被允许发送到远程方,返回TRUE


       void linphone_call_cancel_dtmfs(LinphoneCall* call)

       停止当前的DTMF序列的发送  双音多频 DTMF(Dual Tone Multi Frequency)

       请注意,一些DTMF可能已经被发送,因为调用linphone_call_send_dfmshou再调用这个函数会有延迟.如果通话状态发生任何改变(除了LinphoneCallStreamsRunning),这个函数会被自动调用.

       参数

             call LinphoneCall对象


      void linphone_call_enable_camera(LinphoneCall* call, bool_t enable)

      指示摄像是否发送到远端


      bool_t linphone_call_get_authentication_token_verified(LinphoneCall *call)

      返回是否ZRTP身份令牌被验证.如果没有,用户必须根据ZRTP过程描述那样去验证.一旦完成验证,应用程序必须通过linphone_call_set_authentication_token_verified()通知验证结果.

      参数

           call LinphoneCall对象

      返回

           如果身份令牌被验证,返回Ture.否则返回false


      LinphoneCallLog* linphone_call_get_call_log(const LinphoneCall* call)

      返回关联这个LinphoneCall对象的日志

     

      LinphoneConference* linphone_call_get_conference(const LinphoneCall* call)

      返回与LinphoneCall相关联的LinphoneConference对象

      参数

             call LinphoneCall对象

                返回

                                   一个指向LinphoneConferen对象的指针,如果该LinphoneCall对象不是任意一个会议的成员就返回NULL

      

      LinphoneCore* linphone_call_get_core(const LinphoneCall* call)

      获取创建指定LinphoneCall的LinphoneCore对象

      参数

             [in] call LinphoneCall对象

      返回

              创建指定LinphoneCall的LinphoneCore对象


      const LinphoneCallParams* linphone_call_get_current_params(LinphoneCall* call)

      返回与LinphoneCall对象相关联的当前参数


      LinphoneCallDir linphone_call_get_dir(const LinphoneCall* call)

      返回通话的方向 (呼入或呼出)


      int linphone_call_get_duration(const LinphoneCall* call)

      返回通话的持续时间(单位为秒)


      const LinphoneErrorInfo* linphone_call_get_error_info(const LinphoneCall* call)

      返回关于通话错误或者终止原因的全部细节


      LinphoneReason linphone_call_get_reason(const LinphoneCall* call)

      返回通话终止的原因(是出错还是正常终止)


      const char* linphone_call_get_refer_to(const LinphoneCall* call)

      返回引用的uri(if通话被转移)


      const LinphoneAddress* linphone_call_get_remote_address(const LinphoneCall* call)

      返回与该LinphoneCall对象相关联的远端地址


      char* linphone_call_get_remote_address_as_string(const LinphoneCall* call)

      返回与该LinohoneCall对象相关联的远程地址的字符串形式

      该结果字符串必须通过用户调用ms_free()释放.


      const char* linphone_call_get_remote_contact(LinphoneCall *call)

      返回远端sip联系,以字符串为形式,如果可用的话.


      const LinphoneCallParams linphone_call_get_remote_params(LinphoneCall* call)

      返回远端提出的通话参数.

      这是非常有用的:当接收到一个来电时,可以知道远程端是否支持视频,加密等等


      const char* linphone_call_get_remote_user_agent(LinphoneCall *call)

      返回远端用户代理的描述字符串,如果可用.

    

       LinphoneCall* linphone_call_get_replaced_call(LinphoneCall* call)

      返回正在替换的新通话对象,如果有的话.通话对象替换可以发生在呼叫转移的期间.默认情况下,linphone核心会自动终止被替换掉的通话并接受新的通话对象.这个函数允许应用程序知道替换原来通话的新来电

 

       LinphoneCallState linphone_call_get_state(const LinphoneCall* call)

      获取通话对象当前的状态


      LinphoneCall* linphone_call_get_transfer_target_call(const LinphoneCall* call)

      当这个通话对象获得一个转移请求时,返回作为转移结果被自动创建的新通话对象


      LinphoneCall* linphone_call_get_transferer_call(const LinphoneCall* call)

      如果这个通话对象作为一个呼入转移请求被自动启动,返回被转移的通话对象.在这种情况下,收到转移请求的通话对象被返回

     

       void* linphone_call_get_user_data(const LinphoneCall)

      获取与指定LinphoneCall对象相关联的用户数据指针

      

      bool_t linphone_call_has_transfer_pending(const LinphoneCall* call)

      返回true,如果这个通话对象收到了一个尚未执行的转移.当通话由本地或者远程暂停或者关闭时,待呼叫转移被执行.如果当接收到转移请求时,该通话对象已经被暂停,立即发生转移.


      MS2_DEPRECATED bool_t linphone_call_is_in_conference(const LinphoneCall* call)

      返回TRUE,如果该通话对象是当前会议的成员

      参数

                                  call    LinphoneCall对象

       返回

                TRUE 如果为会议的成员

      已弃用

                用linphone_call_get_conference()代替


      void linphone_call_params_add_custom_header(LinphoneCallParams* cp, const char* header_name, 

          const char* header_valuse)

      添加一个自定义的SIP头在INVITE中

      参数

             [in]cp           LinphoneCallParams对象

             [in]header_name    要添加的头字段名

             [in]header_value    头字段内容

      

     bool_t linphone_call_params_audio_enabled(const LinphoneCallParams* cp)

     判断音频是否可用


     LinphoneCallParams* linphone_call_params_copy(const LinphoneCallParams* cp)

     将现有一个LinphoneCallParams对象复制到一个新的LinphoneCallParams对象

     

             void linphone_call_params_destroy(LinphoneCallParams* cp)

     销毁一个LinphoneCallParams对象

     已弃用

           用linphone_call_params_unref()替代


     bool_t linphone_call_params_early_media_sending_enabled(const LinphoneCallParams)

     判断发送早起媒体(回铃声..) 是否启用


     void linphone_call_enable_audio(LinphoneCallParams* cp, bool_t enabled)

     启用音频流

     参数

           [in]cp  LinphoneCallParams对象

           [in]enabled 一个布尔值表明是否启用音频


    

     void linphone_call_params_enable_early_media_sending(LinphoneCallParams* cp, bool_t enable)

     启用早期媒体发送功能(在拨号期间)

     参数

           [in]cp   LinphoneCallParams对象

           [in]enabled 一个布尔值表明是否启用早期媒体发送


     void linphone_call_params_enable_low_bandwidth(LinphoneCallParams* cp, bool_t enabled)

     表明是否启用低带宽模式.以低带宽模式配置一个通话将导致Linphone核心激活几个设置来确保比特率尽可能降到最低.

通常,ptime(分包时间)将会增加,音频编码器的输出比特率会限定于20kbit/s如果它可以通过编解码器选择来实现,在SDP握手之后.视频会自动禁用

    参数

           [in]cp LinphoneCallParams 对象

           [in]enabled 一个布尔值表明是否激活低带宽模式


     


    void linphone_call_params_enable_video(LinphoneCallParams* cp, bool_t enabled)

    启用视频流

    参数

          [in] cp        LinphoneCallParams 对象

          [in]enable     一个布尔值表明是否启用视频流


    LinphoneMediaDirection linphone_call_params_get_audio_direction(const LinphoneCallParams* cp)

    获取到音频流的方向

     参数

           [in]cp  LinphoneCallParams 对象

     返回

           与LinphoneCallParams对象相对应的音频流方向


   const char* linphone_call_params_get_custom_header(const LinphoneCallParams* cp, const char* header_name)

   获取一个自定义SIP头

   参数   

        [in]cp      LinphoneCallParams 对象

        [in]header_name 想获取到的头

        返回

                         头的内容,如果没有找到相对应的头,为NULL



       bool_t linphone_call_params_get_local_conference_mode(const LinphoneCallParams* cp)

   判断通话对象是否为本地管理的会议的成员

   警告

       如果一个会议服务被用来管理会议,该函数不会返回TRUE,即使会议正在进行

       如果你想测试会议是否进行,你应该测试linphone_core_get_conference()是否返回一个非空指针

   参数

         [in] cp LinphoneCallParams对象

   返回

         一个布尔值表明通话对象是否为本地管理的会议中的一员

      

   

   LinphoneMediaEncryption linphone_call_params_get_media_encryption(const LinphoneCallParams* cp)

   获取通话设置的媒体加密类型

   参数

         [in]cp LinphoneCallParamds对象

   返回

         为通话选择的媒体加密类型


   LinphonePrivacyMask linphone_call_params_get_privacy(const LinphoneCallParams* cp)

   获取通话的隐私请求级别

   参数

         [in]cp  LinphoneCallParams对象

   返回

         用于设置通话的隐私模式


   float linphone_call_params_get_received_framerate(const LinphoneCallParams* cp)

   获取接收到的视频帧率

   参数

          [in]cp LinphoneCallParams对象

   返回 

         实际收到的帧率(帧/秒),如果没有返回0



   MSVideoSize linphone_call_params_get_received_video_size(const LinphoneCallParams)

   获取接收到视频的大小

   参数

           [in]cp LinphoneCallParams  对象

   返回

           接收到视频的大小,如果没有则返回MS_VIDEO_SIZE_UNKNOWN.


       

        const char* linphone_call_params_get_record_file(const LinphoneCallParams* cp)

   获取电话录音的文件路径

   参数

           [in]cp LinphoneCallParams 对象

   返回

           电话录音的路径


  

   const char* linphone_call_params_get_rtp_profile(const LinphoneCallParams* cp)

   获取使用的RTP概要文件

   参数

          [in]cp  LinphoneCallParams对象

   返回

          RTP概要文件


   float linphone_call_params_get_sent_framerate(const LinphoneCallParams* cp)

   获取发送视频的视频帧率

   参数

          [in]cp  LinphoneCallParams 对象

   返回

          实际发送视频的帧率(f/s),如果没有则返回0



   MSVideoSize linphone_call_params_get_sent_video_size(const LinphoneCallParams* cp)

   获取发送的视频的大小

   参数

          [in]cp  LinphoneCallParams 对象

   返回

          发送视频的的大小,如果没有则返回MS_VIDEO_SIZE_UNKNOWN.


   const char* linphone_call_params_get_session_name(const LinphoneCallParams* cp)

   获取媒体会话的会话名称(即为用SDP),SIP消息的子项可以利用linphone_call_params_get_custom_header()获取并且不同

    参数

           [in]cp  LinphoneCallParams对象

    返回

           媒体会话的会话名称      

          

    

   const LinphonePayLoadType* linphone_call_params_get_used_audio_codec(const LinphoneCallParams* cp)

   获取通话中使用的音频编解码器 ,称为LinphonePayloadType对象

    参数

           [in]cp   LinphoneCallParams对象

   返回

           LinphonePayloadType对象对应于在通话中使用的音频编解码器


   

   

      const LinphonePayloadType* linphone_call_params_get_used_text_codec(const LinphoneCallParams* cp)

   获取通话中使用的文本编解码器,被描述为一个LinphonePayloadType结构体

   参数

           [in]cp LinphoneCallParams 对象

   返回

           对应于在通话中使用的文本编解码器的LinphonePayloadType对象

    


   const LinphonePayloadType* linphone_call_params_get_used_video_codec(const LinphoneCallParams* cp)

   获取通话中使用的视频编解码器,被描述为一个LinphonePayloadType结构体

   参数

            [in]cp LinphoneCallParams对象

   返回

            对应于在通话中使用的视频编解码器的LinphonePayloadType对象


    void* linphone_call_params_get_user_data(const LinphoneCallParams* cp)

    获取与通话参数对象对应的用户数据指针

    参数

            [in]cp  LinphoneCallParams   对象

    返回

            与通话参数对象相对应的用户数据指针



    LinphoneMediaDirection linphone_call_params_get_video_direction(const LinphoneCallParams* cp)

    获取视频流的方向

    参数

           [in]cp LinphoneCallParams  对象

    返回

           与通话参数对象相对应的视频流方向



    bool_t linphone_call_params_low_bandwidth_enabled(const LinphoneCallParams* cp)

    判断是否通话已经被配置为低带宽模式.这种模式可以因为一个stun服务器被自动发现,当配置文件中[net]项activate_edge_workarounds=1 .应用程序应以可靠的方式去了解网络的容量不是activate_edge_workarounds = 1 而是手动配置低带宽模式通过linphone_call_params_enable_low_bandwidth(). 当启用后,这个参数可能将一个视频通话请求转换为只有音频模式的通话.

    参数

           [in]cp LinphoneCallParams  对象

    返回

           一个布尔值表明是低带宽模式是否被设置/检测


 

   LinphoneCallParams* linphone_call_params_ref(LinphoneCallParams* cp)

   获取通话参数对象的引用(地址)

   参数

           [in]cp LinphoneCallParams对象

   返回

           同样的LinphoneCallParams对象



    void linphone_call_params_set_audio_bandwidth_limit(LinphoneCallParams* cp, int bw)

    通过设置音频流的带宽限制来优化通话的带宽设置.因此,比特率不兼容这个限制的编解码器不能使用

    参数

           [in] cp   LinphoneCallParams 对象

           [in] bw   音频带宽限制(kbit/s)


  

    void linphone_call_params_set_audio_direction(LinphoneCallParams* cp, LinphoneMediaDirection dir)

    设置音频流的方向

    参数

           [in]cp LinphoneCallParams对象

           [in]与该LinphoneCallParams对象相对应的音频流方向



    void linphone_call_params_set_media_encryption(LinphoneCallParams* cp, LinphoneMediaEncryption enc)

    为通话设置请求的媒体加密

    参数

            [in]cp LinphoneCallParams对象

            [in]enc 设置的媒体加密类型


 

    void linphone_call_params_set_privacy(LinphoneCallParams* params, LinphonePrivacyMask privacy)

    为通话设置隐私请求级别

    参数

           [in]cp          LinphoneCallParams对象

           [in]privacy     要设置的隐私模式



    void linphone_call_params_set_record_file(LinphoneCallParams* cp, const char* path)

    电话录音.这个函数必须在通话参数被分配给通话之前使用.电话录音可在调用linphone_call_start_recording()建立,也可以通过调用linphone_call_pause_recording()暂停录音.

           参数

                           [in]cp     LinphoneCallParams 对象

          [in]path   写入音频流和视频流的文件路径和文件名.文件名必须为.mkv或.wav后缀.如果是MKV文件,视频流只写.

                          


    void linphone_call_params_set_session_name(LinphoneCallParans* cp, const char* name)

    设置媒体会话的会话名称(即为SDP).SIP消息的项(个性化的,差异化的)可以通过调用linphone_call_params_set_custom_header()来设置.

   参数

          [in]cp     LinphoneCallParams 对象

          [in]name   被使用的会话名称



    void linphone_call_params_set_user_data(LinphoneCallParams* cp, void* ud)

    分配用户数据给通话参数对象

    参数

         [in]cp LinphoneCallParams 对象

         [in]ud 要设置的用户数据指针



    void linphone_call_params_set_video_direction(LinphoneCallParams* cp, LinphoneMediaDirection dir)

    设置视频流的方向

    参数

         [in]cp  LinphoneCallParams对象

         [in]dir  视频流的方向


  


    void linphone_call_params_unref(LinphoneCallParams* cp)

    释放一个LinphoneCallParams对象引用


    bool_t linphone_call_params_video_enabled(const LinphoneCallParams* cp)

    判断是否启用视频

    参数

         [in]cp   LinphoneCallParams对象

    返回

         一个布尔值表明是否视频可用



    LinphoneCall *linphone_call_ref(LinphoneCall* call)

    获取一个LinphoneCall对象的引用.应用程序(希望保留这个指向这个LinphoneCall对象的指针)必须调用这个函数去确认该指针仍然有效.一旦应用程序不再需要这个指针,它必须调用linphone_call_unref().

    参数

          [in]call  LinphoneCall对象

    返回

           一样的LinphoneCall对象



    int linphone_call_send_dtmf(LinphoneCall* lc, char dtmf)

    发送指定的dtmf

    该dtmf被自动拨打给用户

            参数

                           call LinphoneCall对象

          dtmfs dtmf序列例如‘123#123123’

    返回

          如果已经有一个DTMF序列返回 -2,如果没有通话没有准备好返回 -1,其他返回0


   void linphone_call_send_vfu_request(LinphoneCall* call)

   请求远端发送一个视频快速更新



   void linphone_call_set_audio_route(LinphoneCall* call, LinphoneAudioRoute route)

   改变回放输出设备(目前仅用于黑莓)

   参数

        call   LinphoneCall对象

        route  需要的音频线路(耳机, 扬声器,..)


   void linphone_call_set_authentication_token_verified(LinphoneCall* call, bool_t verified)

   由用户设置的ZRTO短代码验证结果.如果远端也一样设置,它将更新ZRTP缓存以便用户验证不再需要两个用户

   参数

        call  LinphoneCall对象

        verified ZRTP SAS是否被验证


  

  void linphone_call_set_user_data(LinphoneCall* call, void* user_pointer)

  设置与LinphoneCall对象相关联的用户指针

  该用户数据指针是一个不透明的指针,其可以被检索在任何时候

  分配用户指针给LinphoneCall对象

      参数

                       [in]call  LinphoneCall对象

        [in]ud   与LinphoneCall对象相关联的用户指针



  int linphone_call_take_preview_snapshot(LinphoneCall* call, const char* file)

  预览视频截图

  参数 

        call  一个LinphoneCall对象

        file  保存截图的路径

  返回

        如果成功则返回0,否则返回-1(通常为不支持jpeg格式) 


  

  int linphone_call_take_video_snapshot(LinphoneCall* call, const char* file)

  截取当前视频的图像并保存为.jpeg文件.注意截图是异步的,应用程序不应该认为文件手机在函数返回是创建的

  参数

        call  一个LinphoneCall对象

        file  保存截图的路径

  返回

        如果成功则返回0,否则返回-1(通常为不支持jpeg格式) 



   void linphone_call_unref(LinphoneCall* call)

   释放LinphoneCall对象的引用

   参数

      [in] call LinphoneCall对象



   MSList* linphone_conference_get_participants(const LinphoneConference *obj)

   获取所有会议参与者的URI,返回的MSList包含所有参与者的URI.该链表用完之后必须被释放并且每一个URI必须调用linphone_address_unref()来释放

   参数

          obj 一个LinphoneConference对象

   返回

          LinphoneAddress对象链表



   LinphoneConferenceParams* linphone_conference_params_clone(const LinphoneConferenceParams* params)

   克隆一个LinphoneConferenceParams对象

   参数

          params 被克隆的LinphoneConferenceParams对象

   返回

          一个被分配与params相同参数的LinphoneConferenceParams对象



   void linphone_conference_params_enable_video(LinphoneConferenceParams* params, bool_t enable)

   会议开始时启用视频

   参数

          params LinphoneConferenceParams对象

          enable 如果为true,在会议期间会启用视频


 

   void linphone_conference_params_free(LinphoneConferenceParams* params)

   释放一个LinphoneConferenceParams对象

   参数

           params 要释放的LinphoneConferenceParams对象



   LinphoneConferenceParams* linphone_conference_params_new(const LinphoneCore* core)

   创建一个附带默认参数设置的LinphoneConfrenceParams对象

   参数

           core 用来找到默认设置的LinphoneCore对象.可以为NULL.

   返回

           一个新分配的LinphoneConferenceParams对象



   bool_t linphone_conference_params_video_requested(const LinphoneConferenceParams *params )

   检查是否视频将会在会议开始时启用

   参数    

           params    LinphoneConferenceParams对象

   返回

           如果为True,视频会在会议开始时被启用



   int linphone_conference_remove_participant(LinphoneConference* obj, const LinphoneAddress* uri)

   从会议中移除一个成员

   参数

            obj 一个LinphoneConference对象

            uri  要被移除的成员的SIP URI

   警告

            该SIP URI必须是由linphone_conference_get_participants()放回的URI中的一个

   返回

            如果成功返回0,如果失败返回-1



   int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call)

    接受一个呼入通话

    基本上,应用程序收到来电通知是通过LinphoneCoreVTable结构体的call_state_changed 回调函数,它将收到一个与LinphoneCall对象相关的LinphoneCallIncoming事件.应用程序可以通过这个方法稍后接电话.

    参数

           lc  LinphoneCore对象

           call 代表被答复的LinphoneCall对象


    int linphone_core_accept_call_update(LinphoneCore* lc, LinphoneCall* call, const LinphoneCallParams* params)

    接受由另一端发起的通话修改

    该通话可能在回应LinphoneCallUpdatedByRemote状态通知.当这样的通知到达时,应用程序可以调用linphone_core_defer_update_call()以便有时间提示用户.linphone_call_get_remote_params()可以用来获取远端的通话参数,例如是否请求视频流.

    当用户接受或拒绝更改时,linphone_core_accept_call_update()才能答复对方.如果参数是NULL,那么相同的通话参数(被建立在更新请求前的)会继续使用(没有变化).如果参数不为NULL,那么 更新会被接受根据传递的参数.典型的例子是当一个用户接受开启视频,那么参数应该表明视频流应该被使用(参见linphone_call_params_enable_video()).

参数 

    lc   LinphoneCore对象

    call LinphoneCall对象

    params  描述接受通话参数的LinphoneCallParams对象

返回

    如果成功返回 0, 其他返回-1(actually when this function call is performed outside otLinphoneCallUpdatedByRemote state

          

    

      int linphone_core_accept_call_with_params(LinphoneCore* lc, LinphoneCall* call, const LinphoneCallParams* params)

   接受一个带参数的呼入电话

   基本上,LinphoneCoreVTable结构体中的call_state_changed回调会通知应用程序有呼入电话,应用程序会收到一个LinphoneCallIncoming事件(与LinphoneCall 对象相关的).应用程序可以通过这个函数稍后片刻再接电话.

   参数

          lc            LinphoneCore对象

          call          LinphoneCall对象代表要被答复的通话对象

          params        特定的参数,例如是否视频被接受.如果为NULL则为默认参数


   

   int linphone_core_accept_early_media(LinphoneCore* lc, LinphoneCall* call)

   接受来电的早期媒体会话(回铃声).这和调用带NULL的LinphoneCallParams参数的linphone_core_accept_early_media_with_params()一样

   另参见

         linphone_core_accept_early_media_with_params()

   参数

         lc   LinphoneCore对象

         call 来电

   返回

         如果成功就返回0,否则返回-1



   int linphone_core_accept_early_media_with_params(LinphoneCore* lc, LinphoneCall* call, const LinphoneCallParams* params)

   当收到一个来电时,会收到一个媒体会话作为早期媒体.这意味着,如果远端支持早期媒体的话,通话还没被接通但可以建立音频和视频流.但是,和接通电话后不一样的是,在来电铃声响的期间,麦克风和摄像头的输入不会发送.尽管接受的音频和视频播放正常.通话可以调用linphone_core_accept_call()或者linphone_core_accept_call_with_params()来完全接听来电.

        参数

                    lc     LinphoneCore对象

        call    LinphoneCall对象

        params  LinphoeCallParams对象,可以为NULL

  返回

       如果成功返回0,否则返回-1


   

   int linphone_core_add_all_to_conference(LinphoneCore* lc)

   将当前所有通话添加到会议中.如果没有运行会议,创建一个新的内部会议上下文并且当前所有的通话都加入到会议中

   参数

             lc LinphoneCore

   返回

             如果成功返回0,如果失败返回负数



   int linphone_core_add_to_conference(LinphoneCore* lc, LinphoneCall* call)

   添加一个成员到会议中.如果没有正在运行的会议,创建一个新的内部会议上下文并将通话成员加入

    参数

             lc   LinphoneCore

           call  要加入会议的通话对象

   返回

           如果成功返回0,如果失败返回负数



  bool_t linphone_core_can_we_add_call(LinphoneCore* lc)

  判断我们是否超过同步通话的的数量

  


  LinphoneCallParams* linphone_core_create_call_params(LinphoneCore* lc, LinphoneCall* call)

  创建一个LinphoneCallParams对象适用于linphone_core_invite_with_params(),

  linphone_core_accept_call_with_params(),

  linphone_core_accept_early_media_with_params(),

  linphone_core_accept_call_update().根据当前LinphoneCore配置和当前LinphoneCall的状态来初始化LinphoneCallParams对象

  参数

          lc   LinphoneCore对象

         call  被建立参数的LinphoneCall对象,或者为NULL(如果该参数对象被用于一个呼出通话)

  

  返回

         一个新的LinphoneCallParams对象



  LinphoneConference* linphone_core_create_conference_with_params(LinphoneCore* lc, const LinphoneConferenceParams* params)

  创建一个会议

  参数

           lc   LinphoneCore实例,创建的会议对象将在其之内

        params  会议的参数.参见LinphoneConferenceParams


  返回  

        一个指向新创建的会议的指针.该对象会由Linphone核心调用linphone_core_terminate_conference()自动释放.

    

 

    int linphone_core_decline_call(LinphoneCore* lc, LinphoneCall* call, LinphoneReason reason)

    拒绝一个等待中的来电,并附带理由

    参数

            lc  LinphoneCore对象

          call  LinphoneCall对象(必须在IncomingReceived状态下)

        reason  拒绝接听的理由:LinphoneReasonDeclined或LinphoneReasonBusy

   

    int linphone_core_defer_call_update(LinphoneCore* lc, LinphoneCall* call)

    当收到一个LinphoneCallUpdatedByRemote状态通知,防止LinphoneCore执行自动答复

    当收到一个LinphoneCallUpdatedByRemote状态通知(也即为一个呼入的reINVITE),LinphoneCore的默认行为是由配置中“sip”节中的“defer_update_default”选项定义的.如果这个选项是0(默认),那么LinphoneCore自动答复reINIVTE,不改变call的参数.然而当例如远程更新通话时提出视频通话,上述可以用于在回答之前提示用户.这可以在通话状态变化通知中调用linphone_core_defer_call_update()来完成,禁用自动回答(只准许音频但拒绝视频).然后,当响应提示对话框时,就可以调用linphone_core_accept_call_update()来回答reINVITE,与在LinphoneCallParams的提要中,视频最终启用.

    当收到一个没有SDP的INVITE,LinphoneCallUpdatedByRemote通知也可以到达.在这种情况下,在200Ok中产生一个不变的通知,当ACK包含SDP收到的答复,LinphoneCallUpdatedByRemote被触发通知在媒体会话方面应用程序可能发生的变化.然而在这种情况下,推迟更新是没有意义的,因为我们值生成一个offer.

    返回

          成功返回0,  如果linphone_core_defer_call_update在一个外部有效的LinphoneCallUpdateByRemote通知被调用,返回-1

    

     

    int linphone_core_enter_conference(LinphoneCore* lc)

    将一个本地成员加入到运行的会议中

    参数

            lc   LinphoneCore对象

    返回

            如果成功返回0,如果失败返回负数



    LinphoneCall* linphone_core_find_call_from_uri(const LinphoneCore* lc, const char*  uri)

    从当前电话列表中搜索和远端地址URI匹配的通话对象

    参数

           lc   LinphoneCore 对象

           uri  

    返回

           匹配的LinphoneCall对象,没找到就为NULL

 


    LinphoneCall* linphone_core_get_call_by_remote_address(LinphoneCore* lc, const char* remote_address)

    获取指定remote_address的通话对象

    参数

          lc       LinphoneCore对象

          remote_address

    返回

         找到的LinphoneCall对象



    LinphoneCall* linphone_core_get_call_by_remote_address2(LinphoneCore* lc, const LinphoneAddress* remote_address)

    获取指定remote_address的通话对象

    参数

          lc       LinphoneCore对象

          remote_address

    返回

         找到的LinphoneCall对象


    const MSList* linphone_core_get_calls(LinphoneCore* lc)

    返回当前通话的列表

    参数

          [in]lc  LinphoneCore对象

    返回

          LinphoneCall对象的列表

    注意,这个链表是只读的,并可能由LinphoneCore在一个函数调用linphone_core_iterate()后发生改变.类似地,在链表中LinphoneCall对象可能在没有被通知下被销毁.为在你的程序中保留LinphoneCall对象的引用,你必须要用liphone_call_ref().



    int linphone_core_get_calls_nb(const LinphoneCore* lc)

    获取通话的数量

    

    

    LinphoneConference* linphone_core_get_conference(LinphoneCore* lc)

    获取指向内部会议对象的指针

    参数

            lc  LinphoneCore对象

    返回

            一个指向LinphoneCore对象的指针,如果没有运行的会议则返回NULL


 

    float linphone_core_get_conference_local_input_volume(LinphoneCore* lc)

    获取本地参与者的设置输入量

    参数

          lc    LinphoneCore对象

    返回

          在[0.0,1.0]之间的值



    int linphone_core_get_conference_size(LinphoneCore* lc)

    获取运行会议的参与者的数量.本地参与者只有它在会议中才被包含在这个数量中

    参数

         lc   LinphoneCore对象

    返回

         会议参与者的数量



    LinphoneCall* linphone_core_get_current_call(const LinphoneCore* lc)

    返回当前在线通话的LinphoneCall指针



    const LinphoneAddress* linphone_core_get_current_call_remote_address(LinphoneCore* lc)

    获取当前通话中远端的地址

    参数

            [in]lc LinphoneCore对象

    返回

             当前通话中的远端地址,如果没有当前通话返回NULL.



    int linphone_core_get_delayed_timeout(LinphoneCore* lc)

    返回延迟超时

    详细参见 linphone_core_set_delayed_timeout()


    int linphone_core_get_in_call_timeout(LinphoneCore* lc)

    返回通话超时

    详细参见 linphone_core_set_in_call_timeout()


    int linphone_core_get_inc_timeout(LinphoneCore* lc)

    返回来电超时

    详细参见 linphone_core_set_inc_timeout()


    bool_t linphone_core_in_call(const LinphoneCore* lc)

    如果有正在通话的通话对象返回TRUE


    LinphoneCall* linphone_core_invite(LinphoneCore* lc, const char* url)

    发起一个拨出呼叫

    参数

           lc     LinphoneCore对象

           url    要拨打的目的地(sip地址或者电话号码)

       应用程序没有引用指向返回LinphoneCall对象.使用linphone_call_ref()安全地保持LinphoneCall指针在你的应用程序内有效性

    返回

         LinphoneCall对象,如果失败返回NULL



    LinphoneCall* linphone_core_invite_address(LinphoneCore* lc, const LinphoneAddress* addr)

    发起一个拨出呼叫,指定LinphoneAddress

    参数

          lc   LinphoneCore对象

         addr  呼叫的目的地(sip地址)

        LinphoneAddress对象可以由linphone_address_new()直接构造或者有linphone_core_interpret_url()创建.

    应用程序没有指向返回的LinphoneCall对象的引用.使用linphone_call_ref()来安全地保持LinphoneCall指针在你的应用程序中有效

    返回

          LinphoneCall对象,如果失败就返回NULL.



    LinphoneCall* linphone_core_invite_address_with_params(LinphoneCore* lc, const LinphoneAddress* addr, const LinphoneCallParams* params)

    发起一个拨出呼叫,附带指定LinphoneAddress和LinphoneCallParams

    参数

          lc  LinphoneCore对象

         addr 呼叫的目的地(sip地址)

         params 呼叫参数

        LinphoneAddress对象可以由linphone_address_new()直接构造或者有linphone_core_interpret_url()创建.

    应用程序没有指向返回的LinphoneCall对象的引用.使用linphone_call_ref()来安全地保持LinphoneCall指针在你的应用程序中有效

    返回

          LinphoneCall对象,如果失败就返回NULL.



    LinphoneCall* linphone_core_invite_with_params(LinphoneCore* lc, const char* url, const LinphoneCallParams* p)

    发起一个拨出呼叫根据提供的通话参数

    参数

          lc     LinphoneCore对象

          url    呼叫的目的地(sip地址或者手机号码)

          p      通话参数

         应用程序没有引用指向返回LinphoneCall对象.使用linphone_call_ref()安全地保持LinphoneCall指针在你的应用程序内有效性

    返回

         LinphoneCall对象,如果失败返回NULL



    bool_t linphone_core_is_in_conference(const LinphoneCore* lc)

    判断是否本地参与者为会议的成员

    警告

       在会议使用一个会议服务 (focus)的情况下,这个函数自动失效.如果使用这种会议,你应该使用linphone_conference_remove_participant(). 

    参数

              lc LinphoneCore对象

    返回

             如果本地参与者在会议中返回TRUE,否则返回FALSE.



    bool_t linphone_core_is_incoming_invite_pending(LinphoneCore* lc)

    判断是否有呼入INVITE在等待

    参数

           [in] lc LinphoneCore对象

    返回


    

    int linphone_core_leave_conference(LinphoneCore* lc)

    让本地参与者离开运行的会议

    参数

          lc LinphoneCore对象

    返回

          如果成功返回0,如果失败返回负数

 

   

    int linphone_core_pause_all_calls(LinphoneCore* lc)

    暂停所有的当前正在运行的通话


    int linphone_core_pause_call(LinphoneCore* lc, LinphoneCall* call)

    暂停通话,如果用linphone_core_set_play_flie()设置了一个音乐文件.这个文件会在暂停的时候播放到远程用户


    int linphone_core_redirect_call(LinphoneCore* lc, LinphoneCall* call, const char* redirect_uri)

    将指定call重定向到给定的重定向URI

    参数

          [in]lc        LinphoneCore对象

          [in]call      要重定向的LinphoneCall对象

          [in]redirect_uri 重定向的URI

    返回

          如果成功返回0,如果出错返回-1



    int linphone_core_remove_from_conference(LinphoneCore* lc, LinphoneCall* call)

    从会议中移除一个通话对象

    参数

              lc  LinphoneCore对象

              call  已经加入到会议中的LinphoneCall对象

    在移除远程参与者(属于提供的通话对象)后,call变成一个处于暂停状态的通话对象.一个单个的远程参与者和会议的本地用户被置之不理,然后这个会议被自动转化为一个StreamRunning状态的简单通话.这个会议的资源自动销毁.

    换句话,除非linphone_core_leave_conference()显式地调用,否则最近的会议的远程参与者被自动变为一个运行状态的简单通话

    返回

     如果成功返回0,否则返回-1

    


    int linphone_core_resume_call(LinphoneCore * lc, LinphoneCall* call)

    恢复通话



    void linphone_core_set_delayed_timeout(LinphoneCore* lc, int seconds)

     设置延迟超时(s)

     在此超时之后后,一个延迟的通话(内部的通话初始化或决策)被恢复


     void linphone_core_set_in_call_timeout(LinphoneCore* lc, int seconds)

    设置通话超时(s)

    在此超时之后,通话自动挂起.


   

          void linphone_core_set_inc_timeout(LinphoneCore* lc, int seconds)

    设置呼入电话的超时(s)

    如果一个呼入电话在这超时时间内未被答复,它自动挂断电话



    bool_t linohone_core_sound_resources_locked(LinphoneCore* lc)

    检查是否一个通话将需要声音资源在不久的将来(通常为一个等待响应的呼出通话).在liblinphone中,不可能有两个相互独立的通话同时使用音响设备或相机.为了防止这种情况,应用程序可以调用linphone_core_sound_resources_locked()去获取是否它是否有允许的时间去开始一个新的呼出通话.当该函数返回TRUE,应用程序不应该允许用户开启呼出功能

    参数

         lc  LinphoneCore对象



    int linphone_core_start_conference_recording(LinphoneCore* lc, const char* path)

    开始记录运行的会议

    参数

         lc LinphoneCore对象

         path 记录保存的文件路径

    返回

         如果成功返回0,否则返回负数


    int linphone_core_stop_conference_recording(LinphoneCore* lc)

    停止记录运行的会议

    参数

                        lc LinphoneCore 对象

    返回

         如果成功返回0,否则返回负数



    int linphone_core_terminate_all_calls(LinphoneCore* lc)

    终止所有电话

    参数

          lc LinphoneCore对象

    返回

         如果成功返回0,否则返回负数


         

         int  linphone_core_terminate_call(LinphoneCore* lc, LinphoneCall* the_call)

    终止一个通话

    参数

          lc   LinphoneCore对象  

         the_call 被终止的LinphoneCall对象



    int linphone_core_terminate_conference(LinphoneCore* lc)

    终止正在进行的会议.如果是一个当地的会议,所有在会议中的通话会变回单独的通话并且被设置为LinphoneCallPaused状态下.如果是它是一个包含集中式服务器的会议,所有在会议中的通话会被终止.

    参数

          lc LinphoneCore

     返回

          如果成功返回0,否则返回负数



    int linphone_core_transfer_call(LinphoneCore* lc, LinphoneCall* call, const char* url)

    执行一个简单的电话转移到指定的目的地

    远程端点被期望发起一个新的通话到指定的目的地.当前的通话保持活动,因此可以稍后暂停或者终止.

    可以跟踪转移的进度,条件是被调用者发送相关的通知.在这种情况下,LinphoneCoreVTable中的transfer_state_changed回调函数被调用来通知新电话另一方的状态.该通知状态有 LinphoneCallOutgoingInit,LinphoneCallOutgoingProgress,LinphoneCallOutgoingRinging以及LinphoneCallConnected.


   

 

    int linphone_core_transfer_call_to_another(LinphoneCore* lc, LinphoneCall* call, LinphoneCall* dest)

    转移一个通话到另一个正在运行的通话的目的地.这用于“attended transfer”情景

    参数

           lc    LinphoneCore对象

          call   你想转移的一个正在通话的电话

                          dest    一个正在通话的电话(其远程用户会接受该转移)

    

       转移电话应该暂停,以便它能够马上接受转移.目的通话是一个预先建立来介绍转移者(转移目的地)的通话对象.这个函数会发送一个转移请求给转移者.转移的网络电话然后将自动呼叫转移的目的地。转移的接受者将自动关闭和我们的通话(即为“dest” call).

        可以跟踪转移的进度,条件是被调用者发送相关的通知.在这种情况下,LinphoneCoreVTable中的transfer_state_changed回调函数被调用来通知新电话另一方的状态.该通知状态有 LinphoneCallOutgoingInit,LinphoneCallOutgoingProgress,LinphoneCallOutgoingRinging以及LinphoneCallConnected.    



         int linphone_core_update_call(LinphoneCore* lc, LinphoneCall* call, const LinphoneCallParams* params)

    根据提供的通话参数或由LinphoneCore更改的参数,更新一个正在通话的电话

    在这个版本中,这被限于以下用例:

        设置或者关闭视频流,根据LinphoneCallParams的视频参数(参见linphone_call_params_enable_video()

        在通话之后,改变传输的视频的大小.

    如果没有更改请求由LinphoneCallParas参数,那么这个参数可以被忽略,设置为NULL.

    参数

            lc  LinphoneCore对象

           call  需要被更新的LinphoneCall对象

           params 被用来更新的新的参数对象(可以为NULL)

   返回

        如果成功返回0,否则返回-1.



    const  char* linphone_privacy_to_string(LinphonePrivacy privacy)

    返回LinphonePrivacy枚举的字符形式



    


  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值