From d1f257ba538cb6f4576423fa7616dcb327793b46 Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Tue, 7 Oct 2008 21:34:44 +0000 Subject: 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 --- channels/chan_dahdi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'channels/chan_dahdi.c') 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 */ -- cgit v1.2.3