aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-07 21:34:44 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-07 21:34:44 +0000
commit146f94185f32dd26a759cb749c370867428cf043 (patch)
treecb72cff67faa04e477b37e94b6d57d823da67fb0 /channels/chan_dahdi.c
parented8f9a868441cd506682fbfa71e43c5d6be8b921 (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: http://svn.digium.com/svn/asterisk/trunk@147388 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c7
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 */