[svn-commits] mattf: trunk r463 - in /trunk: ./ pri.c pri_facility.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Sep 6 10:15:51 CDT 2007
Author: mattf
Date: Thu Sep 6 10:15:50 2007
New Revision: 463
URL: http://svn.digium.com/view/libpri?view=rev&rev=463
Log:
Merged revisions 462 via svnmerge from
https://origsvn.digium.com/svn/libpri/branches/1.4
................
r462 | mattf | 2007-09-06 10:11:29 -0500 (Thu, 06 Sep 2007) | 9 lines
Merged revisions 460 via svnmerge from
https://origsvn.digium.com/svn/libpri/branches/1.2
........
r460 | mattf | 2007-09-06 10:06:42 -0500 (Thu, 06 Sep 2007) | 1 line
TBCT now works. It should work for NI2, 4E, and 5E. This code was tested on NI2.
........
................
Modified:
trunk/ (props changed)
trunk/pri.c
trunk/pri_facility.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.2-merged (original)
+++ branch-1.2-merged Thu Sep 6 10:15:50 2007
@@ -1,1 +1,1 @@
-/branches/1.2:1-332,385,389,415,423,426,445
+/branches/1.2:1-332,385,389,415,423,426,445,460
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Thu Sep 6 10:15:50 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-372,386,390,416,424,427,441,446
+/branches/1.4:1-372,386,390,416,424,427,441,446,462
Modified: trunk/pri.c
URL: http://svn.digium.com/view/libpri/trunk/pri.c?view=diff&rev=463&r1=462&r2=463
==============================================================================
--- trunk/pri.c (original)
+++ trunk/pri.c Thu Sep 6 10:15:50 2007
@@ -540,28 +540,44 @@
if (!call1 || !call2)
return -1;
+ /* 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 (call1->pri->switchtype == PRI_SWITCH_LUCENT5E)
- return eect_initiate_transfer(call1->pri, call1, call2);
-
- if (call1->pri->switchtype == PRI_SWITCH_DMS100)
- return rlt_initiate_transfer(call1->pri, call1, call2);
-
- if (call1->pri->switchtype == PRI_SWITCH_QSIG) {
- call1->bridged_call = call2;
- call2->bridged_call = call1;
- return anfpr_initiate_transfer(call1->pri, call1, call2);
- }
-
- return -1;
+ 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;
+ case PRI_SWITCH_DMS100:
+ if (rlt_initiate_transfer(call1->pri, call1, call2))
+ return -1;
+ else
+ return 0;
+ break;
+ case PRI_SWITCH_QSIG:
+ call1->bridged_call = call2;
+ call2->bridged_call = call1;
+ if (anfpr_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)
Modified: trunk/pri_facility.c
URL: http://svn.digium.com/view/libpri/trunk/pri_facility.c?view=diff&rev=463&r1=462&r2=463
==============================================================================
--- trunk/pri_facility.c (original)
+++ trunk/pri_facility.c Thu Sep 6 10:15:50 2007
@@ -1128,13 +1128,10 @@
/* EECT functions */
int eect_initiate_transfer(struct pri *pri, q931_call *c1, q931_call *c2)
{
- /* Did all the tests to see if we're on the same PRI and
- * are on a compatible switchtype */
- /* TODO */
int i = 0;
int res = 0;
unsigned char buffer[255] = "";
- unsigned short call_reference = c2->cr;
+ short call_reference = c2->cr ^ 0x8000; /* Let's do the trickery to make sure the flag is correct */
struct rose_component *comp = NULL, *compstk[10];
int compsp = 0;
static unsigned char op_tag[] = {
@@ -1147,16 +1144,7 @@
0x08,
};
- buffer[i++] = (ASN1_CONTEXT_SPECIFIC | Q932_PROTOCOL_EXTENSIONS);
- /* Interpretation component */
-
- ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i);
- ASN1_PUSH(compstk, compsp, comp);
- ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
- ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
- ASN1_FIXUP(compstk, compsp, buffer, i);
-
- ASN1_ADD_BYTECOMP(comp, COMP_TYPE_INTERPRETATION, buffer, i, 0);
+ buffer[i++] = (ASN1_CONTEXT_SPECIFIC | Q932_PROTOCOL_ROSE);
ASN1_ADD_SIMPLE(comp, COMP_TYPE_INVOKE, buffer, i);
ASN1_PUSH(compstk, compsp, comp);
More information about the svn-commits
mailing list