linphone_core_update_allocated_audio_bandwidth(lc);
if (call->state==LinphoneCallEnd){
- status=LinphoneCallSuccess;
+ if (call->reason==LinphoneReasonDeclined){
+ status=LinphoneCallDeclined;
+ }
+ else status=LinphoneCallSuccess;
}
linphone_call_log_completed(call->log,call, status);
return call->state;
}
+/**
+ * Returns the reason for a call termination (either error or normal termination)
+**/
+LinphoneReason linphone_call_get_reason(const LinphoneCall *call){
+ return call->reason;
+}
+
/**
* Get the user_pointer in the LinphoneCall
*