[asterisk-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r191218 - /team/jpeeler/asteri...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Apr 29 18:04:40 CDT 2009
Author: jpeeler
Date: Wed Apr 29 18:04:36 2009
New Revision: 191218
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=191218
Log:
Use the analog signalling module code as intended for dahdi_call and dahdi_write. Also, link chan_dahdi against sig_analog instead of including it in chan_dahdi.
Modified:
team/jpeeler/asterisk-sigwork-trunk/channels/Makefile
team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
Modified: team/jpeeler/asterisk-sigwork-trunk/channels/Makefile
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/Makefile?view=diff&rev=191218&r1=191217&r2=191218
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/Makefile (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/Makefile Wed Apr 29 18:04:36 2009
@@ -104,3 +104,5 @@
h323/libchanh323.a: h323/Makefile.ast
$(CMD_PREFIX) $(MAKE) -C h323 libchanh323.a
+
+chan_dahdi.so: chan_dahdi.o sig_analog.o
Modified: team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c?view=diff&rev=191218&r1=191217&r2=191218
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Wed Apr 29 18:04:36 2009
@@ -1962,7 +1962,6 @@
p->subs[da].owner = ast_a;
p->subs[db].owner = ast_b;
- /* jpeeler: check NULL */
wakeup_sub(p, a, NULL);
wakeup_sub(p, b, NULL);
@@ -4000,6 +3999,14 @@
p->outgoing = 1;
set_actual_gain(p->subs[SUB_REAL].dfd, 0, p->rxgain, p->txgain, p->law);
+
+ /* If this is analog signalling we can exit here */
+ if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+ p->callwaitrings = 0;
+ res = analog_call(p->sig_pvt, ast, rdest, timeout);
+ ast_mutex_unlock(&p->lock);
+ return res;
+ }
mysig = p->sig;
if (p->outsigmod > -1)
@@ -7984,6 +7991,12 @@
ast_log(LOG_WARNING, "Cannot handle frames in %d format\n", frame->subclass);
return -1;
}
+ if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+ struct analog_pvt *ap = p->sig_pvt;
+
+ if (ap->dialing)
+ return 0;
+ }
if (p->dialing) {
ast_debug(1, "Dropping frame since I'm still dialing on %s...\n",ast->name);
return 0;
@@ -10390,7 +10403,7 @@
pfds[count].events = POLLPRI;
pfds[count].revents = 0;
/* Message waiting or r2 channels also get watched for reading */
- if (i->cidspill)
+ if (i->cidspill || i->mwisendactive || i->mwimonitor_fsk)
pfds[count].events |= POLLIN;
count++;
}
@@ -18649,7 +18662,6 @@
return 0;
}
-#include "sig_analog.c"
/* This is a workaround so that menuselect displays a proper description
* AST_MODULE_INFO(, , "DAHDI Telephony"
Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c?view=diff&rev=191218&r1=191217&r2=191218
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c Wed Apr 29 18:04:36 2009
@@ -14,12 +14,12 @@
#include "asterisk/utils.h"
#include "asterisk/options.h"
#include "asterisk/pbx.h"
-#include "asterisk/features.h"
#include "asterisk/file.h"
#include "asterisk/callerid.h"
#include "asterisk/say.h"
#include "asterisk/manager.h"
#include "asterisk/astdb.h"
+#include "asterisk/features.h"
#include "sig_analog.h"
@@ -487,7 +487,7 @@
return -1;
}
/* Orphan the channel after releasing the lock */
- ast_channel_unlock(p->subs[SUB_THREEWAY].owner);
+ ast_channel_unlock(p->subs[ANALOG_SUB_THREEWAY].owner);
analog_unalloc_sub(p, ANALOG_SUB_THREEWAY);
} else if (ast_bridged_channel(p->subs[ANALOG_SUB_THREEWAY].owner)) {
ast_queue_control(p->subs[ANALOG_SUB_REAL].owner, AST_CONTROL_UNHOLD);
@@ -504,7 +504,7 @@
}
/* Three-way is now the REAL */
analog_swap_subs(p, ANALOG_SUB_THREEWAY, ANALOG_SUB_REAL);
- ast_channel_unlock(p->subs[SUB_THREEWAY].owner);
+ ast_channel_unlock(p->subs[ANALOG_SUB_THREEWAY].owner);
analog_unalloc_sub(p, ANALOG_SUB_THREEWAY);
/* Tell the caller not to hangup */
return 1;
More information about the asterisk-commits
mailing list