<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19716">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sig_analog: Allow three-way flash to time out to silence.<br><br>sig_analog allows users to flash and use the three-way dial<br>tone as a primitive hold function, simply by never timing<br>it out.<br><br>Some systems allow this dial tone to time out to silence,<br>so the user is not annoyed by a persistent dial tone.<br>This option allows the dial tone to time out normally to<br>silence.<br><br>ASTERISK-30004 #close<br><br>Change-Id: Ic748f04dbb333a178f814bb02b713886f788d88e<br>---<br>M channels/chan_dahdi.c<br>M channels/chan_dahdi.h<br>M channels/sig_analog.c<br>M channels/sig_analog.h<br>M configs/samples/chan_dahdi.conf.sample<br>A doc/CHANGES-staging/chan_dahdi_threewaysilenthold.txt<br>6 files changed, 52 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/16/19716/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c</span><br><span>index 5607eb0..7433e630 100644</span><br><span>--- a/channels/chan_dahdi.c</span><br><span>+++ b/channels/chan_dahdi.c</span><br><span>@@ -12806,6 +12806,7 @@</span><br><span> tmp->usedistinctiveringdetection = usedistinctiveringdetection;</span><br><span> tmp->callwaitingcallerid = conf->chan.callwaitingcallerid;</span><br><span> tmp->threewaycalling = conf->chan.threewaycalling;</span><br><span style="color: hsl(120, 100%, 40%);">+ tmp->threewaysilenthold = conf->chan.threewaysilenthold;</span><br><span> tmp->adsi = conf->chan.adsi;</span><br><span> tmp->use_smdi = conf->chan.use_smdi;</span><br><span> tmp->permhidecallerid = conf->chan.hidecallerid;</span><br><span>@@ -13111,6 +13112,7 @@</span><br><span> analog_p->permhidecallerid = conf->chan.permhidecallerid;</span><br><span> analog_p->pulse = conf->chan.pulse;</span><br><span> analog_p->threewaycalling = conf->chan.threewaycalling;</span><br><span style="color: hsl(120, 100%, 40%);">+ analog_p->threewaysilenthold = conf->chan.threewaysilenthold;</span><br><span> analog_p->transfer = conf->chan.transfer;</span><br><span> analog_p->transfertobusy = conf->chan.transfertobusy;</span><br><span> analog_p->use_callerid = tmp->use_callerid;</span><br><span>@@ -18150,6 +18152,8 @@</span><br><span> confp->chan.cid_start = CID_START_RING;</span><br><span> } else if (!strcasecmp(v->name, "threewaycalling")) {</span><br><span> confp->chan.threewaycalling = ast_true(v->value);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (!strcasecmp(v->name, "threewaysilenthold")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ confp->chan.threewaysilenthold = ast_true(v->value);</span><br><span> } else if (!strcasecmp(v->name, "cancallforward")) {</span><br><span> confp->chan.cancallforward = ast_true(v->value);</span><br><span> } else if (!strcasecmp(v->name, "relaxdtmf")) {</span><br><span>diff --git a/channels/chan_dahdi.h b/channels/chan_dahdi.h</span><br><span>index de813f2..c0d75c2 100644</span><br><span>--- a/channels/chan_dahdi.h</span><br><span>+++ b/channels/chan_dahdi.h</span><br><span>@@ -345,6 +345,11 @@</span><br><span> */</span><br><span> unsigned int threewaycalling:1;</span><br><span> /*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief TRUE if a three way dial tone should time out to silence</span><br><span style="color: hsl(120, 100%, 40%);">+ * \note Set from the "threewaysilenthold" value read in from chan_dahdi.conf</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int threewaysilenthold:1;</span><br><span style="color: hsl(120, 100%, 40%);">+ /*!</span><br><span> * \brief TRUE if call transfer is enabled</span><br><span> * \note For FXS ports (either direct analog or over T1/E1):</span><br><span> * Support flash-hook call transfer</span><br><span>diff --git a/channels/sig_analog.c b/channels/sig_analog.c</span><br><span>index b694a96..029a0f1 100644</span><br><span>--- a/channels/sig_analog.c</span><br><span>+++ b/channels/sig_analog.c</span><br><span>@@ -2136,8 +2136,10 @@</span><br><span> /* Read the first digit */</span><br><span> timeout = analog_get_firstdigit_timeout(p);</span><br><span> /* If starting a threeway call, never timeout on the first digit so someone</span><br><span style="color: hsl(0, 100%, 40%);">- can use flash-hook as a "hold" feature */</span><br><span style="color: hsl(0, 100%, 40%);">- if (p->subs[ANALOG_SUB_THREEWAY].owner) {</span><br><span style="color: hsl(120, 100%, 40%);">+ * can use flash-hook as a "hold" feature</span><br><span style="color: hsl(120, 100%, 40%);">+ * Unless three-way dial tone should time out to silence, in which case the default suffices.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!p->threewaysilenthold && p->subs[ANALOG_SUB_THREEWAY].owner) {</span><br><span> timeout = INT_MAX;</span><br><span> }</span><br><span> while (len < AST_MAX_EXTENSION-1) {</span><br><span>@@ -2219,7 +2221,11 @@</span><br><span> }</span><br><span> } else if (res == 0) {</span><br><span> ast_debug(1, "not enough digits (and no ambiguous match)...\n");</span><br><span style="color: hsl(0, 100%, 40%);">- res = analog_play_tone(p, idx, ANALOG_TONE_CONGESTION);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (p->threewaysilenthold) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(1, "Nothing dialed at three-way dial tone, timed out to silent hold\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ res = analog_play_tone(p, idx, ANALOG_TONE_CONGESTION);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> analog_wait_event(p);</span><br><span> ast_hangup(chan);</span><br><span> goto quit;</span><br><span>diff --git a/channels/sig_analog.h b/channels/sig_analog.h</span><br><span>index 7e9acda..2a1e2c2 100644</span><br><span>--- a/channels/sig_analog.h</span><br><span>+++ b/channels/sig_analog.h</span><br><span>@@ -292,6 +292,7 @@</span><br><span> unsigned int permhidecallerid:1; /*!< Whether to hide our outgoing caller ID or not */</span><br><span> unsigned int pulse:1;</span><br><span> unsigned int threewaycalling:1;</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int threewaysilenthold:1; /*!< Whether to time out a three-way dial tone to silence */</span><br><span> unsigned int transfer:1;</span><br><span> unsigned int transfertobusy:1; /*!< allow flash-transfers to busy channels */</span><br><span> unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */</span><br><span>diff --git a/configs/samples/chan_dahdi.conf.sample b/configs/samples/chan_dahdi.conf.sample</span><br><span>index 6b29549..f5b233d 100644</span><br><span>--- a/configs/samples/chan_dahdi.conf.sample</span><br><span>+++ b/configs/samples/chan_dahdi.conf.sample</span><br><span>@@ -750,6 +750,14 @@</span><br><span> ;</span><br><span> threewaycalling=yes</span><br><span> ;</span><br><span style="color: hsl(120, 100%, 40%);">+; By default, the three-way dial tone never times out, allowing it to be</span><br><span style="color: hsl(120, 100%, 40%);">+; used as a primitive "hold" mechanism. However, if you'd prefer</span><br><span style="color: hsl(120, 100%, 40%);">+; to have the dial tone time out to silence, you can use this option</span><br><span style="color: hsl(120, 100%, 40%);">+; to time out after the normal first digit timeout to silence.</span><br><span style="color: hsl(120, 100%, 40%);">+; Default is 'no'.</span><br><span style="color: hsl(120, 100%, 40%);">+;</span><br><span style="color: hsl(120, 100%, 40%);">+;threewaysilenthold=no</span><br><span style="color: hsl(120, 100%, 40%);">+;</span><br><span> ; For FXS ports (either direct analog or over T1/E1):</span><br><span> ; Support flash-hook call transfer (requires three way calling)</span><br><span> ; Also enables call parking (overrides the 'canpark' parameter)</span><br><span>diff --git a/doc/CHANGES-staging/chan_dahdi_threewaysilenthold.txt b/doc/CHANGES-staging/chan_dahdi_threewaysilenthold.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..05d6398</span><br><span>--- /dev/null</span><br><span>+++ b/doc/CHANGES-staging/chan_dahdi_threewaysilenthold.txt</span><br><span>@@ -0,0 +1,5 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: chan_dahdi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The threewaysilenthold option now allows the three-way</span><br><span style="color: hsl(120, 100%, 40%);">+dial tone to time out to silence, rather than continuing</span><br><span style="color: hsl(120, 100%, 40%);">+forever.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19716">change 19716</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/19716"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic748f04dbb333a178f814bb02b713886f788d88e </div>
<div style="display:none"> Gerrit-Change-Number: 19716 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <asterisk@phreaknet.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>