]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
ftmod_libpri: Improve RESTART handling, add PTP NT idle channel restart and T316.
authorStefan Knoblich <stkn@openisdn.net>
Tue, 4 Sep 2012 22:22:52 +0000 (00:22 +0200)
committerStefan Knoblich <stkn@openisdn.net>
Tue, 4 Sep 2012 22:42:32 +0000 (00:42 +0200)
commit4ffcb7c9efd257c91b0cb765fc5bbc8aed05faa0
tree61ee72db83c1744c5e49011e8d71ba2026109b7e
parent1a47eb933b363d9a02f739eafd68196ab46371b4
ftmod_libpri: Improve RESTART handling, add PTP NT idle channel restart and T316.

Do not try to send RESTART on BRI PTMP spans, libpri will just print
an error and do nothing, causing the channels to be stuck in RESTART
forever.

Add T316 (RESTART ACK timeout), which is not implemented by libpri.
The default timeout is 30 seconds (Q.931 recommends 2 minutes, but
that is a little long and libpri layer 2 is being stupid) and the
restart attempt limit to 3 (instead of 2).

Periodically send RESTART on idle b-channels in PTP NT mode.
Default interval is 15 minutes, feature can be disabled by setting
"idle_restart_interval" to 0 in the span configuration.

Allow timeout / interval values to have an additional time unit
suffix for convenience reasons, the default (no unit specified)
is milliseconds, valid units include:

w (week), d (day), h (hour), m (minute), s (second)

Only full integers are accepted, no fractional numbers, valid examples:

2w   = two weeks
37m  = 37 minutes
1h   = 1 hour

Combinations of multiple numbers and units (e.g. "1w5d") are not supported.

New span configuration parameters:

idle_restart_interval (milliseconds / time unit suffix /
 0 = disabled)

t316 / restart_timeout (milliseconds / time unit suffix)
t316_limit / restart_attempts (number of max. attempts)

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c
libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.h