summaryrefslogtreecommitdiff
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-02-28 22:26:41 +0000
committerMark Spencer <markster@digium.com>2005-02-28 22:26:41 +0000
commit45d7200427b7ca03b9851dfbd2cfcb533ff3c499 (patch)
treed024ec194cd5e78860ce260d6ce9cbd985e77378 /channels/chan_mgcp.c
parent3def26a0e4acc2041b7c6133c4bd192c836e5a81 (diff)
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
Diffstat (limited to 'channels/chan_mgcp.c')
-rwxr-xr-xchannels/chan_mgcp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 4e1995e7b..f4e443cdd 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: