summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/pjsip/dialplan_functions.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c
index 054552b5a..6c0aff30b 100644
--- a/channels/pjsip/dialplan_functions.c
+++ b/channels/pjsip/dialplan_functions.c
@@ -707,7 +707,7 @@ int pjsip_acf_channel_read(struct ast_channel *chan, const char *cmd, char *data
/* Sanity check */
if (strcmp(ast_channel_tech(chan)->type, "PJSIP")) {
- ast_log(LOG_ERROR, "Cannot call %s on a non-PJSIP channel\n", cmd);
+ ast_log(LOG_WARNING, "Cannot call %s on a non-PJSIP channel\n", cmd);
return 0;
}
@@ -866,6 +866,11 @@ int pjsip_acf_media_offer_read(struct ast_channel *chan, const char *cmd, char *
return -1;
}
+ if (strcmp(ast_channel_tech(chan)->type, "PJSIP")) {
+ ast_log(LOG_WARNING, "Cannot call %s on a non-PJSIP channel\n", cmd);
+ return -1;
+ }
+
channel = ast_channel_tech_pvt(chan);
if (!strcmp(data, "audio")) {
@@ -889,6 +894,11 @@ int pjsip_acf_media_offer_write(struct ast_channel *chan, const char *cmd, char
return -1;
}
+ if (strcmp(ast_channel_tech(chan)->type, "PJSIP")) {
+ ast_log(LOG_WARNING, "Cannot call %s on a non-PJSIP channel\n", cmd);
+ return -1;
+ }
+
channel = ast_channel_tech_pvt(chan);
mdata.session = channel->session;