FS-477 mod_skinny: re-add ability to set digit timeout in patterns, update example configs
This commit is contained in:
parent
8b6fd66f34
commit
2974734479
|
@ -7,17 +7,17 @@
|
|||
The special applications:
|
||||
- skinny-process tells skinny to process the call (route, set call forwarding, ...)
|
||||
- skinny-drop tells skinny to drop the call
|
||||
- skinny-wait tells skinny to wait for more digits
|
||||
- skinny-wait tells skinny to wait 'data' seconds for more numbers before drop
|
||||
-->
|
||||
<!-- http://wiki.freeswitch.org/wiki/Mod_skinny -->
|
||||
<include>
|
||||
<context name="skinny-patterns">
|
||||
<!--
|
||||
Wait for another digit by default
|
||||
Wait 10 seconds for another digit by default, if data not specified, uses profile default
|
||||
-->
|
||||
<extension name="Default">
|
||||
<condition>
|
||||
<action application="skinny-wait" />
|
||||
<action application="skinny-wait" data="10"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
<param name="odbc-dsn" value=""/>
|
||||
<param name="debug" value="4"/>
|
||||
<param name="auto-restart" value="true"/>
|
||||
|
||||
<!-- timeout to wait for another digit in milliseconds -->
|
||||
<param name="digit-timeout" value="10000"/>
|
||||
</settings>
|
||||
<soft-key-set-sets>
|
||||
<soft-key-set-set name="default">
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
The special applications:
|
||||
- skinny-process tells skinny to process the call (route, set call forwarding, ...)
|
||||
- skinny-drop tells skinny to drop the call
|
||||
- skinny-wait tells skinny to wait for more digits
|
||||
- skinny-wait tells skinny to wait 'data' seconds for more numbers before drop
|
||||
-->
|
||||
<!-- http://wiki.freeswitch.org/wiki/Mod_skinny -->
|
||||
<include>
|
||||
<context name="skinny-patterns">
|
||||
<!--
|
||||
Wait for another digit by default
|
||||
Wait 10 seconds for another digit by default, if data not specified, uses profile default
|
||||
-->
|
||||
<extension name="Default" continue="true">
|
||||
<condition>
|
||||
<action application="skinny-wait" />
|
||||
<action application="skinny-wait" data="10"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<param name="ext-voicemail" value="vmain"/>
|
||||
<param name="ext-redial" value="redial"/>
|
||||
<!-- <param name="ext-meetme" value="conference"/> -->
|
||||
<param name="digit-timeout" value="10000"/> -->
|
||||
|
||||
<!-- usually place this one on the directory entry for a skinny phone and not global -->
|
||||
<!-- <param name="ext-pickup" value="pickup"/> -->
|
||||
|
|
|
@ -751,6 +751,7 @@ switch_status_t channel_on_routing(switch_core_session_t *session)
|
|||
char *data = NULL;
|
||||
listener_t *listener = NULL;
|
||||
struct channel_on_routing_helper helper = {0};
|
||||
int digit_timeout;
|
||||
|
||||
if(switch_test_flag(tech_pvt, TFLAG_FORCE_ROUTE)) {
|
||||
action = SKINNY_ACTION_PROCESS;
|
||||
|
@ -783,7 +784,15 @@ switch_status_t channel_on_routing(switch_core_session_t *session)
|
|||
atoi(switch_channel_get_variable(channel, "skinny_device_instance")), &listener);
|
||||
|
||||
if (listener) {
|
||||
listener->digit_timeout_time = switch_mono_micro_time_now() + listener->profile->digit_timeout * 1000;
|
||||
digit_timeout = listener->profile->digit_timeout;
|
||||
if (!zstr(data)) {
|
||||
digit_timeout = atoi(data);
|
||||
if ( digit_timeout < 100 ) {
|
||||
digit_timeout *= 1000;
|
||||
}
|
||||
}
|
||||
|
||||
listener->digit_timeout_time = switch_mono_micro_time_now() + digit_timeout * 1000;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Could not find listener %s:%s for Channel %s\n",
|
||||
switch_channel_get_variable(channel, "skinny_device_name"), switch_channel_get_variable(channel, "skinny_device_instance"),
|
||||
|
|
Loading…
Reference in New Issue