GSM: Add audio frame type for uncompressed 16 bit frame
[lcr.git] / gsm_ms.cpp
index b3eabc4..6ef0a82 100644 (file)
@@ -84,6 +84,7 @@ void Pgsm_ms::setup_ind(unsigned int msg_type, unsigned int callref, struct gsm_
        if (p_g_callref) {
                /* release in case the ID is already in use */
                add_trace("error", NULL, "callref already in use");
        if (p_g_callref) {
                /* release in case the ID is already in use */
                add_trace("error", NULL, "callref already in use");
+reject:
                end_trace();
                mncc = create_mncc(MNCC_REJ_REQ, callref);
                gsm_trace_header(p_interface_name, this, MNCC_REJ_REQ, DIRECTION_OUT);
                end_trace();
                mncc = create_mncc(MNCC_REJ_REQ, callref);
                gsm_trace_header(p_interface_name, this, MNCC_REJ_REQ, DIRECTION_OUT);
@@ -101,6 +102,12 @@ void Pgsm_ms::setup_ind(unsigned int msg_type, unsigned int callref, struct gsm_
                trigger_work(&p_g_delete);
                return;
        }
                trigger_work(&p_g_delete);
                return;
        }
+       if (callref < 0x40000000) {
+               /* release in case the ID is invalid */
+               add_trace("error", NULL, "callref invalid, not of MS type");
+               goto reject;
+       }
+
        p_g_callref = callref;
        end_trace();
 
        p_g_callref = callref;
        end_trace();
 
@@ -277,7 +284,7 @@ void Pgsm_ms::setup_ind(unsigned int msg_type, unsigned int callref, struct gsm_
        epointlist_new(epoint->ep_serial);
 
        /* modify lchan to GSM codec V1 */
        epointlist_new(epoint->ep_serial);
 
        /* modify lchan to GSM codec V1 */
-       modify_lchan(RTP_PT_GSM_FULL);
+       modify_lchan(MEDIA_TYPE_GSM);
 
        /* send call proceeding */
        gsm_trace_header(p_interface_name, this, MNCC_CALL_CONF_REQ, DIRECTION_OUT);
 
        /* send call proceeding */
        gsm_trace_header(p_interface_name, this, MNCC_CALL_CONF_REQ, DIRECTION_OUT);