[asterisk-commits] branch mattf/asterisk-ss7 r37922 -
/team/mattf/asterisk-ss7/channels/chan_zap.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jul 18 16:03:08 MST 2006
Author: mattf
Date: Tue Jul 18 18:03:07 2006
New Revision: 37922
URL: http://svn.digium.com/view/asterisk?rev=37922&view=rev
Log:
More fleshing out chan_zap. Receiving of calls works now, need to make sure call origination works
Modified:
team/mattf/asterisk-ss7/channels/chan_zap.c
Modified: team/mattf/asterisk-ss7/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/channels/chan_zap.c?rev=37922&r1=37921&r2=37922&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/chan_zap.c (original)
+++ team/mattf/asterisk-ss7/channels/chan_zap.c Tue Jul 18 18:03:07 2006
@@ -2040,6 +2040,7 @@
ast_setstate(ast, AST_STATE_UP);
break;
case SIG_PRI:
+ case SIG_SS7:
/* We'll get it in a moment -- but use dialdest to store pre-setup_ack digits */
p->dialdest[0] = '\0';
break;
@@ -2048,6 +2049,31 @@
ast_mutex_unlock(&p->lock);
return -1;
}
+#ifdef HAVE_SS7
+ if (p->ss7) {
+ c = strchr(dest, '/');
+ if (c)
+ c++;
+ else
+ c = dest;
+
+ ss7_grab(p, p->ss7);
+ p->digital = IS_DIGITAL(ast->transfercapability);
+ p->ss7call = isup_new_call(p->ss7->ss7);
+
+ if (!p->ss7call) {
+ ss7_rel(p->ss7);
+ ast_mutex_unlock(&p->lock);
+ ast_log(LOG_ERROR, "Unable to allocate new SS7 call!\n");
+ return -1;
+ }
+
+ isup_init_call(p->ss7call, p->cic, c + p->stripmsd);
+
+ isup_iam(p->ss7->ss7, p->ss7call);
+ ss7_rel(p->ss7);
+ }
+#endif /* HAVE_SS7 */
#ifdef HAVE_PRI
if (p->pri) {
struct pri_sr *sr;
@@ -7562,6 +7588,15 @@
/* Trust PRI */
if (p->pri) {
if (p->resetting || p->call)
+ return 0;
+ else
+ return 1;
+ }
+#endif
+#ifdef HAVE_SS7
+ /* Trust PRI */
+ if (p->ss7) {
+ if (p->ss7call)
return 0;
else
return 1;
More information about the asterisk-commits
mailing list