Allow MGCP to use distinctive ring for call wait

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2005-02-28 22:26:41 +00:00
parent 3def26a0e4
commit 45d7200427

View File

@@ -872,7 +872,17 @@ static int mgcp_call(struct ast_channel *ast, char *dest, int timeout)
ast_mutex_lock(&sub->lock);
switch (p->hookstate) {
case MGCP_OFFHOOK:
snprintf(tone, sizeof(tone), "L/wt");
if (distinctive_ring && !ast_strlen_zero(distinctive_ring)) {
snprintf(tone, sizeof(tone), "L/wt%s", distinctive_ring);
if (mgcpdebug) {
ast_verbose(VERBOSE_PREFIX_3 "MGCP distinctive callwait %s\n", tone);
}
} else {
snprintf(tone, sizeof(tone), "L/wt");
if (mgcpdebug) {
ast_verbose(VERBOSE_PREFIX_3 "MGCP normal callwait %s\n", tone);
}
}
break;
case MGCP_ONHOOK:
default: