summaryrefslogtreecommitdiff
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
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 */