Kaynağa Gözat

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

- previously only set when callee was also SCA
Andrew Mortensen 12 yıl önce
ebeveyn
işleme
9cb26a2eef
1 değiştirilmiş dosya ile 6 ekleme ve 3 silme
  1. 6 3
      modules/sca/sca_call_info.c

+ 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 ) {
     if ( call_info != NULL ) {
 	/* this implies To-AoR is SCA */
 	/* this implies To-AoR is SCA */
-
 	rc = sca_call_info_uri_update( to_aor, call_info, from, to,
 	rc = sca_call_info_uri_update( to_aor, call_info, from, to,
 			contact_uri, &msg->callid->body );
 			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 )) {
     if ( !sca_uri_is_shared_appearance( sca, from_aor )) {
 	goto done;
 	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
      * 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
      * dialog for the From URI. if we don't find one, this isn't an SCA