From f6b76699b7ba5d7c9d259a918c6e0f14aa4ec00c Mon Sep 17 00:00:00 2001 From: file Date: Wed, 5 Mar 2008 22:43:22 +0000 Subject: Merged revisions 106235 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things. (closes issue #12148) Reported by: jcomellas ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106239 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_phone.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'channels/chan_phone.c') diff --git a/channels/chan_phone.c b/channels/chan_phone.c index 233e5e829..48b26c160 100644 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -206,21 +206,24 @@ static int phone_indicate(struct ast_channel *chan, int condition, const void *d int res=-1; ast_debug(1, "Requested indication %d on channel %s\n", condition, chan->name); switch(condition) { - case AST_CONTROL_FLASH: - ioctl(p->fd, IXJCTL_PSTN_SET_STATE, PSTN_ON_HOOK); - usleep(320000); - ioctl(p->fd, IXJCTL_PSTN_SET_STATE, PSTN_OFF_HOOK); + case AST_CONTROL_FLASH: + ioctl(p->fd, IXJCTL_PSTN_SET_STATE, PSTN_ON_HOOK); + usleep(320000); + ioctl(p->fd, IXJCTL_PSTN_SET_STATE, PSTN_OFF_HOOK); p->lastformat = -1; res = 0; break; - case AST_CONTROL_HOLD: - ast_moh_start(chan, data, NULL); - break; - case AST_CONTROL_UNHOLD: - ast_moh_stop(chan); - break; - default: - ast_log(LOG_WARNING, "Condition %d is not supported on channel %s\n", condition, chan->name); + case AST_CONTROL_HOLD: + ast_moh_start(chan, data, NULL); + break; + case AST_CONTROL_UNHOLD: + ast_moh_stop(chan); + break; + case AST_CONTROL_SRCUPDATE: + res = 0; + break; + default: + ast_log(LOG_WARNING, "Condition %d is not supported on channel %s\n", condition, chan->name); } return res; } -- cgit v1.2.3