- flash-to-digits: Defines the digits to be sent when the FLASH is detected on FXS

channels;
- Updated documentation.
This commit is contained in:
Geovani Ricardo Wiedenhoft 2010-11-04 10:04:19 -02:00
parent 20c2740c64
commit 56f58c2983
13 changed files with 47 additions and 8 deletions

View File

@ -412,6 +412,12 @@ to be used to initialize a call transfer using PBX-to-PBX signaling.
<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 ;;;;;;;;;;;;;;;;;;;;;;
@ -512,16 +518,17 @@ In the example above, the branch numbered 804 will call the number
<!--
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>

View File

@ -60,6 +60,7 @@
</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&reg; 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>
@ -119,7 +120,8 @@
</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>

View File

@ -61,6 +61,7 @@ If you need to set advanced parameters of the board and/or signaling, the progra
</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&reg; 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>
@ -123,7 +124,8 @@ For details, please refer to the configuration file for examples.
</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>

View File

@ -995,6 +995,7 @@ struct KhompPvtFXS: public KhompPvt
std::string _language;
std::string _accountcode;
std::string _mailbox;
std::string _flash;
static Opt::OrigToNseqMapType generateNseqMap();
static void dialTimer(KhompPvt * pvt);

View File

@ -155,6 +155,7 @@ public:
static unsigned int _transferdigittimeout;
static std::string _flash;
static std::string _blindxfer;
static std::string _atxfer;

View File

@ -1 +1 @@
#define MOD_KHOMP_VERSION "1.0 - (rev: 5823)"
#define MOD_KHOMP_VERSION "1.0 - (rev: 5841)"

View File

@ -2055,6 +2055,7 @@ void BoardE1::KhompPvtFXS::loadOptions()
_language = Opt::_global_language;
_accountcode = Opt::_accountcode;
_mailbox.clear();
_flash = Opt::_flash;
Opt::BranchToOptMapType::iterator it3 = Opt::_branch_options.find(_fxs_orig_addr);
@ -2181,6 +2182,10 @@ bool BoardE1::KhompPvtFXS::parseBranchOptions(std::string options_str)
{
_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());
@ -3001,12 +3006,23 @@ bool BoardE1::KhompPvtFXS::onDtmfSendFinish(K3L_EVENT *e)
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"));
@ -3043,6 +3059,7 @@ bool BoardE1::KhompPvtFXS::onFlashDetected(K3L_EVENT *e)
DBG(FUNC, PVT_FMT(target(), "(FXS) r (unable to start transfer)"));
return false;
}
/******************************************************************************/
}
catch (ScopedLockFailed & err)

View File

@ -79,6 +79,7 @@ unsigned int Opt::_fxs_digit_timeout;
unsigned int Opt::_transferdigittimeout;
std::string Opt::_flash;
std::string Opt::_atxfer;
std::string Opt::_blindxfer;
@ -154,7 +155,9 @@ void Opt::initialize(void)
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));

View File

@ -249,6 +249,12 @@ bool MatchExtension::canMatch(std::string & context, std::string & exten,
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;