mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user