All pastes #203434 Raw Edit

Anonymous

public text v1 · immutable
#203434 ·published 2006-10-15 04:10 UTC
rendered paste body
Index: mod_sofia.c
===================================================================
--- mod_sofia.c (revision 3050)
+++ mod_sofia.c (working copy)
@@ -820,6 +820,7 @@
 
 static void do_invite(switch_core_session_t *session)
 {
+       char rpid[1024];
        private_object_t *tech_pvt;
     switch_channel_t *channel = NULL;
        switch_caller_profile_t *caller_profile;   
@@ -847,6 +847,9 @@
 
                switch_set_flag_locked(tech_pvt, TFLAG_READY);
 
+               // forge a RPID for now KHR  -- Should wrap this in an if statement so it can be turned on and off
+               snprintf(rpid, sizeof(rpid) - 1, "Remote-Party-ID: %s;party=calling;screen=yes;privacy=off", tech_pvt->from_str);
+
                if (!tech_pvt->nh) {
                        tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL,
                                                                          SIPTAG_TO_STR(tech_pvt->dest),
@@ -860,6 +863,7 @@
                }
 
                nua_invite(tech_pvt->nh,
+                                  TAG_IF(rpid, SIPTAG_HEADER_STR(rpid)),
                                   SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
                                   SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
                                   SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL),