mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 20:47:06 +00:00
- Removed alternative contexts / extensions
- New struct for matchs - On calls originated from an FXS branch, the Endpoint searches for a valid extension (digits sent) after the DTMF '#' or after the timeout (option fxs-digit-timeout). That search is done in the context defined in section <fxs-options>, or if no context configured, the search is done in context defined in context-fxs. - Added "dialplan" configuration: Name of the dialplan module in use (default XML) - Group context enabled. If set, the search for a valid extension is done only in that context. - Updated documentation
This commit is contained in:
1 parent
15070162ff
commit
1ef3fc9a1b
21 files changed
+342
-343
No files matched your search
@@ -85,10 +85,6 @@ struct Board
|
||||
/******************************** Channel *************************************/
|
||||
struct KhompPvt
|
||||
{
|
||||
// TODO: Here for while, put in right struct, when is ready
|
||||
typedef std::vector<std::string> ContextListType;
|
||||
typedef std::vector<std::string> ExtenListType;
|
||||
|
||||
typedef SimpleNonBlockLock<25,100> ChanLockType;
|
||||
|
||||
typedef enum
|
||||
@@ -994,29 +990,26 @@ public:
|
||||
|
||||
virtual int getActiveChannel(bool invalid_as_not_found);
|
||||
|
||||
MatchType matchExtension(std::string &, std::string &, std::string &, bool match_only = false);
|
||||
|
||||
MatchType findExtension(std::string &, std::string &, ContextListType &, std::string &, std::string &,
|
||||
bool default_ctx = true, bool default_ext = true);
|
||||
|
||||
/* Let's validate the contexts */
|
||||
virtual bool validContexts(Board::KhompPvt::ContextListType & contexts, std::string extra_string = "")
|
||||
virtual bool validContexts(MatchExtension::ContextListType & contexts,
|
||||
std::string extra_string = "")
|
||||
{
|
||||
DBG(FUNC,PVT_FMT(_target,"c"));
|
||||
|
||||
if(!_group_context.empty())
|
||||
{
|
||||
contexts.push_back(_group_context);
|
||||
contexts.insert(contexts.begin(), _group_context);
|
||||
//contexts.push_back(_group_context);
|
||||
}
|
||||
|
||||
for (Board::KhompPvt::ContextListType::iterator i = contexts.begin(); i != contexts.end(); i++)
|
||||
for (MatchExtension::ContextListType::iterator i = contexts.begin(); i != contexts.end(); i++)
|
||||
replaceTemplate((*i), "DD", _target.device);
|
||||
|
||||
BEGIN_CONTEXT
|
||||
{
|
||||
K3L_DEVICE_CONFIG & dev_cfg = Globals::k3lapi.device_config(_target.device);
|
||||
|
||||
for (Board::KhompPvt::ContextListType::iterator i = contexts.begin(); i != contexts.end(); i++)
|
||||
for (MatchExtension::ContextListType::iterator i = contexts.begin(); i != contexts.end(); i++)
|
||||
replaceTemplate((*i), "SSSS", atoi(dev_cfg.SerialNumber));
|
||||
}
|
||||
END_CONTEXT
|
||||
|
||||
Reference in new issue
Block a user