Do the time properly.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16528 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
João Mesquita
2010-01-28 01:12:34 +00:00
parent f859964993
commit 8a3001e611
4 changed files with 16 additions and 2 deletions

View File

@@ -177,6 +177,8 @@ switch_status_t FSHost::processAlegEvent(switch_event_t * event, QString uuid)
switch(event->event_id) {
case SWITCH_EVENT_CHANNEL_ANSWER:
{
QString answeredEpoch = switch_event_get_header_nil(event, "Caller-Channel-Answered-Time");
call.data()->setAnsweredEpoch(answeredEpoch.toLong());
call.data()->setbUUID(switch_event_get_header_nil(event, "Other-Leg-Unique-ID"));
_bleg_uuids.insert(switch_event_get_header_nil(event, "Other-Leg-Unique-ID"), uuid);
call.data()->setState(FSCOMM_CALL_STATE_ANSWERED);
@@ -257,6 +259,8 @@ switch_status_t FSHost::processBlegEvent(switch_event_t * event, QString buuid)
case SWITCH_EVENT_CHANNEL_ANSWER:
{
/* When do we get here? */
QString answeredEpoch = switch_event_get_header_nil(event, "Caller-Channel-Answered-Time");
call.data()->setAnsweredEpoch(answeredEpoch.toULongLong());
emit answered(call);
break;
}