From: Mark Spencer Date: Mon, 28 Feb 2005 22:26:41 +0000 (+0000) Subject: Allow MGCP to use distinctive ring for call wait X-Git-Tag: 1.2.0-beta1~1145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=45d7200427b7ca03b9851dfbd2cfcb533ff3c499;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 4e1995e7b1..f4e443cdd9 100755 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -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: