diff options
author | Richard Mudgett <rmudgett@digium.com> | 2010-11-24 22:52:07 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2010-11-24 22:52:07 +0000 |
commit | ccdc417ab57102d11d055dbaec943bf6adfdd337 (patch) | |
tree | 22b95a7e3536d461b8b29dd4af3fbdb6b0f5ddde /channels/sig_analog.h | |
parent | ddd0ae53d23f432a16e01a603120d8ff97ea53a4 (diff) |
Merged revisions 296167 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines
Merged revisions 296166 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines
Merged revisions 296165 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines
Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip.
The FXS connected phone has to have CW/CID support to fail, as it will
send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal
phone with no CID never fails. Also the SIP phone does not hear MOH when
the CW call is answered.
The DTMF end frame is suppressed when the phone acknowledges the CW signal
for CID. The problem is the DTMF begin frame needs to be suppressed as
well. The DTMF begin frame is causing SIP to start sending the DTMF RTP
frames. Since the DTMF end frame is suppressed, SIP will not stop sending
those DTMF RTP packets.
* Suppress the DTMF begin and end frames when the channel driver is
looking for DTMF digits.
* Fixed a couple issues caused by not cleaning up the CID spill if you
answer the CW call while it is sending the CID spill.
* Fixed not sending CW/CID spill to the phone when the call is natively
bridged. (Fixed by not using native bridge if CW/CID is possible.)
* Suppress received audio when sending CW/CID spills. The other parties
involved do not need to hear the CW/CID spills and may be confused if the
CW call is for them.
(closes issue #18129)
Reported by: alecdavis
Patches:
issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664)
Tested by: alecdavis, rmudgett
NOTE:
* v1.4 does not have the main problem fixed by suppressing the DTMF start
frames. The other three items fixed are relevant.
* If you really must restore native bridging between analog ports, you
need to disable CW/CID either by configuring chan_dahdi.conf
callwaitingcallerid=no or dialing *70 before dialing the number to
temporarily disable CW.
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sig_analog.h')
-rw-r--r-- | channels/sig_analog.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/channels/sig_analog.h b/channels/sig_analog.h index d7b6011a3..0f1a6563d 100644 --- a/channels/sig_analog.h +++ b/channels/sig_analog.h @@ -134,10 +134,10 @@ struct analog_callback { /* Do deadlock avoidance for the private signaling structure lock. */ void (* const deadlock_avoidance_private)(void *pvt); - /* Function which is called back to handle any other DTMF up events that are received. Called by analog_handle_event. Why is this + /* Function which is called back to handle any other DTMF events that are received. Called by analog_handle_event. Why is this * important to use, instead of just directly using events received before they are passed into the library? Because sometimes, * (CWCID) the library absorbs DTMF events received. */ - void (* const handle_dtmfup)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest); + void (* const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest); int (* const get_event)(void *pvt); int (* const wait_event)(void *pvt); @@ -228,6 +228,7 @@ struct analog_callback { int (* const check_waitingfordt)(void *pvt); void (* const set_confirmanswer)(void *pvt, int flag); int (* const check_confirmanswer)(void *pvt); + void (* const set_callwaiting)(void *pvt, int callwaiting_enable); void (* const cancel_cidspill)(void *pvt); int (* const confmute)(void *pvt, int mute); void (* const set_pulsedial)(void *pvt, int flag); @@ -271,14 +272,14 @@ struct analog_pvt { unsigned int dahditrcallerid:1; /*!< should we use the callerid from incoming call on dahdi transfer or not */ unsigned int hanguponpolarityswitch:1; unsigned int immediate:1; - unsigned int permcallwaiting:1; + unsigned int permcallwaiting:1; /*!< TRUE if call waiting is enabled. (Configured option) */ unsigned int permhidecallerid:1; /*!< Whether to hide our outgoing caller ID or not */ unsigned int pulse:1; unsigned int threewaycalling:1; unsigned int transfer:1; unsigned int transfertobusy:1; /*!< allow flash-transfers to busy channels */ unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */ - unsigned int callwaitingcallerid:1; + unsigned int callwaitingcallerid:1; /*!< TRUE if send caller ID for Call Waiting */ /*! * \brief TRUE if SMDI (Simplified Message Desk Interface) is enabled */ @@ -289,6 +290,7 @@ struct analog_pvt { /* Not used for anything but log messages. Could be just the TCID */ int channel; /*!< Channel Number */ + enum analog_sigtype outsigmod; int echotraining; int cid_signalling; /*!< Asterisk callerid type we're using */ @@ -301,13 +303,21 @@ struct analog_pvt { /* XXX: All variables after this are internal */ - unsigned int callwaiting:1; + unsigned int callwaiting:1; /*!< TRUE if call waiting is enabled. (Active option) */ unsigned int dialednone:1; unsigned int dialing:1; /*!< TRUE if in the process of dialing digits or sending something */ unsigned int dnd:1; /*!< TRUE if Do-Not-Disturb is enabled. */ unsigned int echobreak:1; unsigned int hidecallerid:1; unsigned int outgoing:1; + unsigned int inalarm:1; + /*! + * \brief TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent. + * \note + * After CAS is sent, the call waiting caller id will be sent if the phone + * gives a positive reply. + */ + unsigned int callwaitcas:1; char callwait_num[AST_MAX_EXTENSION]; char callwait_name[AST_MAX_EXTENSION]; @@ -331,10 +341,6 @@ struct analog_pvt { struct ast_channel *ss_astchan; /* All variables after this are definitely going to be audited */ - unsigned int inalarm:1; - - int callwaitcas; - int ringt; int ringt_base; }; @@ -360,7 +366,7 @@ void *analog_handle_init_event(struct analog_pvt *i, int event); int analog_config_complete(struct analog_pvt *p); -void analog_handle_dtmfup(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub index, struct ast_frame **dest); +void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub index, struct ast_frame **dest); enum analog_cid_start analog_str_to_cidstart(const char *value); |