2
0
Эх сурвалжийг харах

sca: ensure SCA caller has correct callee CLI when callee is non-SCA.

- previously only set when callee was also SCA
Andrew Mortensen 12 жил өмнө
parent
commit
9cb26a2eef

+ 6 - 3
modules/sca/sca_call_info.c

@@ -1185,17 +1185,20 @@ sca_call_info_invite_reply_200_handler( sip_msg_t *msg,
 
     if ( call_info != NULL ) {
 	/* this implies To-AoR is SCA */
-
 	rc = sca_call_info_uri_update( to_aor, call_info, from, to,
 			contact_uri, &msg->callid->body );
-
-	rc = sca_call_info_insert_asserted_identity( msg, contact_uri, to );
     }
 
     if ( !sca_uri_is_shared_appearance( sca, from_aor )) {
 	goto done;
     }
 
+    if ( sca_call_info_insert_asserted_identity( msg, contact_uri, to ) < 0 ) {
+	LM_WARN( "sca_call_info_invite_reply_200_handler: failed to "
+		"add P-Asserted-Identity header to response from %.*s",
+		STR_FMT( contact_uri ));
+    }
+
     /*
      * XXX in a reply with no Call-Info header, we look for a matching
      * dialog for the From URI. if we don't find one, this isn't an SCA