]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Q.931] Save TEI from incoming SETUP message in call struct + make the TEI available...
authorStefan Knoblich <stkn@freeswitch.org>
Sat, 6 Sep 2008 20:28:50 +0000 (20:28 +0000)
committerStefan Knoblich <stkn@freeswitch.org>
Sat, 6 Sep 2008 20:28:50 +0000 (20:28 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@538 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/isdn/Q931.c
libs/freetdm/src/isdn/Q931StateNT.c
libs/freetdm/src/isdn/include/Q931.h

index 9b9b6331bd93b17cd3fa13b686de7c8e83fe5964..b29bcf97dda1bb4a271668dea13110c239d67178 100644 (file)
@@ -368,6 +368,9 @@ L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3INT ind, L3UCHAR tei, L3UCHAR * buf,
                /* Message Type */
                m->MesType = Mes[IOff++];
 
+               /* Store tei */
+               m->Tei = tei;
+
                /* d'oh a little ugly but this saves us from:
                 *      a) doing Q.921 work in the lower levels (extracting the TEI ourselves)
                 *      b) adding a tei parameter to _all_ Proc functions
@@ -382,7 +385,7 @@ L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3INT ind, L3UCHAR tei, L3UCHAR * buf,
                        }
                }
 
-               Q931Log(pTrunk, Q931_LOG_DEBUG, "Received message from Q.921 (ind %d, tei %d, size %d)\nMesType: %d, CRVFlag %d (%s), CRV %d (Dialect: %d)\n", ind, tei, Size,
+               Q931Log(pTrunk, Q931_LOG_DEBUG, "Received message from Q.921 (ind %d, tei %d, size %d)\nMesType: %d, CRVFlag %d (%s), CRV %d (Dialect: %d)\n", ind, m->Tei, Size,
                                                 m->MesType, m->CRVFlag, m->CRVFlag ? "Terminator" : "Originator", m->CRV, pTrunk->Dialect);
 
                RetCode = Q931Umes[pTrunk->Dialect][m->MesType](pTrunk, Mes, (Q931mes_Generic *)pTrunk->L3Buf, IOff, Size - L2HSize);
index 5b8b0860b4eb7f9f7e6a4b351fe860ef594341d8..71f2e6e8369e7edf3a0ab7f2bccacbb6e4ce72ff 100644 (file)
@@ -345,6 +345,9 @@ L3INT Q931ProcSetupNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
                        return ret;
                }
 
+               /* store TEI in call */
+               pTrunk->call[callIndex].Tei = pMes->Tei;
+
                /* Send setup indication to user */
                ret = Q931Tx34(pTrunk, (L3UCHAR*)pMes, pMes->Size);
                if (ret != Q931E_NO_ERROR) {
index 110682d4d3765b05f96a24dc07e59fd62ce8e71b..e05c7e9dcefe87cd5889301948486426fed69c4f 100644 (file)
@@ -559,11 +559,11 @@ typedef struct {
                                provided in case a proprietary variant needs it.
 
 *****************************************************************************/
-typedef struct
-{
+typedef struct {
        L3UINT          Size;           /* Size of message in bytes             */
        L3UCHAR         ProtDisc;       /* Protocol Discriminator               */
        L3UCHAR         MesType;        /* Message type                         */
+       L3UCHAR         Tei;            /* TEI                                  */
        L3UCHAR         CRVFlag;        /* Call reference value flag            */
        L3INT           CRV;            /* Call reference value                 */