diff options
author | Sean Bright <sean@malleable.com> | 2008-10-07 21:34:44 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2008-10-07 21:34:44 +0000 |
commit | d1f257ba538cb6f4576423fa7616dcb327793b46 (patch) | |
tree | cb72cff67faa04e477b37e94b6d57d823da67fb0 /channels/chan_dahdi.c | |
parent | 1693e791004b60e9bb8a5a296201c0d14d2c976e (diff) |
Move the DAHDI-to-DAHDI operator mode check from app_dial into chan_dahdi
so we don't have to hardcode anything.
(closes issue #13636)
Reported by: seanbright
Patches:
13636.diff uploaded by seanbright (license 71)
Reviewed by: russellb, putnopvut
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index db24a6d1c..552b9841d 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -3638,6 +3638,13 @@ static int dahdi_setoption(struct ast_channel *chan, int option, void *data, int break; case AST_OPTION_OPRMODE: /* Operator services mode */ oprmode = (struct oprmode *) data; + /* We don't support operator mode across technologies */ + if (strcasecmp(chan->tech->type, oprmode->peer->tech->type)) { + ast_log(LOG_NOTICE, "Operator mode not supported on %s to %s calls.\n", + chan->tech->type, oprmode->peer->tech->type); + errno = EINVAL; + return -1; + } pp = oprmode->peer->tech_pvt; p->oprmode = pp->oprmode = 0; /* setup peers */ |