diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index a92609637..f52d713cd 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -473,6 +473,20 @@ int linphone_call_get_duration(const LinphoneCall *call){ return time(NULL)-call->media_start_time; } +/** + * Returns the call object this call is replacing, if any. + * Call replacement can occur during call transfers. + * By default, the core automatically terminates the replaced call and accept the new one. + * This function allows the application to know whether a new incoming call is a one that replaces another one. +**/ +LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call){ + SalOp *op=sal_call_get_replaces(call->op); + if (op){ + return (LinphoneCall*)sal_op_get_user_pointer(op); + } + return NULL; +} + /** * Indicate whether camera input should be sent to remote end. **/ @@ -505,21 +519,21 @@ int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file){ } /** - * + * Returns TRUE if camera pictures are sent to the remote party. **/ bool_t linphone_call_camera_enabled (const LinphoneCall *call){ return call->camera_active; } /** - * + * Enable video stream. **/ void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled){ cp->has_video=enabled; } /** - * + * Returns whether video is enabled. **/ bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp){ return cp->has_video; diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 72bc5e2d0..db2548a84 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -49,6 +49,8 @@ static void toggle_video_preview(LinphoneCore *lc, bool_t val); #define LOCAL_RING "rings/oldphone.wav" /* same for remote ring (ringback)*/ #define REMOTE_RING "ringback.wav" +#define HOLD_MUSIC "rings/toy-mono.wav" + extern SalCallbacks linphone_sal_callbacks; @@ -452,6 +454,8 @@ static void sound_config_read(LinphoneCore *lc) tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING; } linphone_core_set_ringback(lc,tmpbuf); + + linphone_core_set_play_file(lc,lp_config_get_string(lc->config,"sound","hold_music",PACKAGE_SOUND_DIR "/" HOLD_MUSIC)); check_sound_device(lc); lc->sound_conf.latency=0; @@ -3696,7 +3700,7 @@ void sip_config_uninit(LinphoneCore *lc) linphone_proxy_config_write_to_config_file(lc->config,NULL,i); for (i=0;i<20;i++){ - linphone_core_iterate(lc); + sal_iterate(lc->sal); #ifndef WIN32 usleep(100000); #else diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 2170459e5..82709208d 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -245,6 +245,7 @@ void linphone_call_unref(LinphoneCall *call); LinphoneCallLog *linphone_call_get_call_log(const LinphoneCall *call); 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); void linphone_call_enable_camera(LinphoneCall *lc, bool_t enabled); diff --git a/share/Makefile.am b/share/Makefile.am index 6def02724..a96607b71 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -8,7 +8,7 @@ LINPHONE_RINGS=rings/orig.wav \ rings/oldphone-mono-30s.caf \ rings/rock.wav \ rings/bigben.wav \ - rings/toy.wav \ + rings/toy-mono.wav \ rings/sweet.wav \ rings/synth.wav \ rings/tapping.wav diff --git a/share/rings/toy-mono.wav b/share/rings/toy-mono.wav new file mode 100644 index 000000000..a6e0093a5 Binary files /dev/null and b/share/rings/toy-mono.wav differ diff --git a/share/rings/toy.wav b/share/rings/toy.wav deleted file mode 100644 index 7a5198492..000000000 Binary files a/share/rings/toy.wav and /dev/null differ