[asterisk-commits] kharwell: trunk r398808 - in /trunk: ./ channels/ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 11 09:23:30 CDT 2013
Author: kharwell
Date: Wed Sep 11 09:23:28 2013
New Revision: 398808
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398808
Log:
pjsip: reinvite for connected line updates occurs when it should not
Connected line updates are now only sent out if an actual update needs to occur.
This happens under the following conditions:
1. The endpoint we are sending to is trusted.
2. Either a P-Asserted-Identity or Remote Party-ID header needs to be added/sent.
3. The connected id's number and name are valid.
Also added an SDP when an update is sent out.
(closes issue AST-1212)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/2831/
........
Merged revisions 398806 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/channels/chan_pjsip.c
trunk/res/res_pjsip_caller_id.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Wed Sep 11 09:23:28 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-398754,398759
+/branches/12:1-398558,398560-398577,398579-398754,398759,398806
Modified: trunk/channels/chan_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_pjsip.c?view=diff&rev=398808&r1=398807&r2=398808
==============================================================================
--- trunk/channels/chan_pjsip.c (original)
+++ trunk/channels/chan_pjsip.c Wed Sep 11 09:23:28 2013
@@ -1077,6 +1077,7 @@
static int update_connected_line_information(void *data)
{
RAII_VAR(struct ast_sip_session *, session, data, ao2_cleanup);
+ struct ast_party_id connected_id;
if ((ast_channel_state(session->channel) != AST_STATE_UP) && (session->inv_session->role == PJSIP_UAS_ROLE)) {
int response_code = 0;
@@ -1101,7 +1102,13 @@
method = AST_SIP_SESSION_REFRESH_METHOD_UPDATE;
}
- ast_sip_session_refresh(session, NULL, NULL, NULL, method, 0);
+ connected_id = ast_channel_connected_effective_id(session->channel);
+ if ((session->endpoint->id.send_pai || session->endpoint->id.send_rpid) &&
+ (session->endpoint->id.trust_outbound ||
+ ((connected_id.name.presentation & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED &&
+ (connected_id.number.presentation & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED))) {
+ ast_sip_session_refresh(session, NULL, NULL, NULL, method, 1);
+ }
}
return 0;
Modified: trunk/res/res_pjsip_caller_id.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_caller_id.c?view=diff&rev=398808&r1=398807&r2=398808
==============================================================================
--- trunk/res/res_pjsip_caller_id.c (original)
+++ trunk/res/res_pjsip_caller_id.c Wed Sep 11 09:23:28 2013
@@ -662,9 +662,6 @@
modify_id_header(tdata->pool, from, &connected_id);
modify_id_header(dlg->pool, dlg->local.info, &connected_id);
- if (should_queue_connected_line_update(session, &session->endpoint->id.self)) {
- queue_connected_line_update(session, &session->endpoint->id.self);
- }
}
add_id_headers(session, tdata, &connected_id);
}
@@ -674,7 +671,7 @@
* \brief Session supplement for outgoing INVITE response
*
* This will add P-Asserted-Identity and Remote-Party-ID headers if necessary
- *
+ *
* \param session The session on which the INVITE response is to be sent
* \param tdata The outbound INVITE response
*/
More information about the asterisk-commits
mailing list