All pastes #357646 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-15 21:03 UTC
rendered paste body
Index: channels/chan_zap.c
===================================================================
--- channels/chan_zap.c (revision 54685)
+++ channels/chan_zap.c (working copy)
@@ -2759,7 +2759,14 @@
                        if (p->ss7call) {
                                if (!ss7_grab(p, p->ss7)) {
                                        if (!p->alreadyhungup) {
-                                               isup_rel(p->ss7->ss7, p->ss7call, ast->hangupcause ? ast->hangupcause : -1);
+                                               const char *cause = pbx_builtin_getvar_helper(ast,"SS7_CAUSE");
+                                               int icause = ast->hangupcause ? ast->hangupcause : -1;
+
+                                               if (cause) {
+                                                       if (atoi(cause))
+                                                               icause = atoi(cause);
+                                               }
+                                               isup_rel(p->ss7->ss7, p->ss7call, icause);
                                                ss7_rel(p->ss7);
                                                p->alreadyhungup = 1;
                                        } else