aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-04 13:45:48 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-04 13:45:48 +0000
commit723177db5622ec79b522fc8021e6668cf6cc1539 (patch)
tree5b879f523638f7bcf48a978c5366793da1264627 /apps
parent689be49934bf3a7e32eb8faa4c26c58485d112d8 (diff)
Make apps send PROGRESS control frame for early media and fix too early media issue in SIP
The issue at hand is that some legacy (dying) PBX systems send empty media frames on PRI links *before* any call progress. The SIP channel receives these frames and by default signals 183 Session progress and starts sending media. This will cause phones to play silence and ignore the later 180 ringing message. A bad user experience. The fix is twofold: - We discovered that asterisk apps that support early media ("noanswer") did not send any PROGRESS frame to indicate early media. Fixed. - We introduce a setting in chan_sip so that users can disable any relay of media frames before the outbound channel actually indicates any sort of call progress. In 1.4, 1.6.0 and 1.6.1, this will be disabled for backward compatibility. In later versions of Asterisk, this will be enabled. We don't assume that it will change your Asterisk phone experience - only for the better. We encourage third-party application developers to make sure that if they have applications that wants to send early media, add a PROGRESS control frame transmission to make sure that all channel drivers actually will start sending early media. This has not been the default in Asterisk previous to this patch, so if you got inspiration from our code, you need to update accordingly. Sorry for the trouble and thanks for your support. This code has been running for a few months in a large scale installation (over 250 servers with PRI and/or BRI links to old PBX systems). That's no proof that this is an excellent patch, but, well, it's tested :-) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@216430 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_disa.c7
-rw-r--r--apps/app_playback.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/apps/app_disa.c b/apps/app_disa.c
index 3c8bad9d4..038274057 100644
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -176,7 +176,12 @@ static int disa_exec(struct ast_channel *chan, void *data)
/* answer */
ast_answer(chan);
}
- } else special_noanswer = 1;
+ } else {
+ special_noanswer = 1;
+ if (chan->_state != AST_STATE_UP) {
+ ast_indicate(chan, AST_CONTROL_PROGRESS);
+ }
+ }
i = k = x = 0; /* k is 0 for pswd entry, 1 for ext entry */
did_ignore = 0;
exten[0] = 0;
diff --git a/apps/app_playback.c b/apps/app_playback.c
index 6763bd917..972435f18 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -418,9 +418,13 @@ static int playback_exec(struct ast_channel *chan, void *data)
if (option_skip) {
/* At the user's option, skip if the line is not up */
goto done;
- } else if (!option_noanswer)
+ } else if (!option_noanswer) {
/* Otherwise answer unless we're supposed to send this while on-hook */
res = ast_answer(chan);
+ } else {
+ ast_indicate(chan, AST_CONTROL_PROGRESS);
+ }
+
}
if (!res) {
char *back = args.filenames;