<param name="user-transfer-digits" value="#2"/>
-->
+<!--
+Defines the digits to be sent when the flash is detected.
+
+<param name="flash-to-digits" value="*1"/>
+-->
+
<!--
;;;;;;;;;;;;;;;;;;;; CONTEXTS WILDCARDS ;;;;;;;;;;;;;;;;;;;;;;
<!--
In this section, you should define options using the following syntax:
-'orig_prefix = option1:value | option2:value | option3:value' ...
+orig_prefix = option1:value | option2:value | option3:value ...
-ex: <param name="804" value="output-volume:+2' />
+ex: <param name="804" value="output-volume:+2" />
In the example above, the branch numbered 804 will have specific
configuration for default output volume set to +2.
Possible values to options is:
context, input-volume, output-volume language,
-mohclass, amaflags, accountcode, calleridnum, calleridname, mailbox.
+mohclass, amaflags, accountcode, calleridnum,
+calleridname, mailbox, flash-to-digits.
-->
</fxs-options>
</li><li><b>suppression-delay</b>: Ativa ("yes") ou desativa ("no") o delay necessário para supressão DTMF. Se desativado ("no"), também desativa supressão de DTMFs;
</li><li><b>trace</b>: Define opções de depuração. Não deve ser utilizado em produção a não ser que estritamente necessário;
</li><li><b>user-transfer-digits</b>: Define uma seqüência de dígitos DTMF para iniciar a transferencia entre o FreeSWITCH® e um outro PABX (utilizando sinalização de usuário, como QSig ou FXO FLASH);
+</li><li><b>flash-to-digits</b>: Define os dígitos para serem enviados quando o FLASH é detectado na FXS;
</li></ul>
<p><br />
</p>
</li><li>accountcode;
</li><li>calleridnum;
</li><li>calleridname;
-</li><li>mailbox.
+</li><li>mailbox;
+</li><li>flash-to-digits.
</li></ul>
<p>Cada opção é separada uma da outra por um pipe "|" ou uma barra "/" e definidas após dois pontos ":", exemplo:
</p>
</li><li><b>suppression-delay</b> (former <b>suppressiondelay</b>): Activate ("yes") or disables ("no") the delay necessary to suppress DTMF. If disabled ("no"), also disables suppression of DTMF (local option);
</li><li><b>trace</b>: Set debugging options. Should not be used in production unless absolutely necessary;
</li><li><b>user-transfer-digits</b>: Defines a sequence of DTMF digits to initiate the transfer between FreeSWITCH® and another PBX (using user signaling, like QSig or FXO FLASH).
+</li><li><b>flash-to-digits</b>: Defines the digits to be sent when the FLASH is detected on FXS channels..
</li></ul>
<p><br />
</p>
</li><li>accountcode;
</li><li>calleridnum;
</li><li>calleridname;
-</li><li>mailbox.
+</li><li>mailbox;
+</li><li>flash-to-digits.
</li></ul>
<p>Each option is separated from each other by a pipe "|" or a slash "/" and defined after the colon ":". Example:
</p>
std::string _language;
std::string _accountcode;
std::string _mailbox;
+ std::string _flash;
static Opt::OrigToNseqMapType generateNseqMap();
static void dialTimer(KhompPvt * pvt);
static unsigned int _transferdigittimeout;
+ static std::string _flash;
static std::string _blindxfer;
static std::string _atxfer;
-#define MOD_KHOMP_VERSION "1.0 - (rev: 5823)"
+#define MOD_KHOMP_VERSION "1.0 - (rev: 5841)"
_language = Opt::_global_language;
_accountcode = Opt::_accountcode;
_mailbox.clear();
+ _flash = Opt::_flash;
Opt::BranchToOptMapType::iterator it3 = Opt::_branch_options.find(_fxs_orig_addr);
{
_mailbox = opt_value;
}
+ else if (opt_name == "flash-to-digits")
+ {
+ _flash = opt_value;
+ }
else
{
DBG(FUNC, PVT_FMT(_target, "[fxs-options] invalid option on branch %s: \"%s\".") % _fxs_orig_addr.c_str() % opt_name.c_str());
bool BoardE1::KhompPvtFXS::onFlashDetected(K3L_EVENT *e)
{
- DBG(FUNC, PVT_FMT(_target, "(FXS) c"));
+ DBG(FUNC, PVT_FMT(_target, "(FXS) c (%s)") % _flash);
try
{
ScopedPvtLock lock(this);
+ for(std::string::const_iterator it = _flash.begin(); it != _flash.end(); it++)
+ {
+ signalDTMF(*it);
+ }
+
+ DBG(FUNC, PVT_FMT(_target, "(FXS) r"));
+
+ return true;
+
+/******************************************************************************/
+ //Old implementation, not used
if(callFXS()->_flags.check(Kflags::FXS_FLASH_TRANSFER))
{
DBG(FUNC, PVT_FMT(_target, "(FXS) transfer canceled"));
DBG(FUNC, PVT_FMT(target(), "(FXS) r (unable to start transfer)"));
return false;
}
+/******************************************************************************/
}
catch (ScopedLockFailed & err)
unsigned int Opt::_transferdigittimeout;
+std::string Opt::_flash;
std::string Opt::_atxfer;
std::string Opt::_blindxfer;
Globals::options.add(ConfigOption("transferdigittimeout", _transferdigittimeout, 3000u, 0u, 90000u));
- Globals::options.add(ConfigOption("atxfer", _atxfer, ""));
+ Globals::options.add(ConfigOption("flash-to-digits", _flash, "*1"));
+
+ Globals::options.add(ConfigOption("atxfer", _atxfer, ""));
Globals::options.add(ConfigOption("blindxfer", _blindxfer, ""));
Globals::options.add(ConfigOption("delay-ringback-co", _ringback_co_delay, 1500u, 0u, 999000u));
if(finished != std::string::npos)
{
+ if(exten.size() <= 1)
+ {
+ DBG(FUNC, FMT("exten=%s size=%d") % exten % exten.size());
+ return true;
+ }
+
exten.erase(finished);
DBG(FUNC, FMT("match exact!!! exten=%s") % exten);
return false;