diff options
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_pjsip.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c index 1ca580699..b8fb35c35 100644 --- a/channels/chan_pjsip.c +++ b/channels/chan_pjsip.c @@ -1081,12 +1081,16 @@ static int update_connected_line_information(void *data) } } else { enum ast_sip_session_refresh_method method = session->endpoint->id.refresh_method; + int generate_new_sdp; struct ast_party_id connected_id; if (session->inv_session->invite_tsx && (session->inv_session->options & PJSIP_INV_SUPPORT_UPDATE)) { method = AST_SIP_SESSION_REFRESH_METHOD_UPDATE; } + /* Only the INVITE method actually needs SDP, UPDATE can do without */ + generate_new_sdp = (method == AST_SIP_SESSION_REFRESH_METHOD_INVITE); + /* * We can get away with a shallow copy here because we are * not looking at strings. @@ -1099,7 +1103,7 @@ static int update_connected_line_information(void *data) (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); + ast_sip_session_refresh(session, NULL, NULL, NULL, method, generate_new_sdp); } } |