[libpri-commits] mattf: branch mattf/libpri-tbct r453 - /team/mattf/libpri-tbct/pri.c
SVN commits to the libpri project
libpri-commits at lists.digium.com
Fri Aug 31 10:46:38 CDT 2007
Author: mattf
Date: Fri Aug 31 10:46:37 2007
New Revision: 453
URL: http://svn.digium.com/view/libpri?view=rev&rev=453
Log:
Let's make this accurate accross all the switchtypes it is supposed to work on
Modified:
team/mattf/libpri-tbct/pri.c
Modified: team/mattf/libpri-tbct/pri.c
URL: http://svn.digium.com/view/libpri/team/mattf/libpri-tbct/pri.c?view=diff&rev=453&r1=452&r2=453
==============================================================================
--- team/mattf/libpri-tbct/pri.c (original)
+++ team/mattf/libpri-tbct/pri.c Fri Aug 31 10:46:37 2007
@@ -521,24 +521,30 @@
if (!call1 || !call2)
return -1;
- /* Check switchtype compatibility */
- if (call1->pri->switchtype != PRI_SWITCH_LUCENT5E ||
- call2->pri->switchtype != PRI_SWITCH_LUCENT5E)
+ /* Make sure we have compatible switchtypes */
+ if (call1->pri->switchtype != call2->pri->switchtype)
return -1;
/* Check for bearer capability */
if (call1->transcapability != call2->transcapability)
return -1;
- /* Check to see if calls are on the same PRI dchannel
- * Currently only support calls on the same dchannel
- */
+
+ /* Check to see if we're on the same PRI */
if (call1->pri != call2->pri)
return -1;
- if (eect_initiate_transfer(call1->pri, call1, call2))
- return -1;
-
- return 0;
+ switch (call1->pri->switchtype) {
+ case PRI_SWITCH_NI2:
+ case PRI_SWITCH_LUCENT5E:
+ case PRI_SWITCH_ATT4ESS:
+ if (eect_initiate_transfer(call1->pri, call1, call2))
+ return -1;
+ else
+ return 0;
+ break;
+ default:
+ return -1;
+ }
}
int pri_hangup(struct pri *pri, q931_call *call, int cause)
More information about the libpri-commits
mailing list