Don't try to send DID digits if there are none.

This commit is contained in:
MelwareDE 2008-12-11 09:43:02 +00:00
parent 4b14aadd04
commit 57621e34ab
1 changed files with 8 additions and 6 deletions

View File

@ -2653,12 +2653,14 @@ static void capidev_handle_did_digits(_cmsg *CMSG, unsigned int PLCI, unsigned i
update_channel_name(i);
if (i->owner->pbx != NULL) {
/* we are already in pbx, so we send the digits as dtmf */
for (a = 0; a < strlen(did); a++) {
fr.frametype = AST_FRAME_DTMF;
fr.subclass = did[a];
local_queue_frame(i, &fr);
}
if (did) {
/* we are already in pbx, so we send the digits as dtmf */
for (a = 0; a < strlen(did); a++) {
fr.frametype = AST_FRAME_DTMF;
fr.subclass = did[a];
local_queue_frame(i, &fr);
}
}
return;
}