Example #1
0
/**
 * This function will process SUBSCRIBED feature NOTIFY messages.
 *
 * @param[in] msg - pointer to ccsip_sub_not_data_t
 *
 * @return none
 *
 * @pre (msg != NULL)
 */
static void sub_process_b2bcnf_sub_resp (ccsip_sub_not_data_t *msg)
{
    static const char fname[] = "sub_process_b2bcnf_sub_resp";

    callid_t                 call_id = CC_NO_CALL_ID;
    callid_t                other_call_id = CC_NO_CALL_ID;
    cc_causes_t            cause;

    fsmb2bcnf_get_sub_call_id_from_ccb ((fsmcnf_ccb_t *)(msg->request_id),
                                        &call_id, &other_call_id);

    if (msg->u.subs_result_data.status_code == 200 ||
        msg->u.subs_result_data.status_code == 202 )  {

        cause = CC_CAUSE_OK;

        GSM_DEBUG(DEB_F_PREFIX"B2BCNF subs response  = OK\n", 
                DEB_F_PREFIX_ARGS(GSM,fname)); 

    } else {

        GSM_DEBUG(DEB_F_PREFIX"B2BCNF subs response  = ERROR\n", 
                DEB_F_PREFIX_ARGS(GSM,fname)); 

        cause = CC_CAUSE_ERROR;
    }

    cc_feature_ack(CC_SRC_GSM, call_id, msg->line_id, CC_FEATURE_B2BCONF, NULL, cause);
}
Example #2
0
void sip_cc_feature_ack (callid_t call_id, line_t line, cc_features_t feature,
                         void *data, cc_causes_t cause)
{
    cc_feature_ack(CC_SRC_SIP, call_id, line, feature, (cc_feature_data_t *)data, cause);
}