summaryrefslogtreecommitdiff
path: root/channels/chan_pjsip.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2015-03-24 19:26:11 +0000
committerRichard Mudgett <rmudgett@digium.com>2015-03-24 19:26:11 +0000
commitb1e9552b087c68d412d6233034a1ad6e4eda02bd (patch)
treeab61915028cc122d160f4b6e6161104c0b8017d7 /channels/chan_pjsip.c
parenta3fe43fbdc89aa51e266360dc93ed4a4445bebdb (diff)
chan_pjsip: Add "rpid_immediate" option to prevent unnecessary "180 Ringing" messages.
Incoming PJSIP call legs that have not been answered yet send unnecessary "180 Ringing" or "183 Progress" messages every time a connected line update happens. If the outgoing channel is also PJSIP then the incoming channel will always send a "180 Ringing" or "183 Progress" message when the outgoing channel sends the INVITE. Consequences of these unnecessary messages: * The caller can start hearing ringback before the far end even gets the call. * Many phones tend to grab the first connected line information and refuse to update the display if it changes. The first information is not likely to be correct if the call goes to an endpoint not under the control of the first Asterisk box. When connected line first went into Asterisk in v1.8, chan_sip received an undocumented option "rpid_immediate" that defaults to disabled. When enabled, the option immediately passes connected line update information to the caller in "180 Ringing" or "183 Progress" messages as described above. * Added "rpid_immediate" option to prevent unnecessary "180 Ringing" or "183 Progress" messages. The default is "no" to disable sending the unnecessary messages. ASTERISK-24781 #close Reported by: Richard Mudgett Review: https://reviewboard.asterisk.org/r/4473/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_pjsip.c')
-rw-r--r--channels/chan_pjsip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 675a9f9c4..c4cdca83a 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -1117,7 +1117,8 @@ static int update_connected_line_information(void *data)
ast_sip_session_refresh(session, NULL, NULL, NULL, method, generate_new_sdp);
}
- } else if (session->inv_session->state != PJSIP_INV_STATE_DISCONNECTED
+ } else if (session->endpoint->rpid_immediate
+ && session->inv_session->state != PJSIP_INV_STATE_DISCONNECTED
&& is_colp_update_allowed(session)) {
int response_code = 0;