Add PRI_CAUSE feature for PRI ... If you set PRI_CAUSE=17 with SetVar and then call Hangup app the PRI will disconnect with this cause (it overrides the cause sent if we get it from incoming call)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Martin Pycko 22 years ago
parent d7df92d71b
commit 019d707dc2

@ -1797,8 +1797,14 @@ static int zt_hangup(struct ast_channel *ast)
pri_hangup(p->pri->pri, p->call, -1);
p->call = NULL;
} else {
char *cause = pbx_builtin_getvar_helper(ast,"PRI_CAUSE");
int icause = ast->hangupcause ? hangup_cause2pri(ast->hangupcause) : -1;
p->alreadyhungup = 1;
pri_hangup(p->pri->pri, p->call, ast->hangupcause ? hangup_cause2pri(ast->hangupcause) : -1);
if (cause) {
if (atoi(cause))
icause = atoi(cause);
}
pri_hangup(p->pri->pri, p->call, icause);
}
#endif
if (res < 0)

Loading…
Cancel
Save