summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2007-05-18 08:49:34 +0000
committerOlle Johansson <oej@edvina.net>2007-05-18 08:49:34 +0000
commitf3ec447a23222b13de5fa14bfcbb6a3cc80609a6 (patch)
treefb393138d2496e3bb08829130fa04489f46bc1d6
parentc2824bfd70df42cc9552c622e0f3d66881885623 (diff)
Another fix for the support for recordings controlled by INFO-packets
We still lack a setting to enable/disable this per peer git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 732e1690e..47ededfb7 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11699,32 +11699,18 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req)
ast_unlock_call_features();
return;
}
- /* OEJ: Why is the DTMF code included in the record section? */
+ /* Send the feature code to the PBX as DTMF, just like the handset had sent it */
f.len = 100;
- for (j=0; j<strlen(feat->exten); j++) {
+ for (j=0; j < strlen(feat->exten); j++) {
f.subclass = feat->exten[j];
ast_queue_frame(p->owner, &f);
if (sipdebug)
- ast_verbose("* DTMF-relay event received: %c\n", f.subclass);
+ ast_verbose("* DTMF-relay event faked: %c\n", f.subclass);
}
ast_unlock_call_features();
-#ifdef DISABLED_CODE
- /* And feat isn't used here - Is this code tested at all???
- We just send a reply ...
- */
- if (strcasecmp(c, "on")== 0) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Got a Request to Record the channel!\n");
- transmit_response(p, "200 OK", req);
- return;
- } else if (strcasecmp(c, "off")== 0) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Got a Request to Stop Recording the channel\n");
- transmit_response(p, "200 OK", req);
- return;
- }
-#endif
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Got a Request to Record the channel, state %s\n", c);
transmit_response(p, "200 OK", req);
return;
}