[Asterisk-cvs] asterisk/channels chan_zap.c,1.117,1.118
martinp at lists.digium.com
martinp at lists.digium.com
Wed Nov 5 10:22:29 CST 2003
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv31400/channels
Modified Files:
chan_zap.c
Log Message:
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)
Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- chan_zap.c 4 Nov 2003 21:21:49 -0000 1.117
+++ chan_zap.c 5 Nov 2003 16:48:38 -0000 1.118
@@ -1797,8 +1797,14 @@
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)
More information about the svn-commits
mailing list