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
res = -1;
goto done;
}
- if (opermode && !strncmp(chan->tech->type, "DAHDI", 5) && !strncmp(peer->name, "DAHDI", 5)) {
- /* what's this special handling for dahdi <-> dahdi ?
- * A: dahdi to dahdi calls are natively bridged at the kernel driver
- * level, so we need to ensure that this mode gets propagated
- * all the way down. */
+ if (opermode) {
struct oprmode oprmode;
oprmode.peer = peer;
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 */
/* these two cannot be sent, because they require a result */
errno = ENOSYS;
return -1;
+ case AST_OPTION_OPRMODE:
+ errno = EINVAL;
+ return -1;
default:
if (!(h = ast_malloc(datalen + sizeof(*h))))
return -1;