diff options
-rwxr-xr-x | zaptel.c | 5 | ||||
-rwxr-xr-x | zaptel.h | 3 | ||||
-rwxr-xr-x | zconfig.h | 7 |
3 files changed, 15 insertions, 0 deletions
@@ -5139,6 +5139,11 @@ static void __zt_hooksig_pvt(struct zt_chan *chan, zt_rxsig_t rxsig) if ((chan->flags & ZT_FLAG_SIGFREEZE)) return; chan->rxhooksig = rxsig; +#ifdef RINGBEGIN + if ((chan->sig & __ZT_SIG_FXS) && (rxsig == ZT_RXSIG_RING) && + (!chan->ringdebtimer)) + __qevent(chan,ZT_EVENT_RINGBEGIN); +#endif switch(chan->sig) { case ZT_SIG_EM: /* E and M */ case ZT_SIG_EM_E1: @@ -804,6 +804,9 @@ struct zt_tone_def { /* Structure for zone programming */ /* Timer event -- ping ready */ #define ZT_EVENT_TIMER_PING 16 +/* Ring Begin event */ +#define ZT_EVENT_RINGBEGIN 18 + /* Polarity reversal event */ #define ZT_EVENT_POLARITY 17 @@ -140,4 +140,11 @@ */ /* #define EMFLASH */ +/* + * Comment out the following if you dont want events to indicate the + * beginning of an incomming ring. Most non-asterisk applications will + * want this commented out. + */ +/* #define RINGBEGIN */ + #endif |