Commit 9d0963cf authored by François Grisez's avatar François Grisez
Browse files

linphone-daemon: fixes bad 'From' address in 'call-state-changed' events while doing outgoing calls

parent 73ab3fda
......@@ -122,13 +122,18 @@ void *Daemon::iterateThread(void *arg) {
}
EventResponse::EventResponse(Daemon *daemon, LinphoneCall *call, LinphoneCallState state) {
LinphoneCallLog *callLog = linphone_call_get_call_log(call);
LinphoneAddress *fromAddr = linphone_call_log_get_from_address(callLog);
char *fromStr = linphone_address_as_string(fromAddr);
ostringstream ostr;
char *remote = linphone_call_get_remote_address_as_string(call);
ostr << "Event-type: call-state-changed\nEvent: " << linphone_call_state_to_string(state) << "\n";
ostr << "From: " << remote << "\n";
ostr << "Event-type: call-state-changed" << "\n";
ostr << "Event: " << linphone_call_state_to_string(state) << "\n";
ostr << "From: " << fromStr << "\n";
ostr << "Id: " << daemon->updateCallId(call) << "\n";
setBody(ostr.str().c_str());
ms_free(remote);
bctbx_free(fromStr);
}
DtmfResponse::DtmfResponse(Daemon *daemon, LinphoneCall *call, int dtmf) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment