Media/WebRTC/SIPCCMessaging: Difference between revisions

Jump to navigation Jump to search
Line 40: Line 40:


   "SETPEERCONNECTION",   
   "SETPEERCONNECTION",   
* In the same file add in <code>cc_msg_t<code>
  CC_MSG_SETPEERCONNECTION,
* and in <code>cc_msg_names</code>
  "SETPEERCONNECTION",


* Implement the feature send which is a wrapper around a CPR send. The declaration goes in
* Implement the feature send which is a wrapper around a CPR send. The declaration goes in
Line 50: Line 58:


   cc_return_t CC_CallFeature_SetPeerConnection(cc_call_handle_t call_handle, cc_peerconnection_t pc) {
   cc_return_t CC_CallFeature_SetPeerConnection(cc_call_handle_t call_handle, cc_peerconnection_t pc) {
  static const char fname[] = "CC_CallFeature_SetPeerConnection";
      cc_media_constraints_t *constraints = NULL;
  CCAPP_DEBUG(DEB_L_C_F_PREFIX, DEB_L_C_F_PREFIX_ARGS(SIP_CC_PROV, GET_CALL_ID(call_handle),
      CCAPP_DEBUG(DEB_L_C_F_PREFIX, DEB_L_C_F_PREFIX_ARGS(SIP_CC_PROV, GET_CALL_ID(call_handle),
  GET_LINE_ID(call_handle), fname));
                  GET_LINE_ID(call_handle), __FUNCTION__));
    
    
  return cc_invokeFeature(call_handle, CC_FEATURE_SETPEERCONNECTION,  
      return cc_invokeFeatureSDPMode(call_handle, CC_FEATURE_SETPEERCONNECTION, JSEP_NO_ACTION,
            CC_SDP_MAX_QOS_DIRECTIONS, JSEP_NO_ACTION, pc);
                                    0, 0, NO_STREAM, 0, constraints, pc, NULL);
          return 0;
   }
   }


 
* On the other end of the message queue (in ccapp), we need to handle the event. We add new code to: <code>media/webrtc/signaling/src/sipcc/core/ccapp/ccprovider.c</code> in <code>processSessionEvent</code>:
* On the other end of the message queue (in ccapp), we need to handle the event. We add new code to <code>media/webrtc/signaling/src/sipcc/core/ccapp/ccprovider.c</code> in <code>processSessionEvent</code>:


         case CC_FEATURE_SETPEERCONNECTION:
         case CC_FEATURE_SETPEERCONNECTION:
           assert(strlen(data) < PC_HANDLE_SIZE);
           PR_ASSERT(strlen(data) < PC_HANDLE_SIZE);
           if (strlen(data) >= PC_HANDLE_SIZE)
           if (strlen(data) >= PC_HANDLE_SIZE)
             return;
             return;
         
 
           strncpy(data, featdata.pc.pc_handle, PC_HANDLE_SIZE - 1);
           sstrncpy(featdata.pc.pc_handle, data, sizeof(featdata.pc.pc_handle));
         
 
           cc_feature(CC_SRC_UI, call_id, (line_t)instance,
           cc_int_feature2(CC_MSG_SETPEERCONNECTION, CC_SRC_UI, CC_SRC_GSM,
            call_id, (line_t)instance,
             CC_FEATURE_SETPEERCONNECTION, &featdata);
             CC_FEATURE_SETPEERCONNECTION, &featdata);
           break;
           break;
Confirmed users
69

edits

Navigation menu