summaryrefslogtreecommitdiffstats
path: root/interface.c
diff options
context:
space:
mode:
authorSuper User2008-01-12 12:28:22 +0100
committerSuper User2008-01-12 12:28:22 +0100
commit31aff20175a3bc9b4bb41d080452ae1d063e267a (patch)
treec45b62ab94c08f63173937a13e769c0a088bedae /interface.c
parentadded filter options (gain, pipeline, blowfish) to interface configuration. (diff)
downloadlcr-31aff20175a3bc9b4bb41d080452ae1d063e267a.tar.gz
lcr-31aff20175a3bc9b4bb41d080452ae1d063e267a.tar.xz
lcr-31aff20175a3bc9b4bb41d080452ae1d063e267a.zip
moved timeout settings from extenion to interface.conf
modified: README modified: apppbx.cpp modified: default/interface.conf modified: dss1.cpp modified: extension.c modified: extension.h modified: genext.c modified: interface.c modified: interface.h modified: port.h modified: todo.txt
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/interface.c b/interface.c
index b2995ff..4acc514 100644
--- a/interface.c
+++ b/interface.c
@@ -434,6 +434,55 @@ static int inter_channel_in(struct interface *interface, char *filename, int lin
}
return(0);
}
+static int inter_timeouts(struct interface *interface, char *filename, int line, char *parameter, char *value)
+{
+ struct interface_port *ifport;
+ struct select_channel *selchannel, **selchannelp;
+ int val;
+ char *p, *el;
+
+ /* port in chain ? */
+ if (!interface->ifport)
+ {
+ SPRINT(interface_error, "Error in %s (line %d): parameter '%s' expects previous 'port' definition.\n", filename, line, parameter);
+ return(-1);
+ }
+ /* goto end of chain */
+ ifport = interface->ifport;
+ while(ifport->next)
+ ifport = ifport->next;
+ p = value;
+ if (!*p)
+ {
+ nofive:
+ SPRINT(interface_error, "Error in %s (line %d): parameter '%s' expects five timeout values.\n", filename, line, parameter);
+ return(-1);
+ }
+ el = p;
+ p = get_seperated(p);
+ ifport->tout_setup = atoi(el);
+ if (!*p)
+ goto nofive;
+ el = p;
+ p = get_seperated(p);
+ ifport->tout_dialing = atoi(el);
+ if (!*p)
+ goto nofive;
+ el = p;
+ p = get_seperated(p);
+ ifport->tout_proceeding = atoi(el);
+ if (!*p)
+ goto nofive;
+ el = p;
+ p = get_seperated(p);
+ ifport->tout_alerting = atoi(el);
+ if (!*p)
+ goto nofive;
+ el = p;
+ p = get_seperated(p);
+ ifport->tout_disconnect = atoi(el);
+ return(0);
+}
static int inter_msn(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
struct interface_msn *ifmsn, **ifmsnp;
@@ -821,6 +870,11 @@ struct interface_param interface_param[] = {
" <number>[,...] - List of channels to accept.\n"
" free - Accept any free channel"},
+ {"timeouts", &inter_timeouts, "<setup> <dialing> <proceeding> <alerting> <disconnect>",
+ "Timeout values for call states. They are both for incomming and outgoing states.\n"
+ "The default is 120 seconds for all states. Use 0 to disable.\n"
+ "This parameter must follow a 'port' parameter.\n"},
+
{"msn", &inter_msn, "<default MSN>,[<additional MSN>[,...]]",
"Incomming caller ID is checked against given MSN numbers.\n"
"If the caller ID is not found in this list, it is overwritten by the first MSN"},