Confirmed users
69
edits
| 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) { | ||
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), | |||
GET_LINE_ID(call_handle), __FUNCTION__)); | |||
return cc_invokeFeatureSDPMode(call_handle, CC_FEATURE_SETPEERCONNECTION, JSEP_NO_ACTION, | |||
0, 0, NO_STREAM, 0, constraints, pc, NULL); | |||
} | } | ||
* 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: | ||
PR_ASSERT(strlen(data) < PC_HANDLE_SIZE); | |||
if (strlen(data) >= PC_HANDLE_SIZE) | if (strlen(data) >= PC_HANDLE_SIZE) | ||
return; | return; | ||
sstrncpy(featdata.pc.pc_handle, data, sizeof(featdata.pc.pc_handle)); | |||
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; | ||