[asterisk-dev] chan_dahdi - dnid handling
Klaus Darilion
klaus.mailinglists at pernau.at
Wed Jun 30 06:05:40 CDT 2010
Am 30.06.2010 09:10, schrieb Wolfgang Pichler:
> Hi all,
>
> i have a question / bug report about the chan_dahdi dnid handling...
>
> I am setting up a gateway system - for use in austria. In Austria we can
> get the dnid complete on a new call (we call it Blockwahl) - or we do
> get it as dtmf sequence (we call it Einzelwahl).
>
> Setting up chan_dahdi with immediate=no does work for this - but if the
> call is comming - and does not have the complete set - then asterisk
> will wait 8 seconds to send the call to the s extension - which is
> definitly to long.
Are you using analog or ISDN?
Maybe you discovered another bug, but I think there is another problem
when handling the received digits:
channels/chan_dahdi.c:
if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num))
timeout = matchdigittimeout;
else
timeout = gendigittimeout;
res = ast_waitfordigit(chan, timeout);
If chan_dahdi does not find a matching extension, e.g. if there is no
dnid provided, it sets the timeout to gendigittimeout=8 seconds, which
is IMO really much to big. The usual overlap timeout of
matchdigittimeout=3 seconds is more appropriate.
You could make the gendigittimeout and matchdigittimeout configurable,
or change the logic for exmaple to check for "s" extension in case of
missing DNID:
if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num))
timeout = matchdigittimeout;
else {
if (ast_strlen_zero(exten) &&
ast_exists_extension(chan, chan->context, "s", 1, p->cid_num)) {
timeout = matchdigittimeout;
} else {
timeout = gendigittimeout;
}
}
res = ast_waitfordigit(chan, timeout);
regards
Klaus
More information about the asterisk-dev
mailing list