]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
properly set rpid screen=
authorMichael Jerris <mike@jerris.com>
Thu, 7 Dec 2006 19:34:17 +0000 (19:34 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 7 Dec 2006 19:34:17 +0000 (19:34 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3568 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index f3d4af40e9375c3c846f9fc12a97845afb4d1f41..048e391b36bbf800ef7be4ef7999d1282d9bc68a 100644 (file)
@@ -951,7 +951,7 @@ static void do_invite(switch_core_session_t *session)
                // forge a RPID for now KHR  -- Should wrap this in an if statement so it can be turned on and off
                if (switch_test_flag(caller_profile, SWITCH_CPF_SCREEN)) {
                        char *priv = "no";
-                       
+                       char *screen = "no";
                        if (switch_test_flag(caller_profile, SWITCH_CPF_HIDE_NAME)) {
                                priv = "name";
                                if (switch_test_flag(caller_profile, SWITCH_CPF_HIDE_NUMBER)) {
@@ -960,8 +960,11 @@ static void do_invite(switch_core_session_t *session)
                        } else if (switch_test_flag(caller_profile, SWITCH_CPF_HIDE_NUMBER)) {
                                priv = "yes";
                        }
+                       if (switch_test_flag(caller_profile, SWITCH_CPF_SCREEN)) {
+                               screen = "yes";
+                       }
 
-                       snprintf(rpid, sizeof(rpid) - 1, "Remote-Party-ID: %s;party=calling;screen=yes;privacy=%s", tech_pvt->from_str, priv);
+                       snprintf(rpid, sizeof(rpid) - 1, "Remote-Party-ID: %s;party=calling;screen=%s;privacy=%s", tech_pvt->from_str, screen, priv);
                                                                
                }