[libpri-commits] moy: branch moy/tap-1.4 r1138 - /team/moy/tap-1.4/
SVN commits to the libpri project
libpri-commits at lists.digium.com
Thu Sep 24 17:07:30 CDT 2009
Author: moy
Date: Thu Sep 24 17:07:26 2009
New Revision: 1138
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1138
Log:
added a couple of new APIs to get layer 1 and trans capabilities on the fly and properly match the call reference
Modified:
team/moy/tap-1.4/libpri.h
team/moy/tap-1.4/pri.c
team/moy/tap-1.4/pri_q931.h
team/moy/tap-1.4/q931.c
Modified: team/moy/tap-1.4/libpri.h
URL: http://svnview.digium.com/svn/libpri/team/moy/tap-1.4/libpri.h?view=diff&rev=1138&r1=1137&r2=1138
==============================================================================
--- team/moy/tap-1.4/libpri.h (original)
+++ team/moy/tap-1.4/libpri.h Thu Sep 24 17:07:26 2009
@@ -827,6 +827,12 @@
/* Retrieve CRV reference for GR-303 calls. CRV must be >0, call mode should be 0 */
int pri_set_crv(struct pri *pri, q931_call *call, int crv, int callmode);
+/* Retrieve call current layer 1 information */
+int pri_get_layer1(struct pri *pri, q931_call *call);
+
+/* Retrieve call current trans capability */
+int pri_get_transcap(struct pri *pri, q931_call *call);
+
/* How long until you need to poll for a new event */
struct timeval *pri_schedule_next(struct pri *pri);
Modified: team/moy/tap-1.4/pri.c
URL: http://svnview.digium.com/svn/libpri/team/moy/tap-1.4/pri.c?view=diff&rev=1138&r1=1137&r2=1138
==============================================================================
--- team/moy/tap-1.4/pri.c (original)
+++ team/moy/tap-1.4/pri.c Thu Sep 24 17:07:26 2009
@@ -1187,6 +1187,16 @@
return q931_call_setcrv(pri, call, crv, callmode);
}
+int pri_get_layer1(struct pri *pri, q931_call *call)
+{
+ return q931_call_getlayer1(pri, call);
+}
+
+int pri_get_transcap(struct pri *pri, q931_call *call)
+{
+ return q931_call_gettranscap(pri, call);
+}
+
void pri_enslave(struct pri *master, struct pri *slave)
{
if (master && slave)
Modified: team/moy/tap-1.4/pri_q931.h
URL: http://svnview.digium.com/svn/libpri/team/moy/tap-1.4/pri_q931.h?view=diff&rev=1138&r1=1137&r2=1138
==============================================================================
--- team/moy/tap-1.4/pri_q931.h (original)
+++ team/moy/tap-1.4/pri_q931.h Thu Sep 24 17:07:26 2009
@@ -463,6 +463,10 @@
extern int q931_call_setcrv(struct pri *pri, q931_call *call, int crv, int callmode);
+extern int q931_call_getlayer1(struct pri *pri, q931_call *call);
+
+extern int q931_call_gettranscap(struct pri *pri, q931_call *call);
+
extern q931_call *q931_new_call(struct pri *pri);
extern int q931_setup(struct pri *pri, q931_call *c, struct pri_sr *req);
Modified: team/moy/tap-1.4/q931.c
URL: http://svnview.digium.com/svn/libpri/team/moy/tap-1.4/q931.c?view=diff&rev=1138&r1=1137&r2=1138
==============================================================================
--- team/moy/tap-1.4/q931.c (original)
+++ team/moy/tap-1.4/q931.c Thu Sep 24 17:07:26 2009
@@ -4328,8 +4328,7 @@
cref = q931_cr(h);
- /* XXX FIXME: when does the call structure will be freed???? when!? XXX */
- c = q931_getcall(ctrl, cref);
+ c = q931_getcall(ctrl, cref & 0x7FFF);
if (!c) {
pri_error(ctrl, "Unable to locate call %d\n", cref);
return -1;
@@ -5323,3 +5322,15 @@
call->cr |= (callmode & 0x7);
return 0;
}
+
+int q931_call_getlayer1(struct pri *ctrl, q931_call *call)
+{
+ return call->userl1;
+}
+
+int q931_call_gettranscap(struct pri *ctrl, q931_call *call)
+{
+ return call->transcapability;
+}
+
+
More information about the libpri-commits
mailing list