If singlepath=yes, don't send multiple RTP streams during transfer

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-09-17 20:08:40 +00:00
parent 9d8c71ee86
commit d1be79cce2

View File

@@ -3,9 +3,9 @@
* *
* Implementation of Media Gateway Control Protocol * Implementation of Media Gateway Control Protocol
* *
* Copyright (C) 1999, Mark Spencer * Copyright (C) 1999-2004, Digium, Inc.
* *
* Mark Spencer <markster@linux-support.net> * Mark Spencer <markster@digium.com>
* *
* This program is free software, distributed under the terms of * This program is free software, distributed under the terms of
* the GNU General Public License * the GNU General Public License
@@ -1137,8 +1137,10 @@ static int mgcp_write(struct ast_channel *ast, struct ast_frame *frame)
} }
if (sub) { if (sub) {
ast_mutex_lock(&sub->lock); ast_mutex_lock(&sub->lock);
if (sub->rtp) { if ((sub->parent->sub == sub) || !sub->parent->singlepath) {
res = ast_rtp_write(sub->rtp, frame); if (sub->rtp) {
res = ast_rtp_write(sub->rtp, frame);
}
} }
ast_mutex_unlock(&sub->lock); ast_mutex_unlock(&sub->lock);
} }
@@ -3674,6 +3676,7 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
e->callreturn = callreturn; e->callreturn = callreturn;
e->cancallforward = cancallforward; e->cancallforward = cancallforward;
e->canreinvite = canreinvite; e->canreinvite = canreinvite;
e->singlepath = singlepath;
e->callwaiting = callwaiting; e->callwaiting = callwaiting;
e->slowsequence = slowsequence; e->slowsequence = slowsequence;
e->transfer = transfer; e->transfer = transfer;