openr2(6/6): Set hangup cause

Change-Id: I94dc38920e6e77cc73062648f62fdd613d0d1452
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
This commit is contained in:
Leonid Fainshtein 2019-05-12 21:29:40 +03:00 committed by Oron Peled
parent 06515707df
commit 3814faf848
1 changed files with 1 additions and 0 deletions

View File

@ -3878,6 +3878,7 @@ static void dahdi_r2_on_call_disconnect(openr2_chan_t *r2chan, openr2_call_disco
ast_copy_string(cause_code->code, cause_str, datalen + 1 - sizeof(*cause_code));
ast_queue_control_data(p->owner, AST_CONTROL_PVT_CAUSE_CODE, cause_code, datalen);
ast_channel_hangupcause_hash_set(p->owner, cause_code, datalen);
ast_channel_hangupcause_set(p->owner, cause_code->ast_cause);
/* when we have an owner we don't call dahdi_r2_disconnect_call here, that will
be done in dahdi_hangup */