Bug 805533 Send SDP parse errors through single function for reporting r=jesup
authorEthan Hugg <ethanhugg@gmail.com>
Fri, 26 Oct 2012 13:05:50 -0700
changeset 111737 26bc10a97fcdfbb67f07b8af7ef6cc4e31326606
parent 111736 651c802473d593e33098b57460363732140dfc95
child 111738 a39913319ce6520429ea3aa32fe1eac429cb660a
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersjesup
bugs805533
milestone19.0a1
Bug 805533 Send SDP parse errors through single function for reporting r=jesup
media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
media/webrtc/signaling/src/sipcc/core/includes/ccapi.h
media/webrtc/signaling/src/sipcc/core/sdp/sdp.h
media/webrtc/signaling/src/sipcc/core/sdp/sdp_access.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr_access.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_config.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_main.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_os_defs.h
media/webrtc/signaling/src/sipcc/core/sdp/sdp_private.h
media/webrtc/signaling/src/sipcc/core/sdp/sdp_services_unix.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_services_win32.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_token.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_utils.c
media/webrtc/signaling/src/sipcc/core/sipstack/ccsip_core.c
media/webrtc/signaling/src/sipcc/core/sipstack/ccsip_sdp.c
media/webrtc/signaling/src/sipcc/core/sipstack/h/ccsip_sdp.h
media/webrtc/signaling/src/sipcc/include/cc_constants.h
--- a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
+++ b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
@@ -69,17 +69,17 @@ static sll_lite_list_t gsmsdp_free_media
 
 typedef enum {
     MEDIA_TABLE_GLOBAL,
     MEDIA_TABLE_SESSION
 } media_table_e;
 
 /* Forward references */
 static cc_causes_t
-gsmsdp_init_local_sdp (cc_sdp_t **sdp_pp);
+gsmsdp_init_local_sdp (const char *peerconnection, cc_sdp_t **sdp_pp);
 
 static void
 gsmsdp_set_media_capability(fsmdef_media_t *media,
                             const cc_media_cap_t *media_cap);
 static fsmdef_media_t *
 gsmsdp_add_media_line(fsmdef_dcb_t *dcb_p, const cc_media_cap_t *media_cap,
                       uint8_t cap_index, uint16_t level,
                       cpr_ip_type addr_type);
@@ -2237,17 +2237,17 @@ gsmsdp_update_local_sdp_media (fsmdef_dc
     port  = media->src_port;
 
     config_get_value(CFGID_SDPMODE, &sdpmode, sizeof(sdpmode));
 
     sdp_p = cc_sdp_p ? (void *) cc_sdp_p->src_sdp : NULL;
 
     if (sdp_p == NULL) {
 
-        gsmsdp_init_local_sdp(&(dcb_p->sdp));
+        gsmsdp_init_local_sdp(dcb_p->peerconnection, &(dcb_p->sdp));
 
         cc_sdp_p = dcb_p->sdp;
         if ((cc_sdp_p == NULL) || (cc_sdp_p->src_sdp == NULL)) {
             GSM_ERR_MSG(GSM_L_C_F_PREFIX"sdp is NULL and init failed \n",
                     dcb_p->line, dcb_p->call_id, fname);
             return;
         }
         sdp_p = (void *) cc_sdp_p->src_sdp;
@@ -4388,37 +4388,38 @@ gsmsdp_get_offered_media_types (fsm_fcb_
  *
  * v= line
  * o= line <username><session id><version><network type><address type><address>
  * s= line
  * t= line <start time><stop time>
  *
  * Parameters:
  *
+ * peerconnection - handle to peerconnection object
  * sdp_pp     - Pointer to the local sdp
  *
  * returns    cc_causes_t
  *            CC_CAUSE_OK - indicates success
  *            CC_CAUSE_ERROR - indicates failure
  */
 static cc_causes_t
-gsmsdp_init_local_sdp (cc_sdp_t **sdp_pp)
+gsmsdp_init_local_sdp (const char *peerconnection, cc_sdp_t **sdp_pp)
 {
     char            addr_str[MAX_IPADDR_STR_LEN];
     cpr_ip_addr_t   ipaddr;
     unsigned long   session_id = 0;
     char            session_version_str[GSMSDP_VERSION_STR_LEN];
     void           *local_sdp_p = NULL;
     cc_sdp_t       *sdp_p = NULL;
     int             nat_enable = 0;
     char           *p_addr_str;
     cpr_ip_mode_e   ip_mode;
     char           *strtok_state;
 
-    if (!sdp_pp) {
+    if (!peerconnection || !sdp_pp) {
         return CC_CAUSE_ERROR;
     }
 
     ip_mode = platform_get_ip_address_mode();
     /*
      * Get device address. We will need this later.
      */
     config_get_value(CFGID_NAT_ENABLE, &nat_enable, sizeof(nat_enable));
@@ -4436,23 +4437,25 @@ gsmsdp_init_local_sdp (cc_sdp_t **sdp_pp
 	ipaddr2dotted(addr_str, &ipaddr);
 
     p_addr_str = PL_strtok_r(addr_str, "[ ]", &strtok_state);
 
     /*
      * Create the local sdp struct
      */
     if (*sdp_pp == NULL) {
-        sipsdp_src_dest_create(CCSIP_SRC_SDP_BIT, sdp_pp);
+        sipsdp_src_dest_create(peerconnection,
+            CCSIP_SRC_SDP_BIT, sdp_pp);
     } else {
         sdp_p = *sdp_pp;
         if (sdp_p->src_sdp != NULL) {
             sipsdp_src_dest_free(CCSIP_SRC_SDP_BIT, sdp_pp);
         }
-        sipsdp_src_dest_create(CCSIP_SRC_SDP_BIT, sdp_pp);
+        sipsdp_src_dest_create(peerconnection,
+            CCSIP_SRC_SDP_BIT, sdp_pp);
     }
     sdp_p = *sdp_pp;
 
     if ( sdp_p == NULL )
        return CC_CAUSE_ERROR;
 
     local_sdp_p = sdp_p->src_sdp;
 
@@ -4702,17 +4705,18 @@ gsmsdp_create_local_sdp (fsmdef_dcb_t *d
     const cc_media_cap_t       *media_cap;
     cpr_ip_mode_e   ip_mode;
     uint8_t         cap_index;
     fsmdef_media_t  *media;
     boolean         has_audio;
     int             sdpmode = 0;
     boolean         media_enabled;
 
-    if ( CC_CAUSE_OK != gsmsdp_init_local_sdp(&(dcb_p->sdp)) )
+    if ( CC_CAUSE_OK != gsmsdp_init_local_sdp(dcb_p->peerconnection,
+        &(dcb_p->sdp)) )
       return CC_CAUSE_ERROR;
 
     config_get_value(CFGID_SDPMODE, &sdpmode, sizeof(sdpmode));
 
     dcb_p->src_sdp_version = 0;
 
     media_cap_tbl = dcb_p->media_cap_tbl;
 
@@ -4828,18 +4832,18 @@ gsmsdp_create_local_sdp (fsmdef_dcb_t *d
  * @return                  none.
  * @pre              (sdp_pp not_eq NULL)
  */
 void
 gsmsdp_create_options_sdp (cc_sdp_t ** sdp_pp)
 {
     cc_sdp_t *sdp_p;
 
-
-    if (gsmsdp_init_local_sdp(sdp_pp) == CC_CAUSE_ERROR) {
+    /* This empty string represents to associated peerconnection object */
+    if (gsmsdp_init_local_sdp("", sdp_pp) == CC_CAUSE_ERROR) {
         return;
     }
 
     sdp_p = *sdp_pp;
 
     /*
      * Insert media line at level 1.
      */
@@ -5581,17 +5585,18 @@ cc_causes_t
 gsmsdp_encode_sdp_and_update_version (fsmdef_dcb_t *dcb_p, cc_msgbody_info_t *msg_body)
 {
     char version_str[GSMSDP_VERSION_STR_LEN];
 
     snprintf(version_str, sizeof(version_str), "%d", dcb_p->src_sdp_version);
 
     if ( dcb_p->sdp == NULL || dcb_p->sdp->src_sdp == NULL )
     {
-    	if ( CC_CAUSE_OK != gsmsdp_init_local_sdp(&(dcb_p->sdp)) )
+    	if ( CC_CAUSE_OK != gsmsdp_init_local_sdp(dcb_p->peerconnection,
+            &(dcb_p->sdp)) )
     	{
     		return CC_CAUSE_ERROR;
     	}
     }
     (void) sdp_set_owner_version(dcb_p->sdp->src_sdp, version_str);
 
     if (gsmsdp_encode_sdp(dcb_p->sdp, msg_body) != CC_CAUSE_OK) {
         return CC_CAUSE_ERROR;
@@ -5673,27 +5678,29 @@ gsmsdp_get_sdp_body (cc_msgbody_info_t *
  * cc_causes_t to indicate failure or success.
  */
 static cc_causes_t
 gsmsdp_realloc_dest_sdp (fsmdef_dcb_t *dcb_p)
 {
     /* There are SDPs to process, prepare for parsing the SDP */
     if (dcb_p->sdp == NULL) {
         /* Create internal SDP information block with dest sdp block */
-        sipsdp_src_dest_create(CCSIP_DEST_SDP_BIT, &dcb_p->sdp);
+        sipsdp_src_dest_create(dcb_p->peerconnection,
+            CCSIP_DEST_SDP_BIT, &dcb_p->sdp);
     } else {
         /*
          * SDP info. block exists, remove the previously received
          * remote or destination SDP and create a new one for
          * the new SDP.
          */
         if (dcb_p->sdp->dest_sdp) {
             sipsdp_src_dest_free(CCSIP_DEST_SDP_BIT, &dcb_p->sdp);
         }
-        sipsdp_src_dest_create(CCSIP_DEST_SDP_BIT, &dcb_p->sdp);
+        sipsdp_src_dest_create(dcb_p->peerconnection,
+            CCSIP_DEST_SDP_BIT, &dcb_p->sdp);
     }
 
     /* No SDP info block and parsed control block are available */
     if ((dcb_p->sdp == NULL) || (dcb_p->sdp->dest_sdp == NULL)) {
         /* Unable to create internal SDP structure to parse SDP. */
         return CC_CAUSE_ERROR;
     }
     return CC_CAUSE_OK;
@@ -5882,17 +5889,17 @@ gsmsdp_process_offer_sdp (fsm_fcb_t *fcb
         }
     }
     if (status != CC_CAUSE_OK) {
         /* Error parsing SDP */
         return status;
     }
 
     if (init) {
-        (void)gsmsdp_init_local_sdp(&(dcb_p->sdp));
+        (void)gsmsdp_init_local_sdp(dcb_p->peerconnection, &(dcb_p->sdp));
         /* Note that there should not a previous version here as well */
     }
 
     gsmsdp_set_remote_sdp(dcb_p, dcb_p->sdp);
 
     return (status);
 }
 
--- a/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h
+++ b/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h
@@ -19,17 +19,16 @@ typedef unsigned int cc_select_state_e;
 typedef unsigned int cc_call_type_e;
 typedef unsigned int cc_policy_e;
 typedef int cc_causes_t;
 #define  CC_CALL_OUTGOMING  CC_CALL_TYPE_OUTGOING
 #define  CC_CALL_FORWARDED  CC_CALL_TYPE_FORWARDED
 #define  CC_CALL_NONE       CC_CALL_TYPE_NONE
 #define  CC_CALL_INCOMING   CC_CALL_TYPE_INCOMING
 #define  SDP_SIZE           4096   /* must increase this */
-#define  PC_HANDLE_SIZE     17 /* 8 random bytes in hex plus null */
 #define  CANDIDATE_SIZE     150
 #define  MID_SIZE           150
 
 #include "sessionConstants.h"
 
 typedef int  cc_features_t;
 typedef unsigned int softkey_events;
 typedef unsigned int cc_call_priority_e;
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp.h
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp.h
@@ -1,15 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _SDP_H_
 #define _SDP_H_
 
+#include "cc_constants.h"
 #include "sdp_os_defs.h"
 #include "ccsdp.h"
 
 /* SDP Defines */
 
 /* The following defines are used to indicate params that are specified
  * as the choose parameter or parameters that are invalid.  These can
  * be used where the value required is really a u16, but is represented
@@ -505,16 +506,539 @@ typedef enum sdp_srtp_crypto_suite_t_ {
  */
 #define SDP_SRTP_AES_CM_128_HMAC_SHA1_32_KEY_BYTES	16
 #define SDP_SRTP_AES_CM_128_HMAC_SHA1_32_SALT_BYTES	14
 #define SDP_SRTP_AES_CM_128_HMAC_SHA1_80_KEY_BYTES	16
 #define SDP_SRTP_AES_CM_128_HMAC_SHA1_80_SALT_BYTES	14
 #define SDP_SRTP_F8_128_HMAC_SHA1_80_KEY_BYTES		16
 #define SDP_SRTP_F8_128_HMAC_SHA1_80_SALT_BYTES	14
 
+/* SDP Defines */
+
+#define SDP_MAX_STRING_LEN      256  /* Max len for SDP string       */
+#define SDP_MAX_SHORT_STRING_LEN      12  /* Max len for a short SDP string  */
+#define SDP_MAX_PAYLOAD_TYPES   23  /* Max payload types in m= line */
+#define SDP_TOKEN_LEN           2   /* Len of <token>=              */
+#define SDP_CURRENT_VERSION     0   /* Current default SDP version  */
+#define SDP_MAX_PORT_PARAMS     4   /* Max m= port params - x/x/x/x */
+#define SDP_MIN_DYNAMIC_PAYLOAD 96  /* Min dynamic payload */
+#define SDP_MAX_DYNAMIC_PAYLOAD 127 /* Max dynamic payload */
+#define SDP_MIN_CIF_VALUE 1  /* applies to all  QCIF,CIF,CIF4,CIF16,SQCIF */
+#define SDP_MAX_CIF_VALUE 32 /* applies to all  QCIF,CIF,CIF4,CIF16,SQCIF */
+#define SDP_MAX_SRC_ADDR_LIST  1 /* Max source addrs for which filter applies */
+
+
+#define SDP_DEFAULT_PACKETIZATION_MODE_VALUE 0 /* max packetization mode for H.264 */
+#define SDP_MAX_PACKETIZATION_MODE_VALUE 2 /* max packetization mode for H.264 */
+
+#define SDP_MAX_LEVEL_ASYMMETRY_ALLOWED_VALUE 1 /* max level asymmetry allowed value for H.264 */
+#define SDP_DEFAULT_LEVEL_ASYMMETRY_ALLOWED_VALUE 1 /* default level asymmetry allowed value for H.264 */
+#define SDP_INVALID_LEVEL_ASYMMETRY_ALLOWED_VALUE 2 /* invalid value for level-asymmetry-allowed param for H.264 */
+
+
+/* Max number of stream ids that can be grouped together */
+#define SDP_MAX_GROUP_STREAM_ID 10
+
+
+#define SDP_MAGIC_NUM           0xabcdabcd
+
+#define SDP_UNSUPPORTED         "Unsupported"
+#define SDP_MAX_LINE_LEN   256 /* Max len for SDP Line */
+
+#define SDP_MAX_PROFILE_VALUE  10
+#define SDP_MAX_LEVEL_VALUE    100
+#define SDP_MIN_PROFILE_LEVEL_VALUE 0
+#define SDP_MAX_TTL_VALUE  255
+#define SDP_MIN_MCAST_ADDR_HI_BIT_VAL 224
+#define SDP_MAX_MCAST_ADDR_HI_BIT_VAL 239
+
+/* SDP Enum Types */
+
+typedef enum {
+    SDP_ERR_INVALID_CONF_PTR,
+    SDP_ERR_INVALID_SDP_PTR,
+    SDP_ERR_INTERNAL,
+    SDP_MAX_ERR_TYPES
+} sdp_errmsg_e;
+
+/* SDP Structure Definitions */
+
+/* String names of varios tokens */
+typedef struct {
+    char                     *name;
+    u8                        strlen;
+} sdp_namearray_t;
+
+/* c= line info */
+typedef struct {
+    sdp_nettype_e             nettype;
+    sdp_addrtype_e            addrtype;
+    char                      conn_addr[SDP_MAX_STRING_LEN+1];
+    tinybool                  is_multicast;
+    u16                       ttl;
+    u16                       num_of_addresses;
+} sdp_conn_t;
+
+/* t= line info */
+typedef struct sdp_timespec {
+    char                      start_time[SDP_MAX_STRING_LEN+1];
+    char                      stop_time[SDP_MAX_STRING_LEN+1];
+    struct sdp_timespec      *next_p;
+} sdp_timespec_t;
+
+
+/* k= line info */
+typedef struct sdp_encryptspec {
+    sdp_encrypt_type_e        encrypt_type;
+    char              encrypt_key[SDP_MAX_STRING_LEN+1];
+} sdp_encryptspec_t;
+
+
+/* FMTP attribute deals with named events in the range of 0-255 as
+ * defined in RFC 2833 */
+#define SDP_MIN_NE_VALUE      0
+#define SDP_MAX_NE_VALUES     256
+#define SDP_NE_BITS_PER_WORD  ( sizeof(u32) * 8 )
+#define SDP_NE_NUM_BMAP_WORDS ((SDP_MAX_NE_VALUES + SDP_NE_BITS_PER_WORD - 1)/SDP_NE_BITS_PER_WORD )
+#define SDP_NE_BIT_0          ( 0x00000001 )
+#define SDP_NE_ALL_BITS       ( 0xFFFFFFFF )
+
+#define SDP_DEINT_BUF_REQ_FLAG   0x1
+#define SDP_INIT_BUF_TIME_FLAG   0x2
+#define SDP_MAX_RCMD_NALU_SIZE_FLAG   0x4
+#define SDP_DEINT_BUF_CAP_FLAG   0x8
+
+typedef struct sdp_fmtp {
+    u16                       payload_num;
+    u32                       maxval;  /* maxval optimizes bmap search */
+    u32                       bmap[ SDP_NE_NUM_BMAP_WORDS ];
+    sdp_fmtp_format_type_e    fmtp_format; /* Gives the format type
+                                              for FMTP attribute*/
+    tinybool                  annexb_required;
+    tinybool                  annexa_required;
+
+    tinybool                  annexa;
+    tinybool                  annexb;
+    u32                       bitrate;
+    u32                       mode;
+
+    /* some OPUS specific fmtp params */
+    u32                       maxaveragebitrate;
+    u16                       usedtx;
+    u16                       stereo;
+    u16                       useinbandfec;
+    char                      maxcodedaudiobandwidth[SDP_MAX_STRING_LEN+1];
+    u16                       cbr;
+
+    /* some Data Channel specific fmtp params */
+    u16                       streams;   /* Num streams per Data Channel */
+    char                      protocol[SDP_MAX_STRING_LEN+1];
+
+    /* BEGIN - All Video related FMTP parameters */
+    u16                       qcif;
+    u16                       cif;
+    u16                       maxbr;
+    u16                       sqcif;
+    u16                       cif4;
+    u16                       cif16;
+
+    u16                       custom_x;
+    u16                       custom_y;
+    u16                       custom_mpi;
+    /* CUSTOM=360,240,4 implies X-AXIS=360, Y-AXIS=240; MPI=4 */
+    u16                       par_width;
+    u16                       par_height;
+    /* PAR=12:11 implies par_width=12, par_height=11 */
+
+    /* CPCF should be a float. IOS does not support float and so it is u16 */
+    /* For portable stack, CPCF should be defined as float and the parsing should
+     * be modified accordingly */
+    u16                       cpcf;
+    u16                       bpp;
+    u16                       hrd;
+
+    int16                     profile;
+    int16                     level;
+    tinybool                  is_interlace;
+
+    /* some more H.264 specific fmtp params */
+    char              profile_level_id[SDP_MAX_STRING_LEN+1];
+    char                      parameter_sets[SDP_MAX_STRING_LEN+1];
+    u16                       packetization_mode;
+    u16                       level_asymmetry_allowed;
+    u16                       interleaving_depth;
+    u32                       deint_buf_req;
+    u32                       max_don_diff;
+    u32                       init_buf_time;
+
+    u32                       max_mbps;
+    u32                       max_fs;
+    u32                       max_cpb;
+    u32                       max_dpb;
+    u32                       max_br;
+    tinybool                  redundant_pic_cap;
+    u32                       deint_buf_cap;
+    u32                       max_rcmd_nalu_size;
+    tinybool                  parameter_add;
+
+    tinybool                  annex_d;
+
+    tinybool                  annex_f;
+    tinybool                  annex_i;
+    tinybool                  annex_j;
+    tinybool                  annex_t;
+
+    /* H.263 codec requires annex K,N and P to have values */
+    u16                       annex_k_val;
+    u16                       annex_n_val;
+
+    /* Annex P can take one or more values in the range 1-4 . e.g P=1,3 */
+    u16                       annex_p_val_picture_resize; /* 1 = four; 2 = sixteenth */
+    u16                       annex_p_val_warp; /* 3 = half; 4=sixteenth */
+
+    u8                        flag;
+
+  /* END - All Video related FMTP parameters */
+
+} sdp_fmtp_t;
+
+/* a=qos|secure|X-pc-qos|X-qos info */
+typedef struct sdp_qos {
+    sdp_qos_strength_e        strength;
+    sdp_qos_dir_e             direction;
+    tinybool                  confirm;
+    sdp_qos_status_types_e    status_type;
+} sdp_qos_t;
+
+/* a=curr:qos status_type direction */
+typedef struct sdp_curr {
+    sdp_curr_type_e           type;
+    sdp_qos_status_types_e    status_type;
+    sdp_qos_dir_e             direction;
+} sdp_curr_t;
+
+/* a=des:qos strength status_type direction */
+typedef struct sdp_des {
+    sdp_des_type_e            type;
+    sdp_qos_strength_e        strength;
+    sdp_qos_status_types_e    status_type;
+    sdp_qos_dir_e             direction;
+} sdp_des_t;
+
+/* a=conf:qos status_type direction */
+typedef struct sdp_conf {
+    sdp_conf_type_e           type;
+    sdp_qos_status_types_e    status_type;
+    sdp_qos_dir_e             direction;
+} sdp_conf_t;
+
+
+/* a=rtpmap or a=sprtmap info */
+typedef struct sdp_transport_map {
+    u16                       payload_num;
+    char                      encname[SDP_MAX_STRING_LEN+1];
+    u32                       clockrate;
+    u16                       num_chan;
+} sdp_transport_map_t;
+
+
+/* a=rtr info */
+typedef struct sdp_rtr {
+    tinybool                  confirm;
+} sdp_rtr_t;
+
+/* a=subnet info */
+typedef struct sdp_subnet {
+    sdp_nettype_e             nettype;
+    sdp_addrtype_e            addrtype;
+    char                      addr[SDP_MAX_STRING_LEN+1];
+    int32                     prefix;
+} sdp_subnet_t;
+
+
+/* a=X-pc-codec info */
+typedef struct sdp_pccodec {
+    u16                       num_payloads;
+    ushort                    payload_type[SDP_MAX_PAYLOAD_TYPES];
+} sdp_pccodec_t;
+
+/* a=direction info */
+typedef struct sdp_comediadir {
+    sdp_mediadir_role_e      role;
+    tinybool                 conn_info_present;
+    sdp_conn_t               conn_info;
+    u32                      src_port;
+} sdp_comediadir_t;
+
+
+
+/* a=silenceSupp info */
+typedef struct sdp_silencesupp {
+    tinybool                  enabled;
+    tinybool                  timer_null;
+    u16                       timer;
+    sdp_silencesupp_pref_e    pref;
+    sdp_silencesupp_siduse_e  siduse;
+    tinybool                  fxnslevel_null;
+    u8                        fxnslevel;
+} sdp_silencesupp_t;
+
+
+/*
+ * a=mptime info */
+/* Note that an interval value of zero corresponds to
+ * the "-" syntax on the a= line.
+ */
+typedef struct sdp_mptime {
+    u16                       num_intervals;
+    ushort                    intervals[SDP_MAX_PAYLOAD_TYPES];
+} sdp_mptime_t;
+
+/*
+ * a=X-sidin:<val>, a=X-sidout:< val> and a=X-confid: <val>
+ * Stream Id,ConfID related attributes to be used for audio/video conferencing
+ *
+*/
+
+typedef struct sdp_stream_data {
+    char                      x_sidin[SDP_MAX_STRING_LEN+1];
+    char                      x_sidout[SDP_MAX_STRING_LEN+1];
+    char                      x_confid[SDP_MAX_STRING_LEN+1];
+    sdp_group_attr_e          group_attr; /* FID or LS */
+    u16                       num_group_id;
+    u16                       group_id_arr[SDP_MAX_GROUP_STREAM_ID];
+} sdp_stream_data_t;
+
+/*
+ * a=source-filter:<filter-mode> <filter-spec>
+ * <filter-spec> = <nettype> <addrtype> <dest-addr> <src_addr><src_addr>...
+ * One or more source addresses to apply filter, for one or more connection
+ * address in unicast/multicast environments
+ */
+typedef struct sdp_source_filter {
+   sdp_src_filter_mode_e  mode;
+   sdp_nettype_e     nettype;
+   sdp_addrtype_e    addrtype;
+   char              dest_addr[SDP_MAX_STRING_LEN+1];
+   u16               num_src_addr;
+   char              src_list[SDP_MAX_SRC_ADDR_LIST+1][SDP_MAX_STRING_LEN+1];
+} sdp_source_filter_t;
+
+/*
+ * b=<bw-modifier>:<val>
+ *
+*/
+typedef struct sdp_bw_data {
+    struct sdp_bw_data       *next_p;
+    sdp_bw_modifier_e        bw_modifier;
+    int                      bw_val;
+} sdp_bw_data_t;
+
+/*
+ * This structure houses a linked list of sdp_bw_data_t instances. Each
+ * sdp_bw_data_t instance represents one b= line.
+ */
+typedef struct sdp_bw {
+    u16                      bw_data_count;
+    sdp_bw_data_t            *bw_data_list;
+} sdp_bw_t;
+
+/* Media lines for AAL2 may have more than one transport type defined
+ * each with its own payload type list.  These are referred to as
+ * profile types instead of transport types.  This structure is used
+ * to handle these multiple profile types. Note: One additional profile
+ * field is needed because of the way parsing is done.  This is not an
+ * error. */
+typedef struct sdp_media_profiles {
+    u16             num_profiles;
+    sdp_transport_e profile[SDP_MAX_PROFILES+1];
+    u16             num_payloads[SDP_MAX_PROFILES];
+    sdp_payload_ind_e payload_indicator[SDP_MAX_PROFILES][SDP_MAX_PAYLOAD_TYPES];
+    u16             payload_type[SDP_MAX_PROFILES][SDP_MAX_PAYLOAD_TYPES];
+} sdp_media_profiles_t;
+
+
+/*
+ * sdp_srtp_crypto_context_t
+ *  This type is used to hold cryptographic context information.
+ *
+ */
+
+typedef struct sdp_srtp_crypto_context_t_ {
+    int32                   tag;
+    unsigned long           selection_flags;
+    sdp_srtp_crypto_suite_t suite;
+    unsigned char           master_key[SDP_SRTP_MAX_KEY_SIZE_BYTES];
+    unsigned char           master_salt[SDP_SRTP_MAX_SALT_SIZE_BYTES];
+    unsigned char           master_key_size_bytes;
+    unsigned char           master_salt_size_bytes;
+    unsigned long           ssrc; /* not used */
+    unsigned long           roc;  /* not used */
+    unsigned long           kdr;  /* not used */
+    unsigned short          seq;  /* not used */
+    sdp_srtp_fec_order_t    fec_order; /* not used */
+    unsigned char           master_key_lifetime[SDP_SRTP_MAX_LIFETIME_BYTES];
+    unsigned char           mki[SDP_SRTP_MAX_MKI_SIZE_BYTES];
+    u16                     mki_size_bytes;
+    char*                   session_parameters;
+} sdp_srtp_crypto_context_t;
+
+
+/* m= line info and associated attribute list */
+/* Note: Most of the port parameter values are 16-bit values.  We set
+ * the type to int32 so we can return either a 16-bit value or the
+ * choose value. */
+typedef struct sdp_mca {
+    sdp_media_e               media;
+    sdp_conn_t                conn;
+    sdp_transport_e           transport;
+    sdp_port_format_e         port_format;
+    int32                     port;
+    int32                     sctpport;
+    int32                     num_ports;
+    int32                     vpi;
+    u32                       vci;  /* VCI needs to be 32-bit */
+    int32                     vcci;
+    int32                     cid;
+    u16                       num_payloads;
+    sdp_payload_ind_e         payload_indicator[SDP_MAX_PAYLOAD_TYPES];
+    u16                       payload_type[SDP_MAX_PAYLOAD_TYPES];
+    sdp_media_profiles_t     *media_profiles_p;
+    tinybool                  sessinfo_found;
+    sdp_encryptspec_t         encrypt;
+    sdp_bw_t                  bw;
+    sdp_attr_e                media_direction; /* Either INACTIVE, SENDONLY,
+                                                  RECVONLY, or SENDRECV */
+    u32                       mid;
+    struct sdp_attr          *media_attrs_p;
+    struct sdp_mca           *next_p;
+} sdp_mca_t;
+
+
+/* generic a= line info */
+typedef struct sdp_attr {
+    sdp_attr_e                type;
+    union {
+        tinybool              boolean_val;
+        u32                   u32_val;
+        char                  string_val[SDP_MAX_STRING_LEN+1];
+        char                  ice_attr[SDP_MAX_STRING_LEN+1];
+        sdp_fmtp_t            fmtp;
+        sdp_qos_t             qos;
+        sdp_curr_t            curr;
+        sdp_des_t             des;
+        sdp_conf_t            conf;
+        sdp_transport_map_t   transport_map;    /* A rtpmap or sprtmap */
+        sdp_subnet_t          subnet;
+        sdp_t38_ratemgmt_e    t38ratemgmt;
+        sdp_t38_udpec_e       t38udpec;
+        sdp_pccodec_t         pccodec;
+        sdp_silencesupp_t     silencesupp;
+        sdp_mca_t            *cap_p;    /* A X-CAP or CDSC attribute */
+        sdp_rtr_t             rtr;
+    sdp_comediadir_t      comediadir;
+    sdp_srtp_crypto_context_t srtp_context;
+        sdp_mptime_t          mptime;
+        sdp_stream_data_t     stream_data;
+        char                  unknown[SDP_MAX_STRING_LEN+1];
+        sdp_source_filter_t   source_filter;
+    } attr;
+    struct sdp_attr          *next_p;
+} sdp_attr_t;
+
+typedef struct sdp_srtp_crypto_suite_list_ {
+    sdp_srtp_crypto_suite_t crypto_suite_val;
+    char * crypto_suite_str;
+    unsigned char key_size_bytes;
+    unsigned char salt_size_bytes;
+} sdp_srtp_crypto_suite_list;
+
+/* Application configuration options */
+typedef struct sdp_conf_options {
+    u32                       magic_num;
+    tinybool                  debug_flag[SDP_MAX_DEBUG_TYPES];
+    tinybool                  version_reqd;
+    tinybool                  owner_reqd;
+    tinybool                  session_name_reqd;
+    tinybool                  timespec_reqd;
+    tinybool                  media_supported[SDP_MAX_MEDIA_TYPES];
+    tinybool                  nettype_supported[SDP_MAX_NETWORK_TYPES];
+    tinybool                  addrtype_supported[SDP_MAX_ADDR_TYPES];
+    tinybool                  transport_supported[SDP_MAX_TRANSPORT_TYPES];
+    tinybool                  allow_choose[SDP_MAX_CHOOSE_PARAMS];
+    /* Statistics counts */
+    u32                       num_builds;
+    u32                       num_parses;
+    u32                       num_not_sdp_desc;
+    u32                       num_invalid_token_order;
+    u32                       num_invalid_param;
+    u32                       num_no_resource;
+    struct sdp_conf_options  *next_p;
+} sdp_conf_options_t;
+
+
+/* Session level SDP info with pointers to media line info. */
+/* Elements here that can only be one of are included directly. Elements */
+/* that can be more than one are pointers.                               */
+typedef struct {
+    char                      peerconnection[PC_HANDLE_SIZE];
+    u32                       magic_num;
+    sdp_conf_options_t       *conf_p;
+    tinybool                  debug_flag[SDP_MAX_DEBUG_TYPES];
+    char                      debug_str[SDP_MAX_STRING_LEN+1];
+    u32                       debug_id;
+    int32                     version; /* version is really a u16 */
+    char                      owner_name[SDP_MAX_STRING_LEN+1];
+    char                      owner_sessid[SDP_MAX_STRING_LEN+1];
+    char                      owner_version[SDP_MAX_STRING_LEN+1];
+    sdp_nettype_e             owner_network_type;
+    sdp_addrtype_e            owner_addr_type;
+    char                      owner_addr[SDP_MAX_STRING_LEN+1];
+    char                      sessname[SDP_MAX_STRING_LEN+1];
+    tinybool                  sessinfo_found;
+    tinybool                  uri_found;
+    sdp_conn_t                default_conn;
+    sdp_timespec_t           *timespec_p;
+    sdp_encryptspec_t         encrypt;
+    sdp_bw_t                  bw;
+    sdp_attr_t               *sess_attrs_p;
+
+    /* Info to help with building capability attributes. */
+    u16                       cur_cap_num;
+    sdp_mca_t                *cur_cap_p;
+    /* Info to help parsing X-cpar attrs. */
+    u16                       cap_valid;
+    u16                       last_cap_inst;
+    /* Info to help building X-cpar/cpar attrs. */
+    sdp_attr_e            last_cap_type;
+
+    /* MCA - Media, connection, and attributes */
+    sdp_mca_t                *mca_p;
+    ushort                    mca_count;
+} sdp_t;
+
+
+/* Token processing table. */
+typedef struct {
+    char *name;
+    sdp_result_e (*parse_func)(sdp_t *sdp_p, u16 level, const char *ptr);
+    sdp_result_e (*build_func)(sdp_t *sdp_p, u16 level, flex_string *fs);
+} sdp_tokenarray_t;
+
+
+/* Attribute processing table. */
+typedef struct {
+    char *name;
+    u16 strlen;
+    sdp_result_e (*parse_func)(sdp_t *sdp_p, sdp_attr_t *attr_p,
+                               const char *ptr);
+    sdp_result_e (*build_func)(sdp_t *sdp_p, sdp_attr_t *attr_p,
+                               flex_string *fs);
+} sdp_attrarray_t;
+
 
 /* Prototypes */
 
 /* sdp_config.c */
 extern void *sdp_init_config(void);
 extern void sdp_appl_debug(void *config_p, sdp_debug_e debug_type,
                            tinybool debug_flag);
 extern void sdp_require_version(void *config_p, tinybool version_required);
@@ -529,23 +1053,24 @@ extern void sdp_nettype_supported(void *
 extern void sdp_addrtype_supported(void *config_p, sdp_addrtype_e addrtype,
 			    tinybool addrtype_supported);
 extern void sdp_transport_supported(void *config_p, sdp_transport_e transport,
 			     tinybool transport_supported);
 extern void sdp_allow_choose(void *config_p, sdp_choose_param_e param,
                              tinybool choose_allowed);
 
 /* sdp_main.c */
-extern void *sdp_init_description(void *config_p);
-extern void sdp_debug(void *sdp_ptr, sdp_debug_e debug_type, tinybool debug_flag);
-extern void sdp_set_string_debug(void *sdp_ptr, char *debug_str);
-extern sdp_result_e sdp_parse(void *sdp_ptr, char **bufp, u16 len);
-extern sdp_result_e sdp_build(void *sdp_ptr, flex_string *fs);
-extern void *sdp_copy(void *sdp_ptr);
-extern sdp_result_e sdp_free_description(void *sdp_ptr);
+extern sdp_t *sdp_init_description(const char *peerconnection, void *config_p);
+extern void sdp_debug(sdp_t *sdp_ptr, sdp_debug_e debug_type, tinybool debug_flag);
+extern void sdp_set_string_debug(sdp_t *sdp_ptr, const char *debug_str);
+extern sdp_result_e sdp_parse(sdp_t *sdp_ptr, char **bufp, u16 len);
+extern sdp_result_e sdp_build(sdp_t *sdp_ptr, flex_string *fs);
+extern sdp_t *sdp_copy(sdp_t *sdp_ptr);
+extern sdp_result_e sdp_free_description(sdp_t *sdp_ptr);
+extern void sdp_parse_error(const char *peerconnection, const char *format, ...);
 
 extern const char *sdp_get_result_name(sdp_result_e rc);
 
 
 /* sdp_access.c */
 extern tinybool sdp_version_valid(void *sdp_p);
 extern int32 sdp_get_version(void *sdp_p);
 extern sdp_result_e sdp_set_version(void *sdp_p, int32 version);
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_access.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_access.c
@@ -2,16 +2,19 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "sdp_os_defs.h"
 #include "sdp.h"
 #include "sdp_private.h"
 #include "ccsip_sdp.h"
 #include "rtp_defs.h"
+#include "CSFLog.h"
+
+static const char* logTag = "sdp_access";
 
 /* Function:    sdp_find_media_level
  * Description: Find and return a pointer to the specified media level,
  *              if it exists.
  *              Note: This is not an API for the application but an internal
  *              routine used by the SDP library.
  * Parameters:  sdp_ptr     The SDP handle returned by sdp_init_description.
  *              level       The media level to find.
@@ -1320,17 +1323,17 @@ int32 sdp_get_media_portnum (void *sdp_p
     }
 
     /* Make sure port number is valid for the specified format. */
     if ((mca_p->port_format != SDP_PORT_NUM_ONLY) &&
         (mca_p->port_format != SDP_PORT_NUM_COUNT) &&
         (mca_p->port_format != SDP_PORT_NUM_VPI_VCI) &&
         (mca_p->port_format != SDP_PORT_NUM_VPI_VCI_CID)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Port num not valid for media line %u",
+            CSFLogError(logTag, "%s Port num not valid for media line %u",
                       sdp_p->debug_str, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     }
 
     return (mca_p->port);
 }
@@ -1355,17 +1358,17 @@ int32 sdp_get_media_portcount (void *sdp
     mca_p = sdp_find_media_level(sdp_p, level);
     if (mca_p == NULL) {
         return (SDP_INVALID_VALUE);
     }
 
     /* Make sure port number is valid for the specified format. */
     if (mca_p->port_format != SDP_PORT_NUM_COUNT) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Port count not valid for media line %u",
+            CSFLogError(logTag, "%s Port count not valid for media line %u",
                       sdp_p->debug_str, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     }
 
     return (mca_p->num_ports);
 }
@@ -1392,17 +1395,17 @@ int32 sdp_get_media_vpi (void *sdp_ptr, 
         return (SDP_INVALID_VALUE);
     }
 
     /* Make sure port number is valid for the specified format. */
     if ((mca_p->port_format != SDP_PORT_VPI_VCI) &&
         (mca_p->port_format != SDP_PORT_NUM_VPI_VCI) &&
         (mca_p->port_format != SDP_PORT_NUM_VPI_VCI_CID)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s VPI not valid for media line %u",
+            CSFLogError(logTag, "%s VPI not valid for media line %u",
                       sdp_p->debug_str, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     }
 
     return (mca_p->vpi);
 }
@@ -1429,17 +1432,17 @@ u32 sdp_get_media_vci (void *sdp_ptr, u1
         return (0);
     }
 
     /* Make sure port number is valid for the specified format. */
     if ((mca_p->port_format != SDP_PORT_VPI_VCI) &&
         (mca_p->port_format != SDP_PORT_NUM_VPI_VCI) &&
         (mca_p->port_format != SDP_PORT_NUM_VPI_VCI_CID)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s VCI not valid for media line %u",
+            CSFLogError(logTag, "%s VCI not valid for media line %u",
                       sdp_p->debug_str, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     }
 
     return (mca_p->vci);
 }
@@ -1465,17 +1468,17 @@ int32 sdp_get_media_vcci (void *sdp_ptr,
     if (mca_p == NULL) {
         return (SDP_INVALID_VALUE);
     }
 
     /* Make sure port number is valid for the specified format. */
     if ((mca_p->port_format != SDP_PORT_VCCI) &&
         (mca_p->port_format != SDP_PORT_VCCI_CID)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s VCCI not valid for media line %u",
+            CSFLogError(logTag, "%s VCCI not valid for media line %u",
                       sdp_p->debug_str, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     }
 
     return (mca_p->vcci);
 }
@@ -1501,17 +1504,17 @@ int32 sdp_get_media_cid (void *sdp_ptr, 
     if (mca_p == NULL) {
         return (SDP_INVALID_VALUE);
     }
 
     /* Make sure port number is valid for the specified format. */
     if ((mca_p->port_format != SDP_PORT_VCCI_CID) &&
         (mca_p->port_format != SDP_PORT_NUM_VPI_VCI_CID)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s CID not valid for media line %u",
+            CSFLogError(logTag, "%s CID not valid for media line %u",
                       sdp_p->debug_str, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     }
 
     return (mca_p->cid);
 }
@@ -1817,17 +1820,17 @@ sdp_result_e sdp_insert_media_line (void
     sdp_mca_t  *new_mca_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if ((level < 1) || (level > (sdp_p->mca_count+1))) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Invalid media line (%u) to insert, max is "
+            CSFLogError(logTag, "%s Invalid media line (%u) to insert, max is "
                       "(%u).", sdp_p->debug_str, level, sdp_p->mca_count);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Allocate resource for new media stream. */
     new_mca_p = sdp_alloc_mca();
@@ -2224,17 +2227,17 @@ sdp_result_e sdp_add_media_profile (void
             mca_p->media_profiles_p->num_profiles = 0;
             /* Set the transport type to this first profile type. */
             mca_p->transport = profile;
         }
     }
 
     if (mca_p->media_profiles_p->num_profiles >= SDP_MAX_PROFILES) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Max number of media profiles already specified"
+            CSFLogError(logTag, "%s Max number of media profiles already specified"
                       " for media level %u", sdp_p->debug_str, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     prof_num = mca_p->media_profiles_p->num_profiles++;
     mca_p->media_profiles_p->profile[prof_num] = profile;
@@ -2267,17 +2270,17 @@ sdp_result_e sdp_add_media_payload_type 
     mca_p = sdp_find_media_level(sdp_p, level);
     if (mca_p == NULL) {
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (mca_p->num_payloads == SDP_MAX_PAYLOAD_TYPES) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Max number of payload types already defined "
+            CSFLogError(logTag, "%s Max number of payload types already defined "
                       "for media line %u", sdp_p->debug_str, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     mca_p->payload_indicator[mca_p->num_payloads] = indicator;
     mca_p->payload_type[mca_p->num_payloads++] = payload_type;
@@ -2312,27 +2315,27 @@ sdp_result_e sdp_add_media_profile_paylo
     if (mca_p == NULL) {
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if ((prof_num < 1) ||
         (prof_num > mca_p->media_profiles_p->num_profiles)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Invalid profile number (%u) for set profile "
+            CSFLogError(logTag, "%s Invalid profile number (%u) for set profile "
                       " payload type", sdp_p->debug_str, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (mca_p->media_profiles_p->num_payloads[prof_num-1] ==
         SDP_MAX_PAYLOAD_TYPES) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Max number of profile payload types already "
+            CSFLogError(logTag, "%s Max number of profile payload types already "
                       "defined profile %u on media line %u",
                       sdp_p->debug_str, prof_num, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Get the current num payloads for this profile, and inc the number
@@ -2424,32 +2427,32 @@ sdp_result_e sdp_copy_all_bw_lines (void
 
     /* Find src bw list */
     if (src_level == SDP_SESSION_LEVEL) {
         src_bw_p = &(src_sdp_p->bw);
     } else {
         mca_p = sdp_find_media_level(src_sdp_p, src_level);
         if (mca_p == NULL) {
             if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Invalid src media level (%u) for copy all "
+                CSFLogError(logTag, "%s Invalid src media level (%u) for copy all "
                           "attrs ", src_sdp_p->debug_str, src_level);
             }
             return (SDP_INVALID_PARAMETER);
         }
         src_bw_p = &(mca_p->bw);
     }
 
     /* Find dst bw list */
     if (dst_level == SDP_SESSION_LEVEL) {
         dst_bw_p = &(dst_sdp_p->bw);
     } else {
         mca_p = sdp_find_media_level(dst_sdp_p, dst_level);
         if (mca_p == NULL) {
             if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Invalid dst media level (%u) for copy all "
+                CSFLogError(logTag, "%s Invalid dst media level (%u) for copy all "
                           "attrs ", src_sdp_p->debug_str, dst_level);
             }
             return (SDP_INVALID_PARAMETER);
         }
         dst_bw_p = &(mca_p->bw);
     }
 
     orig_bw_data_p = src_bw_p->bw_data_list;
@@ -2720,17 +2723,17 @@ sdp_result_e sdp_delete_bw_line (void *s
         }
 
         prev_bw_data_p = bw_data_p;
         bw_data_p = bw_data_p->next_p;
     }
 
     if (bw_data_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s bw line instance %d not found.",
+            CSFLogError(logTag, "%s bw line instance %d not found.",
                       sdp_p->debug_str, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (prev_bw_data_p == NULL) {
         bw_p->bw_data_list = bw_data_p->next_p;
@@ -2767,27 +2770,27 @@ sdp_result_e sdp_set_bw (void *sdp_ptr, 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if ((bw_modifier < SDP_BW_MODIFIER_AS) ||
         (bw_modifier >= SDP_MAX_BW_MODIFIER_VAL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Invalid bw modifier type: %d.",
+            CSFLogError(logTag, "%s Invalid bw modifier type: %d.",
                       sdp_p->debug_str, bw_modifier);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     bw_data_p = sdp_find_bw_line(sdp_p, level, inst_num);
     if (bw_data_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s The %u instance of a b= line was not found at level %u.",
+            CSFLogError(logTag, "%s The %u instance of a b= line was not found at level %u.",
                       sdp_p->debug_str, inst_num, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     bw_data_p->bw_modifier = bw_modifier;
     bw_data_p->bw_val = bw_val;
 
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr.c
@@ -6,16 +6,19 @@
 #include <limits.h>
 
 #include "plstr.h"
 #include "sdp_os_defs.h"
 #include "sdp.h"
 #include "sdp_private.h"
 #include "sdp_base64.h"
 #include "mozilla/Assertions.h"
+#include "CSFLog.h"
+
+static const char* logTag = "sdp_attr";
 
 /*
  * Macro for sdp_build_attr_fmtp
  * Adds name-value pair where value is char*
  */
 #define FMTP_BUILD_STRING(condition, name, value) \
   if ((condition)) { \
     sdp_append_name_and_string(fs, (name), (value), semicolon); \
@@ -100,32 +103,28 @@ sdp_result_e sdp_parse_attribute (sdp_t 
         if (mca_p == NULL) {
             return (SDP_FAILURE);
         }
     }
 
     /* Find the attribute type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), ": \t", &result);
     if (ptr == NULL) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No attribute type specified, parse failed.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+          "%s No attribute type specified, parse failed.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     if (ptr[0] == ':') {
         /* Skip the ':' char for parsing attribute parameters. */
         ptr++;
     }
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No attribute type specified, parse failed.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+          "%s No attribute type specified, parse failed.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = (sdp_attr_t *)SDP_MALLOC(sizeof(sdp_attr_t));
     if (attr_p == NULL) {
         sdp_p->conf_p->num_no_resource++;
         return (SDP_NO_RESOURCE);
@@ -134,20 +133,19 @@ sdp_result_e sdp_parse_attribute (sdp_t 
     attr_p->next_p = NULL;
     for (i=0; i < SDP_MAX_ATTR_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_attr[i].name, sdp_attr[i].strlen) == 0) {
             attr_p->type = (sdp_attr_e)i;
             break;
         }
     }
     if (attr_p->type == SDP_ATTR_INVALID) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Unrecognized attribute (%s) ",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+          "%s Warning: Unrecognized attribute (%s) ",
+          sdp_p->debug_str, tmp);
         sdp_free_attr(attr_p);
         return (SDP_SUCCESS);
     }
 
     /* If this is an X-cpar or cpar attribute, set the flag.  The attribute
      * type will be changed by the parse. */
     if ((attr_p->type == SDP_ATTR_X_CPAR) ||
 	(attr_p->type == SDP_ATTR_CPAR)) {
@@ -218,24 +216,24 @@ sdp_result_e sdp_build_attribute (sdp_t 
     /* Re-initialize the current capability number for this new level. */
     sdp_p->cur_cap_num = 1;
 
     /* Build all of the attributes for this level. Note that if there
      * is a problem building an attribute, we don't fail but just ignore it.*/
     while (attr_p != NULL) {
         if (attr_p->type >= SDP_MAX_ATTR_TYPES) {
             if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                SDP_WARN("%s Invalid attribute type to build (%u)",
+                CSFLogDebug(logTag, "%s Invalid attribute type to build (%u)",
                          sdp_p->debug_str, attr_p->type);
             }
         } else {
             result = sdp_attr[attr_p->type].build_func(sdp_p, attr_p, fs);
 
             if (result != SDP_SUCCESS) {
-              SDP_ERROR("%s error building attribute %d", __FUNCTION__, result);
+              CSFLogError(logTag, "%s error building attribute %d", __FUNCTION__, result);
               return result;
             }
 
             if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
                 SDP_PRINT("%s Built a=%s attribute line", sdp_p->debug_str,
                           sdp_get_attr_name(attr_p->type));
             }
         }
@@ -249,20 +247,19 @@ sdp_result_e sdp_parse_attr_simple_strin
                                            const char *ptr)
 {
     sdp_result_e  result;
 
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.string_val,
       sizeof(attr_p->attr.string_val), " \t", &result);
 
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No string token found for %s attribute",
-                     sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No string token found for %s attribute",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Parsed a=%s, %s", sdp_p->debug_str,
                       sdp_get_attr_name(attr_p->type),
                       attr_p->attr.string_val);
         }
@@ -282,20 +279,19 @@ sdp_result_e sdp_build_attr_simple_strin
 sdp_result_e sdp_parse_attr_simple_u32 (sdp_t *sdp_p, sdp_attr_t *attr_p,
                                         const char *ptr)
 {
     sdp_result_e  result;
 
     attr_p->attr.u32_val = sdp_getnextnumtok(ptr, &ptr, " \t", &result);
 
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Numeric token for %s attribute not found",
-                     sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Numeric token for %s attribute not found",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Parsed a=%s, %lu", sdp_p->debug_str,
                       sdp_get_attr_name(attr_p->type), attr_p->attr.u32_val);
         }
         return (SDP_SUCCESS);
@@ -318,20 +314,19 @@ sdp_result_e sdp_parse_attr_simple_bool 
 
     if (sdp_getnextnumtok(ptr, &ptr, " \t", &result) == 0) {
         attr_p->attr.boolean_val = FALSE;
     } else {
         attr_p->attr.boolean_val= TRUE;
     }
 
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Boolean token for %s attribute not found",
-                     sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Boolean token for %s attribute not found",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             if (attr_p->attr.boolean_val) {
                 SDP_PRINT("%s Parsed a=%s, boolean is TRUE", sdp_p->debug_str,
                           sdp_get_attr_name(attr_p->type));
             } else {
@@ -371,70 +366,66 @@ sdp_result_e sdp_parse_attr_maxprate (sd
                                       const char *ptr)
 {
     sdp_result_e  result;
 
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.string_val,
       sizeof(attr_p->attr.string_val), " \t", &result);
 
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No string token found for %s attribute",
-                     sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No string token found for %s attribute",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (!sdp_validate_maxprate(attr_p->attr.string_val)) {
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s is not a valid maxprate value.",
-                          attr_p->attr.string_val);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s is not a valid maxprate value.",
+                attr_p->attr.string_val);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
 
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Parsed a=%s, %s", sdp_p->debug_str,
                       sdp_get_attr_name(attr_p->type),
                       attr_p->attr.string_val);
         }
         return (SDP_SUCCESS);
     }
 }
 
 /*
  * sdp_attr_fmtp_no_value
- * Helper function for sending the warning when a paramet value is
+ * Helper function for sending the warning when a parameter value is
  * missing.
  *
  */
 static void sdp_attr_fmtp_no_value(sdp_t *sdp, char *param_name)
 {
-  if (sdp->debug_flag[SDP_DEBUG_WARNINGS]) {
-    SDP_WARN("%s Warning: No %s value specified for fmtp attribute",
-      sdp->debug_str, param_name);
-  }
+  sdp_parse_error(sdp->peerconnection,
+    "%s Warning: No %s value specified for fmtp attribute",
+    sdp->debug_str, param_name);
   sdp->conf_p->num_invalid_param++;
 }
 
 /*
  * sdp_attr_fmtp_invalid_value
  * Helper function for sending the warning when a parameter value is
  * incorrect.
  *
  */
 
 static void sdp_attr_fmtp_invalid_value(sdp_t *sdp, char *param_name,
   char* param_value)
 {
-  if (sdp->debug_flag[SDP_DEBUG_WARNINGS]) {
-    SDP_WARN("%s Warning: Invalid %s: %s specified for fmtp attribute",
-      sdp->debug_str, param_name, param_value);
-  }
+  sdp_parse_error(sdp->peerconnection,
+    "%s Warning: Invalid %s: %s specified for fmtp attribute",
+    sdp->debug_str, param_name, param_value);
   sdp->conf_p->num_invalid_param++;
 }
 
 /* Note:  The fmtp attribute formats currently handled are:
  *        fmtp:<payload type> <event>,<event>...
  *        fmtp:<payload_type> [annexa=yes/no] [annexb=yes/no] [bitrate=<value>]
  *        [QCIF =<value>] [CIF =<value>] [MaxBR = <value>] one or more
  *        Other FMTP params as per H.263, H.263+, H.264 codec support.
@@ -1884,40 +1875,38 @@ sdp_result_e sdp_parse_attr_fmtp (sdp_t 
         if (*ptr2 == '-') {
             high_val = (u8)sdp_getnextnumtok(ptr2, (const char **)&ptr2,
                                          "- \t", &result2);
         } else {
             high_val = low_val;
         }
 
         if ((result1 != SDP_SUCCESS) || (result2 != SDP_SUCCESS)) {
-            if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                SDP_WARN("%s Warning: Invalid named events specified for "
-                         "fmtp attribute.", sdp_p->debug_str);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Warning: Invalid named events specified for fmtp attribute.",
+                sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
 	    SDP_FREE(temp_ptr);
             return (SDP_INVALID_PARAMETER);
         }
 
         for (i = low_val; i <= high_val; i++) {
             mapword = i/SDP_NE_BITS_PER_WORD;
             bmap = SDP_NE_BIT_0 << (i%32);
             fmtp_p->bmap[mapword] |= bmap;
         }
         if (high_val > fmtp_p->maxval) {
             fmtp_p->maxval = high_val;
         }
     }
 
     if (fmtp_p->maxval == 0) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No named events specified for "
-                     "fmtp attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No named events specified for fmtp attribute.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
 	SDP_FREE(temp_ptr);
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, payload type %u, ", sdp_p->debug_str,
                   sdp_get_attr_name(attr_p->type),
@@ -2184,77 +2173,72 @@ sdp_result_e sdp_parse_attr_qos (sdp_t *
 {
     int i;
     sdp_result_e result;
     char tmp[SDP_MAX_STRING_LEN];
 
     /* Find the strength tag. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No qos strength tag specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No qos strength tag specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.qos.strength = SDP_QOS_STRENGTH_UNKNOWN;
     for (i=0; i < SDP_MAX_QOS_STRENGTH; i++) {
         if (cpr_strncasecmp(tmp, sdp_qos_strength[i].name,
                         sdp_qos_strength[i].strlen) == 0) {
             attr_p->attr.qos.strength = (sdp_qos_strength_e)i;
         }
     }
     if (attr_p->attr.qos.strength == SDP_QOS_STRENGTH_UNKNOWN) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: QOS strength tag unrecognized (%s)",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: QOS strength tag unrecognized (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the qos direction. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No qos direction specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No qos direction specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.qos.direction = SDP_QOS_DIR_UNKNOWN;
     for (i=0; i < SDP_MAX_QOS_DIR; i++) {
         if (cpr_strncasecmp(tmp, sdp_qos_direction[i].name,
                         sdp_qos_direction[i].strlen) == 0) {
             attr_p->attr.qos.direction = (sdp_qos_dir_e)i;
         }
     }
     if (attr_p->attr.qos.direction == SDP_QOS_DIR_UNKNOWN) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: QOS direction unrecognized (%s)",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: QOS direction unrecognized (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* See if confirm was specified.  Defaults to FALSE. */
     attr_p->attr.qos.confirm = FALSE;
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result == SDP_SUCCESS) {
         if (cpr_strncasecmp(tmp, "confirm", sizeof("confirm")) == 0) {
             attr_p->attr.qos.confirm = TRUE;
         }
         if (attr_p->attr.qos.confirm == FALSE) {
-            if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                SDP_WARN("%s Warning: QOS confirm parameter invalid (%s)",
-                         sdp_p->debug_str, tmp);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Warning: QOS confirm parameter invalid (%s)",
+                sdp_p->debug_str, tmp);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, strength %s, direction %s, confirm %s",
                   sdp_p->debug_str, sdp_get_attr_name(attr_p->type),
@@ -2281,81 +2265,76 @@ sdp_result_e sdp_parse_attr_curr (sdp_t 
 {
     int i;
     sdp_result_e result;
     char tmp[SDP_MAX_STRING_LEN];
 
     /* Find the curr type tag. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No curr attr type specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No curr attr type specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.curr.type = SDP_CURR_UNKNOWN_TYPE;
     for (i=0; i < SDP_MAX_CURR_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_curr_type[i].name,
                         sdp_curr_type[i].strlen) == 0) {
             attr_p->attr.curr.type = (sdp_curr_type_e)i;
         }
     }
 
     if (attr_p->attr.curr.type != SDP_CURR_QOS_TYPE) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Unknown curr type.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Unknown curr type.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Check qos status type */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
      if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No curr attr type specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No curr attr type specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.curr.status_type = SDP_QOS_STATUS_TYPE_UNKNOWN;
     for (i=0; i < SDP_MAX_QOS_STATUS_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_qos_status_type[i].name,
                         sdp_qos_status_type[i].strlen) == 0) {
             attr_p->attr.curr.status_type = (sdp_qos_status_types_e)i;
         }
     }
 
 
     /* Find the qos direction. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No qos direction specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No qos direction specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.curr.direction = SDP_QOS_DIR_UNKNOWN;
     for (i=0; i < SDP_MAX_QOS_DIR; i++) {
         if (cpr_strncasecmp(tmp, sdp_qos_direction[i].name,
                         sdp_qos_direction[i].strlen) == 0) {
             attr_p->attr.curr.direction = (sdp_qos_dir_e)i;
         }
     }
     if (attr_p->attr.curr.direction == SDP_QOS_DIR_UNKNOWN) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: QOS direction unrecognized (%s)",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: QOS direction unrecognized (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, type %s status type %s, direction %s",
                   sdp_p->debug_str, sdp_get_attr_name(attr_p->type),
                   sdp_get_curr_type_name(attr_p->attr.curr.type),
@@ -2382,107 +2361,100 @@ sdp_result_e sdp_parse_attr_des (sdp_t *
 {
     int i;
     sdp_result_e result;
     char tmp[SDP_MAX_STRING_LEN];
 
     /* Find the curr type tag. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No des attr type specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No des attr type specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.des.type = SDP_DES_UNKNOWN_TYPE;
     for (i=0; i < SDP_MAX_CURR_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_des_type[i].name,
                         sdp_des_type[i].strlen) == 0) {
             attr_p->attr.des.type = (sdp_des_type_e)i;
         }
     }
 
     if (attr_p->attr.des.type != SDP_DES_QOS_TYPE) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Unknown conf type.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Unknown conf type.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the strength tag. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No qos strength tag specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No qos strength tag specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.des.strength = SDP_QOS_STRENGTH_UNKNOWN;
     for (i=0; i < SDP_MAX_QOS_STRENGTH; i++) {
         if (cpr_strncasecmp(tmp, sdp_qos_strength[i].name,
                         sdp_qos_strength[i].strlen) == 0) {
             attr_p->attr.des.strength = (sdp_qos_strength_e)i;
         }
     }
     if (attr_p->attr.des.strength == SDP_QOS_STRENGTH_UNKNOWN) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: QOS strength tag unrecognized (%s)",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: QOS strength tag unrecognized (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Check qos status type */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
      if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No des attr type specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No des attr type specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.des.status_type = SDP_QOS_STATUS_TYPE_UNKNOWN;
     for (i=0; i < SDP_MAX_QOS_STATUS_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_qos_status_type[i].name,
                         sdp_qos_status_type[i].strlen) == 0) {
             attr_p->attr.des.status_type = (sdp_qos_status_types_e)i;
         }
     }
 
 
     /* Find the qos direction. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No qos direction specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No qos direction specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.des.direction = SDP_QOS_DIR_UNKNOWN;
     for (i=0; i < SDP_MAX_QOS_DIR; i++) {
         if (cpr_strncasecmp(tmp, sdp_qos_direction[i].name,
                         sdp_qos_direction[i].strlen) == 0) {
             attr_p->attr.des.direction = (sdp_qos_dir_e)i;
         }
     }
     if (attr_p->attr.des.direction == SDP_QOS_DIR_UNKNOWN) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: QOS direction unrecognized (%s)",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: QOS direction unrecognized (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, type %s strength %s status type %s, direction %s",
                   sdp_p->debug_str, sdp_get_attr_name(attr_p->type),
                   sdp_get_des_type_name(attr_p->attr.des.type),
@@ -2512,81 +2484,76 @@ sdp_result_e sdp_parse_attr_conf (sdp_t 
 {
     int i;
     sdp_result_e result;
     char tmp[SDP_MAX_STRING_LEN];
 
     /* Find the curr type tag. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No conf attr type specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No conf attr type specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.conf.type = SDP_CONF_UNKNOWN_TYPE;
     for (i=0; i < SDP_MAX_CURR_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_conf_type[i].name,
                         sdp_conf_type[i].strlen) == 0) {
             attr_p->attr.conf.type = (sdp_conf_type_e)i;
         }
     }
 
     if (attr_p->attr.conf.type != SDP_CONF_QOS_TYPE) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Unknown conf type.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Unknown conf type.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Check qos status type */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
      if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No conf attr type specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No conf attr type specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.conf.status_type = SDP_QOS_STATUS_TYPE_UNKNOWN;
     for (i=0; i < SDP_MAX_QOS_STATUS_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_qos_status_type[i].name,
                         sdp_qos_status_type[i].strlen) == 0) {
             attr_p->attr.conf.status_type = (sdp_qos_status_types_e)i;
         }
     }
 
 
     /* Find the qos direction. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No qos direction specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No qos direction specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.conf.direction = SDP_QOS_DIR_UNKNOWN;
     for (i=0; i < SDP_MAX_QOS_DIR; i++) {
         if (cpr_strncasecmp(tmp, sdp_qos_direction[i].name,
                         sdp_qos_direction[i].strlen) == 0) {
             attr_p->attr.conf.direction = (sdp_qos_dir_e)i;
         }
     }
     if (attr_p->attr.conf.direction == SDP_QOS_DIR_UNKNOWN) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: QOS direction unrecognized (%s)",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: QOS direction unrecognized (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, type %s status type %s, direction %s",
                   sdp_p->debug_str, sdp_get_attr_name(attr_p->type),
                   sdp_get_conf_type_name(attr_p->attr.conf.type),
@@ -2620,62 +2587,56 @@ sdp_result_e sdp_parse_attr_transport_ma
 
     attr_p->attr.transport_map.payload_num = 0;
     attr_p->attr.transport_map.encname[0]  = '\0';
     attr_p->attr.transport_map.clockrate   = 0;
     attr_p->attr.transport_map.num_chan    = 1;
 
     /* Find the payload type number. */
     attr_p->attr.transport_map.payload_num =
-	(u16)sdp_getnextnumtok(ptr, &ptr, " \t", &result);
+    (u16)sdp_getnextnumtok(ptr, &ptr, " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid payload type specified for "
-                     "%s attribute.", sdp_p->debug_str,
-		     sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Invalid payload type specified for %s attribute.",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the encoding name. */
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.transport_map.encname,
                             sizeof(attr_p->attr.transport_map.encname), "/ \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No encoding name specified in %s "
-                     "attribute.", sdp_p->debug_str,
-		     sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No encoding name specified in %s attribute.",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the clockrate. */
     attr_p->attr.transport_map.clockrate =
 	sdp_getnextnumtok(ptr, &ptr, "/ \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No clockrate specified for "
-                     "%s attribute, set to default of 8000.",
-                     sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No clockrate specified for "
+            "%s attribute, set to default of 8000.",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         attr_p->attr.transport_map.clockrate = 8000;
     }
 
     /* Find the number of channels, if specified. This is optional. */
     if (*ptr == '/') {
         /* If a '/' exists, expect something valid beyond it. */
         attr_p->attr.transport_map.num_chan =
 	    (u16)sdp_getnextnumtok(ptr, &ptr, "/ \t", &result);
         if (result != SDP_SUCCESS) {
-            if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                SDP_WARN("%s Warning: Invalid number of channels parameter"
-                         " for rtpmap attribute.", sdp_p->debug_str);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Warning: Invalid number of channels parameter"
+                " for rtpmap attribute.", sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, payload type %u, encoding name %s, "
                   "clockrate %lu", sdp_p->debug_str,
@@ -2724,20 +2685,19 @@ sdp_result_e sdp_parse_attr_subnet (sdp_
     char         *slash_ptr;
     sdp_result_e  result;
     tinybool      type_found = FALSE;
     char          tmp[SDP_MAX_STRING_LEN];
 
     /* Find the subnet network type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No network type specified in subnet "
-                     "attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No network type specified in subnet attribute.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.subnet.nettype = SDP_NT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_NETWORK_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_nettype[i].name,
                         sdp_nettype[i].strlen) == 0) {
             type_found = TRUE;
@@ -2745,31 +2705,29 @@ sdp_result_e sdp_parse_attr_subnet (sdp_
         if (type_found == TRUE) {
             if (sdp_p->conf_p->nettype_supported[i] == TRUE) {
                 attr_p->attr.subnet.nettype = (sdp_nettype_e)i;
             }
             type_found = FALSE;
         }
     }
     if (attr_p->attr.subnet.nettype == SDP_NT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Subnet network type "
-                     "unsupported (%s).", sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Subnet network type unsupported (%s).",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the subnet address type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No address type specified in subnet"
-                     " attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No address type specified in subnet attribute.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.subnet.addrtype = SDP_AT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_ADDR_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_addrtype[i].name,
                         sdp_addrtype[i].strlen) == 0) {
             type_found = TRUE;
@@ -2777,47 +2735,44 @@ sdp_result_e sdp_parse_attr_subnet (sdp_
         if (type_found == TRUE) {
             if (sdp_p->conf_p->addrtype_supported[i] == TRUE) {
                 attr_p->attr.subnet.addrtype = (sdp_addrtype_e)i;
             }
             type_found = FALSE;
         }
     }
     if (attr_p->attr.subnet.addrtype == SDP_AT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Subnet address type unsupported "
-                     "(%s).", sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Subnet address type unsupported (%s).",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the subnet address.  */
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.subnet.addr,
                             sizeof(attr_p->attr.subnet.addr), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No subnet address specified in "
-                     "subnet attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No subnet address specified in "
+            "subnet attribute.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     slash_ptr = sdp_findchar(attr_p->attr.subnet.addr, "/");
     if (*slash_ptr == '/') {
         *slash_ptr++ = '\0';
         /* If the '/' exists, expect a valid prefix to follow. */
         attr_p->attr.subnet.prefix = sdp_getnextnumtok(slash_ptr,
                                                   (const char **)&slash_ptr,
                                                   " \t", &result);
         if (result != SDP_SUCCESS) {
-            if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                SDP_WARN("%s Warning: Invalid subnet prefix specified in "
-                         "subnet attribute.", sdp_p->debug_str);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Warning: Invalid subnet prefix specified in "
+                "subnet attribute.", sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
     } else {
         attr_p->attr.subnet.prefix = SDP_INVALID_VALUE;
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
@@ -2860,20 +2815,19 @@ sdp_result_e sdp_parse_attr_t38_ratemgmt
 {
     int i;
     sdp_result_e result;
     char tmp[SDP_MAX_STRING_LEN];
 
     /* Find the rate mgmt. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No t38 rate management specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No t38 rate management specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.t38ratemgmt = SDP_T38_UNKNOWN_RATE;
     for (i=0; i < SDP_T38_MAX_RATES; i++) {
         if (cpr_strncasecmp(tmp, sdp_t38_rate[i].name,
                         sdp_t38_rate[i].strlen) == 0) {
             attr_p->attr.t38ratemgmt = (sdp_t38_ratemgmt_e)i;
@@ -2904,20 +2858,19 @@ sdp_result_e sdp_parse_attr_t38_udpec (s
 {
     int i;
     sdp_result_e result;
     char tmp[SDP_MAX_STRING_LEN];
 
     /* Find the udpec. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No t38 udpEC specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No t38 udpEC specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.t38udpec = SDP_T38_UDPEC_UNKNOWN;
     for (i=0; i < SDP_T38_MAX_UDPEC; i++) {
         if (cpr_strncasecmp(tmp, sdp_t38_udpec[i].name,
                         sdp_t38_udpec[i].strlen) == 0) {
             attr_p->attr.t38udpec = (sdp_t38_udpec_e)i;
@@ -2954,20 +2907,19 @@ sdp_result_e sdp_parse_attr_pc_codec (sd
                                                                " \t", &result);
         if (result != SDP_SUCCESS) {
             break;
         }
         attr_p->attr.pccodec.num_payloads++;
     }
 
     if (attr_p->attr.pccodec.num_payloads == 0) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No payloads specified for %s attr.",
-                     sdp_p->debug_str, sdp_attr[attr_p->type].name);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No payloads specified for %s attr.",
+            sdp_p->debug_str, sdp_attr[attr_p->type].name);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, num payloads %u, payloads: ",
                   sdp_p->debug_str, sdp_get_attr_name(attr_p->type),
                   attr_p->attr.pccodec.num_payloads);
@@ -3021,98 +2973,91 @@ sdp_result_e sdp_parse_attr_cap (sdp_t *
         sdp_p->conf_p->num_no_resource++;
         return (SDP_NO_RESOURCE);
     }
 
     /* Find the capability number. We don't need to store this since we
      * calculate it for ourselves as we need to. But it must be specified. */
     (void)sdp_getnextnumtok(ptr, &ptr, "/ \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Capability not specified for %s, "
-                     "unable to parse.", sdp_p->debug_str,
-		     sdp_get_attr_name(attr_p->type));
-
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Capability not specified for %s, "
+            "unable to parse.", sdp_p->debug_str,
+            sdp_get_attr_name(attr_p->type));
         SDP_FREE(cap_p);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the media type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s No media type specified for %s attribute, "
-                     "unable to parse.", sdp_p->debug_str,
-		     sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No media type specified for %s attribute, "
+            "unable to parse.",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         SDP_FREE(cap_p);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     cap_p->media = SDP_MEDIA_UNSUPPORTED;
     for (i=0; i < SDP_MAX_MEDIA_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_media[i].name, sdp_media[i].strlen) == 0) {
             cap_p->media = (sdp_media_e)i;
             break;
         }
     }
     if (cap_p->media == SDP_MEDIA_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Media type unsupported (%s).",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Media type unsupported (%s).",
+            sdp_p->debug_str, tmp);
         SDP_FREE(cap_p);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the transport protocol type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s No transport protocol type specified, "
-                     "unable to parse.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No transport protocol type specified, "
+            "unable to parse.", sdp_p->debug_str);
         SDP_FREE(cap_p);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     cap_p->transport = SDP_TRANSPORT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_TRANSPORT_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_transport[i].name,
                         sdp_transport[i].strlen) == 0) {
             cap_p->transport = (sdp_transport_e)i;
             break;
         }
     }
     if (cap_p->transport == SDP_TRANSPORT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Transport protocol type unsupported "
-                     "(%s).", sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Transport protocol type unsupported (%s).",
+            sdp_p->debug_str, tmp);
         SDP_FREE(cap_p);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find payload formats. AAL2 X-cap lines allow multiple
      * transport/profile types per line, so these are handled differently.
      */
     if ((cap_p->transport == SDP_TRANSPORT_AAL2_ITU) ||
         (cap_p->transport == SDP_TRANSPORT_AAL2_ATMF) ||
         (cap_p->transport == SDP_TRANSPORT_AAL2_CUSTOM)) {
         /* Capability processing is not currently defined for AAL2 types
          * with multiple profiles. We don't process. */
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: AAL2 profiles unsupported with "
-                     "%s attributes.", sdp_p->debug_str,
-		     sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: AAL2 profiles unsupported with "
+            "%s attributes.", sdp_p->debug_str,
+            sdp_get_attr_name(attr_p->type));
         SDP_FREE(cap_p);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         /* Transport is a non-AAL2 type.  Parse payloads normally. */
         sdp_parse_payload_types(sdp_p, cap_p, ptr);
         if (cap_p->num_payloads == 0) {
             SDP_FREE(cap_p);
@@ -3127,17 +3072,17 @@ sdp_result_e sdp_parse_attr_cap (sdp_t *
      * cpar attrs.
      */
     sdp_p->cap_valid = TRUE;
     sdp_p->last_cap_inst++;
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed %s media type %s, Transport %s, "
                   "Num payloads %u", sdp_p->debug_str,
-		  sdp_get_attr_name(attr_p->type),
+                  sdp_get_attr_name(attr_p->type),
                   sdp_get_media_name(cap_p->media),
                   sdp_get_transport_name(cap_p->transport),
                   cap_p->num_payloads);
     }
     return (SDP_SUCCESS);
 }
 
 sdp_result_e sdp_build_attr_cap (sdp_t *sdp_p, sdp_attr_t *attr_p,
@@ -3146,34 +3091,29 @@ sdp_result_e sdp_build_attr_cap (sdp_t *
     u16                   i, j;
     sdp_mca_t            *cap_p;
     sdp_media_profiles_t *profile_p;
 
     /* Get a pointer to the capability structure. */
     cap_p = attr_p->attr.cap_p;
 
     if (cap_p == NULL) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Invalid %s attribute, unable to build.",
-		    sdp_p->debug_str,
-		    sdp_get_attr_name(attr_p->type));
-        }
+        CSFLogError(logTag, "%s Invalid %s attribute, unable to build.",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         /* Return success so build won't fail. */
         return (SDP_SUCCESS);
     }
 
     /* Validate params for this capability line */
     if ((cap_p->media >= SDP_MAX_MEDIA_TYPES) ||
         (cap_p->transport >= SDP_MAX_TRANSPORT_TYPES)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Media or transport type invalid for %s "
-                     "attribute, unable to build.", sdp_p->debug_str,
-		     sdp_get_attr_name(attr_p->type));
-        }
+        CSFLogDebug(logTag, logTag, "%s Media or transport type invalid for %s "
+            "attribute, unable to build.", sdp_p->debug_str,
+		        sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         /* Return success so build won't fail. */
         return (SDP_SUCCESS);
     }
 
     flex_string_sprintf(fs, "a=%s: %u %s ", sdp_attr[attr_p->type].name,
                      sdp_p->cur_cap_num, sdp_get_media_name(cap_p->media));
 
@@ -3250,56 +3190,53 @@ sdp_result_e sdp_parse_attr_cpar (sdp_t 
             cap_attr_p = sdp_find_attr(sdp_p, SDP_SESSION_LEVEL, 0,
                                        cap_type, sdp_p->last_cap_inst);
         } else {
             cap_attr_p = sdp_find_attr(sdp_p, sdp_p->mca_count, 0,
                                        cap_type, sdp_p->last_cap_inst);
         }
     }
     if ((cap_attr_p == NULL) || (cap_attr_p->attr.cap_p == NULL)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: %s attribute specified with no "
-                     "prior %s attribute", sdp_p->debug_str,
-		     sdp_get_attr_name(attr_p->type),
-		     (attr_p->type == SDP_ATTR_CPAR)?
-			(sdp_get_attr_name(SDP_ATTR_CDSC)) :
-			(sdp_get_attr_name(SDP_ATTR_X_CAP)) );
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: %s attribute specified with no "
+            "prior %s attribute", sdp_p->debug_str,
+		         sdp_get_attr_name(attr_p->type),
+		         (attr_p->type == SDP_ATTR_CPAR)?
+			       (sdp_get_attr_name(SDP_ATTR_CDSC)) :
+			       (sdp_get_attr_name(SDP_ATTR_X_CAP)) );
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /*
      * Ensure there is no mixed syntax like CDSC followed by X-CPAR
      * or X-CAP followed by CPAR.
      */
     if (((cap_attr_p->type == SDP_ATTR_CDSC) &&
-	 (attr_p->type == SDP_ATTR_X_CPAR)) ||
-	( (cap_attr_p->type == SDP_ATTR_X_CAP) &&
-	  (attr_p->type == SDP_ATTR_CPAR)) ) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-	    SDP_WARN("%s Warning: %s attribute inconsistent with "
-		    "prior %s attribute", sdp_p->debug_str,
-		    sdp_get_attr_name(attr_p->type),
-		    sdp_get_attr_name(cap_attr_p->type));
-        }
+        (attr_p->type == SDP_ATTR_X_CPAR)) ||
+        ( (cap_attr_p->type == SDP_ATTR_X_CAP) &&
+          (attr_p->type == SDP_ATTR_CPAR)) ) {
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: %s attribute inconsistent with "
+            "prior %s attribute", sdp_p->debug_str,
+            sdp_get_attr_name(attr_p->type),
+            sdp_get_attr_name(cap_attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     cap_p = cap_attr_p->attr.cap_p;
 
     /* a= is the only token we handle in an X-cpar/cpar attribute. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), "= \t", &result);
 
     if ((result != SDP_SUCCESS) || (tmp[0] != 'a') || (tmp[1] != '\0')) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid token type (%s) in %s "
-                     "attribute, unable to parse", sdp_p->debug_str, tmp,
-		     sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Invalid token type (%s) in %s "
+            "attribute, unable to parse", sdp_p->debug_str, tmp,
+            sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     /*sa_ignore NO_NULL_CHK
      *{ptr is valid since the pointer was checked earlier and the
      * function would have exited if NULL.}
      */
     if (*ptr == '=') {
@@ -3312,56 +3249,53 @@ sdp_result_e sdp_parse_attr_cpar (sdp_t 
      *{ptr is valid since the pointer was checked earlier and the
      * function would have exited if NULL.}
      */
     if (ptr[0] == ':') {
         /* Skip the ':' char for parsing attribute parameters. */
         ptr++;
     }
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No attribute type specified for %s "
-                      "attribute, unable to parse.", sdp_p->debug_str,
-		      sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No attribute type specified for %s attribute, unable to parse.",
+            sdp_p->debug_str,
+            sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Reset the type of the attribute from X-cpar/cpar to whatever the
      * specified type is. */
     attr_p->type = SDP_ATTR_INVALID;
     attr_p->next_p = NULL;
     for (i=0; i < SDP_MAX_ATTR_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_attr[i].name, sdp_attr[i].strlen) == 0) {
             attr_p->type = (sdp_attr_e)i;
         }
     }
     if (attr_p->type == SDP_ATTR_INVALID) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Unrecognized attribute (%s) for %s"
-		    " attribute, unable to parse.", sdp_p->debug_str, tmp,
-		    sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Unrecognized attribute (%s) for %s attribute, unable to parse.",
+            sdp_p->debug_str, tmp,
+            sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* We don't allow recursion with the capability attributes. */
     if ((attr_p->type == SDP_ATTR_X_SQN) ||
         (attr_p->type == SDP_ATTR_X_CAP) ||
         (attr_p->type == SDP_ATTR_X_CPAR) ||
-	(attr_p->type == SDP_ATTR_SQN) ||
-	(attr_p->type == SDP_ATTR_CDSC) ||
-	(attr_p->type == SDP_ATTR_CPAR)) {
-	if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid attribute (%s) for %s"
-		    " attribute, unable to parse.", sdp_p->debug_str, tmp,
-		    sdp_get_attr_name(attr_p->type));
-        }
+        (attr_p->type == SDP_ATTR_SQN) ||
+        (attr_p->type == SDP_ATTR_CDSC) ||
+        (attr_p->type == SDP_ATTR_CPAR)) {
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Invalid attribute (%s) for %s"
+            " attribute, unable to parse.", sdp_p->debug_str, tmp,
+            sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Parse the attribute. */
     result = sdp_attr[attr_p->type].parse_func(sdp_p, attr_p, ptr);
     if (result != SDP_SUCCESS) {
         return (result);
@@ -3396,18 +3330,18 @@ sdp_result_e sdp_build_attr_cpar (sdp_t 
 	 * Default to X-CPAR if anything else. This is the backward
 	 * compatible value.
 	 */
 	cpar_name = sdp_get_attr_name(SDP_ATTR_X_CPAR);
     }
 
     while (attr_p != NULL) {
         if (attr_p->type >= SDP_MAX_ATTR_TYPES) {
-            SDP_WARN("%s Invalid attribute type to build (%u)",
-                     sdp_p->debug_str, attr_p->type);
+            CSFLogDebug(logTag, "%s Invalid attribute type to build (%u)",
+                sdp_p->debug_str, attr_p->type);
         } else {
             flex_string_sprintf(fs, "a=%s: ", cpar_name);
 
             result = sdp_attr[attr_p->type].build_func(sdp_p, attr_p, fs);
 
             if (result == SDP_SUCCESS) {
                 if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
                     SDP_PRINT("%s Built %s a=%s attribute line",
@@ -3440,20 +3374,19 @@ sdp_result_e sdp_parse_attr_rtr (sdp_t *
     if (result != SDP_SUCCESS){ // No confirm tag specified is not an error
         return (SDP_SUCCESS);
     } else {
        /* See if confirm was specified.  Defaults to FALSE. */
        if (cpr_strncasecmp(tmp, "confirm", sizeof("confirm")) == 0) {
            attr_p->attr.rtr.confirm = TRUE;
        }
        if (attr_p->attr.rtr.confirm == FALSE) {
-           if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-               SDP_WARN("%s Warning: RTR confirm parameter invalid (%s)",
-                        sdp_p->debug_str, tmp);
-           }
+          sdp_parse_error(sdp_p->peerconnection,
+              "%s Warning: RTR confirm parameter invalid (%s)",
+              sdp_p->debug_str, tmp);
            sdp_p->conf_p->num_invalid_param++;
            return (SDP_INVALID_PARAMETER);
        }
        if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
            SDP_PRINT("%s Parsed a=%s, %s", sdp_p->debug_str,
                      sdp_get_attr_name(attr_p->type),
                      tmp);
        }
@@ -3483,37 +3416,35 @@ sdp_result_e sdp_parse_attr_comediadir (
     attr_p->attr.comediadir.conn_info_present = FALSE;
     attr_p->attr.comediadir.conn_info.nettype = SDP_NT_INVALID;
     attr_p->attr.comediadir.src_port = 0;
 
     /* Find the media direction role. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), ": \t", &result);
 
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No role parameter specified for "
-                     "comediadir attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No role parameter specified for "
+            "comediadir attribute.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.comediadir.role = SDP_MEDIADIR_ROLE_UNSUPPORTED;
     for (i=0; i < SDP_MAX_MEDIADIR_ROLES; i++) {
         if (cpr_strncasecmp(tmp, sdp_mediadir_role[i].name,
                         sdp_mediadir_role[i].strlen) == 0) {
             type_found = TRUE;
             attr_p->attr.comediadir.role = (sdp_mediadir_role_e)i;
             break;
         }
     }
     if (attr_p->attr.comediadir.role == SDP_MEDIADIR_ROLE_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid role type specified for "
-                     "comediadir attribute (%s).", sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Invalid role type specified for "
+            "comediadir attribute (%s).", sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* If the role is passive, we don't expect any more params. */
     if (attr_p->attr.comediadir.role == SDP_MEDIADIR_ROLE_PASSIVE) {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Parsed a=%s, passive",
@@ -3521,20 +3452,19 @@ sdp_result_e sdp_parse_attr_comediadir (
         }
         return (SDP_SUCCESS);
     }
 
     /* Find the connection information if present */
     /* parse to get the nettype */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No network type specified in comediadir "
-                     "attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No network type specified in comediadir "
+            "attribute.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_SUCCESS); /* as the optional parameters are not there */
     }
     attr_p->attr.comediadir.conn_info.nettype = SDP_NT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_NETWORK_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_nettype[i].name,
                         sdp_nettype[i].strlen) == 0) {
             type_found = TRUE;
@@ -3542,72 +3472,67 @@ sdp_result_e sdp_parse_attr_comediadir (
         if (type_found == TRUE) {
             if (sdp_p->conf_p->nettype_supported[i] == TRUE) {
                 attr_p->attr.comediadir.conn_info.nettype = (sdp_nettype_e)i;
             }
             type_found = FALSE;
         }
     }
     if (attr_p->attr.comediadir.conn_info.nettype == SDP_NT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: ConnInfo in Comediadir: network type "
-                     "unsupported (%s).", sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: ConnInfo in Comediadir: network type "
+            "unsupported (%s).", sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
     }
 
     /* Find the comedia address type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No address type specified in comediadir"
-                     " attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No address type specified in comediadir"
+            " attribute.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
     }
     attr_p->attr.comediadir.conn_info.addrtype = SDP_AT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_ADDR_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_addrtype[i].name,
                         sdp_addrtype[i].strlen) == 0) {
             type_found = TRUE;
         }
         if (type_found == TRUE) {
             if (sdp_p->conf_p->addrtype_supported[i] == TRUE) {
                 attr_p->attr.comediadir.conn_info.addrtype = (sdp_addrtype_e)i;
             }
             type_found = FALSE;
         }
     }
     if (attr_p->attr.comediadir.conn_info.addrtype == SDP_AT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Conninfo address type unsupported "
-                     "(%s).", sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Conninfo address type unsupported "
+            "(%s).", sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
     }
 
     /* Find the conninfo address.  */
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.comediadir.conn_info.conn_addr,
                             sizeof(attr_p->attr.comediadir.conn_info.conn_addr), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No conninfo address specified in "
-                     "comediadir attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No conninfo address specified in "
+            "comediadir attribute.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
     }
 
     /* Find the src port info , if any */
     attr_p->attr.comediadir.src_port  = sdp_getnextnumtok(ptr, &ptr, " \t",
                                                           &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No src port specified in "
-                     "comediadir attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No src port specified in "
+            "comediadir attribute.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, network %s, addr type %s, address %s "
                   "srcport %u ",
                   sdp_p->debug_str, sdp_get_attr_name(attr_p->type),
                   sdp_get_network_name(attr_p->attr.comediadir.conn_info.nettype),
@@ -3639,117 +3564,109 @@ sdp_result_e sdp_parse_attr_silencesupp 
     int i;
     sdp_result_e result;
     char tmp[SDP_MAX_STRING_LEN];
 
     /* Find silenceSuppEnable */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
 
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No silenceSupp enable value specified, parse failed.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No silenceSupp enable value specified, parse failed.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (cpr_strncasecmp(tmp, "on", sizeof("on")) == 0) {
         attr_p->attr.silencesupp.enabled = TRUE;
     } else if (cpr_strncasecmp(tmp, "off", sizeof("off")) == 0) {
         attr_p->attr.silencesupp.enabled = FALSE;
     } else if (cpr_strncasecmp(tmp, "-", sizeof("-")) == 0) {
         attr_p->attr.silencesupp.enabled = FALSE;
     } else {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: silenceSuppEnable parameter invalid (%s)",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: silenceSuppEnable parameter invalid (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find silenceTimer -- u16 or "-" */
 
     attr_p->attr.silencesupp.timer =
         (u16)sdp_getnextnumtok_or_null(ptr, &ptr, " \t",
                                        &attr_p->attr.silencesupp.timer_null,
                                        &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid timer value specified for "
-                     "silenceSupp attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Invalid timer value specified for "
+            "silenceSupp attribute.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find suppPref */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No silenceSupp pref specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No silenceSupp pref specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.silencesupp.pref = SDP_SILENCESUPP_PREF_UNKNOWN;
     for (i=0; i < SDP_MAX_SILENCESUPP_PREF; i++) {
         if (cpr_strncasecmp(tmp, sdp_silencesupp_pref[i].name,
                         sdp_silencesupp_pref[i].strlen) == 0) {
             attr_p->attr.silencesupp.pref = (sdp_silencesupp_pref_e)i;
         }
     }
     if (attr_p->attr.silencesupp.pref == SDP_SILENCESUPP_PREF_UNKNOWN) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: silenceSupp pref unrecognized (%s)",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: silenceSupp pref unrecognized (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find sidUse */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No silenceSupp sidUse specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No silenceSupp sidUse specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.silencesupp.siduse = SDP_SILENCESUPP_SIDUSE_UNKNOWN;
     for (i=0; i < SDP_MAX_SILENCESUPP_SIDUSE; i++) {
         if (cpr_strncasecmp(tmp, sdp_silencesupp_siduse[i].name,
                         sdp_silencesupp_siduse[i].strlen) == 0) {
             attr_p->attr.silencesupp.siduse = (sdp_silencesupp_siduse_e)i;
         }
     }
     if (attr_p->attr.silencesupp.siduse == SDP_SILENCESUPP_SIDUSE_UNKNOWN) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: silenceSupp sidUse unrecognized (%s)",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: silenceSupp sidUse unrecognized (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find fxnslevel -- u8 or "-" */
     attr_p->attr.silencesupp.fxnslevel =
         (u8)sdp_getnextnumtok_or_null(ptr, &ptr, " \t",
                                       &attr_p->attr.silencesupp.fxnslevel_null,
                                       &result);
 
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid fxnslevel value specified for "
-                     "silenceSupp attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Invalid fxnslevel value specified for "
+            "silenceSupp attribute.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, enabled %s",
                   sdp_p->debug_str, sdp_get_attr_name(attr_p->type),
                   (attr_p->attr.silencesupp.enabled ? "on" : "off"));
@@ -3825,20 +3742,19 @@ tinybool sdp_parse_context_crypto_suite(
 	   attr_p->attr.srtp_context.master_key_size_bytes =
 	       sdp_srtp_crypto_suite_array[i].key_size_bytes;
 	   attr_p->attr.srtp_context.master_salt_size_bytes =
 	       sdp_srtp_crypto_suite_array[i].salt_size_bytes;
 	   return TRUE; /* There is a succesful match so exit */
 	 }
        }
        /* couldn't find a matching crypto suite */
-       if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No Matching crypto suite for SRTP Context(%s)-'X-crypto:v1' expected",
-                      sdp_p->debug_str, str);
-       }
+       sdp_parse_error(sdp_p->peerconnection,
+            "%s No Matching crypto suite for SRTP Context(%s)-'X-crypto:v1' expected",
+            sdp_p->debug_str, str);
 
        return FALSE;
 }
 
 
 sdp_result_e sdp_build_attr_srtpcontext (sdp_t *sdp_p, sdp_attr_t *attr_p,
                                     flex_string *fs)
 {
@@ -3856,17 +3772,17 @@ sdp_result_e sdp_build_attr_srtpcontext 
     bcopy(attr_p->attr.srtp_context.master_key, base64_encoded_input,
 	    key_size );
     bcopy(attr_p->attr.srtp_context.master_salt,
 	    base64_encoded_input + key_size, salt_size );
 
     if ((status = base64_encode(base64_encoded_input, key_size + salt_size,
 		      base64_encoded_data, &output_len)) != BASE64_SUCCESS) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Error: Failure to Base64 Encoded data (%s) ",
+            CSFLogError(logTag, "%s Error: Failure to Base64 Encoded data (%s) ",
                      sdp_p->debug_str, BASE64_RESULT_TO_STRING(status));
         }
 	return (SDP_INVALID_PARAMETER);
     }
 
     *(base64_encoded_data + output_len) = '\0';
 
     flex_string_sprintf(fs, "a=%s:%s inline:%s||\r\n",
@@ -3908,20 +3824,19 @@ sdp_result_e sdp_parse_attr_mptime (
         attr_p->attr.mptime.num_intervals++;
     }
 
     /*
      * At least one parameter must be supplied. If not, return an error
      * and optionally log the failure.
      */
     if (attr_p->attr.mptime.num_intervals == 0) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No intervals specified for %s attr.",
-                     sdp_p->debug_str, sdp_attr[attr_p->type].name);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No intervals specified for %s attr.",
+            sdp_p->debug_str, sdp_attr[attr_p->type].name);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /*
      * Here is some debugging code that helps us track what data
      * is received and parsed.
      */
@@ -3985,20 +3900,19 @@ sdp_result_e sdp_parse_attr_x_sidin (sdp
         SDP_PRINT("%s Parsing a=%s", sdp_p->debug_str,
                      sdp_get_attr_name(attr_p->type));
     }
 
     /* Find the X-sidin value */
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.stream_data.x_sidin,
                             sizeof(attr_p->attr.stream_data.x_sidin), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No Stream Id incoming specified for "
-                     "X-sidin attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No Stream Id incoming specified for X-sidin attribute.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, %s", sdp_p->debug_str,
                   sdp_get_attr_name(attr_p->type),
                   attr_p->attr.stream_data.x_sidin);
@@ -4026,20 +3940,19 @@ sdp_result_e sdp_parse_attr_x_sidout (sd
         SDP_PRINT("%s Parsing a=%s", sdp_p->debug_str,
                      sdp_get_attr_name(attr_p->type));
     }
 
     /* Find the X-sidout value */
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.stream_data.x_sidout,
                             sizeof(attr_p->attr.stream_data.x_sidout), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No Stream Id outgoing specified for "
-                     "X-sidout attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No Stream Id outgoing specified for X-sidout attribute.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, %s", sdp_p->debug_str,
                   sdp_get_attr_name(attr_p->type),
                   attr_p->attr.stream_data.x_sidout);
@@ -4068,20 +3981,19 @@ sdp_result_e sdp_parse_attr_x_confid (sd
         SDP_PRINT("%s Parsing a=%s", sdp_p->debug_str,
                   sdp_get_attr_name(attr_p->type));
     }
 
     /* Find the X-confid value */
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.stream_data.x_confid,
                             sizeof(attr_p->attr.stream_data.x_confid), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No Conf Id incoming specified for "
-                     "X-confid attribute.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No Conf Id incoming specified for "
+            "X-confid attribute.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s, %s", sdp_p->debug_str,
                   sdp_get_attr_name(attr_p->type),
                   attr_p->attr.stream_data.x_confid);
@@ -4118,38 +4030,36 @@ sdp_result_e sdp_parse_attr_group (sdp_t
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsing a=%s", sdp_p->debug_str,
                   sdp_get_attr_name(attr_p->type));
     }
 
     /* Find the a=group:<attrib> <id1> < id2> ... values */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No group attribute value specified for "
-                     "a=group line", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No group attribute value specified for "
+            "a=group line", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p->attr.stream_data.group_attr = SDP_GROUP_ATTR_UNSUPPORTED;
     for (i=0; i < SDP_MAX_GROUP_ATTR_VAL; i++) {
         if (cpr_strncasecmp(tmp, sdp_group_attr_val[i].name,
                         sdp_group_attr_val[i].strlen) == 0) {
             attr_p->attr.stream_data.group_attr = (sdp_group_attr_e)i;
             break;
         }
     }
 
     if (attr_p->attr.stream_data.group_attr == SDP_GROUP_ATTR_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Group attribute type unsupported (%s).",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Group attribute type unsupported (%s).",
+            sdp_p->debug_str, tmp);
     }
 
 
     /*
      * Scan the input line up after group:<attr>  to the maximum number
      * of id available.
      */
     attr_p->attr.stream_data.num_group_id =0;
@@ -4211,36 +4121,34 @@ sdp_result_e sdp_parse_attr_source_filte
     attr_p->attr.source_filter.nettype = SDP_NT_UNSUPPORTED;
     attr_p->attr.source_filter.addrtype = SDP_AT_UNSUPPORTED;
     attr_p->attr.source_filter.dest_addr[0] = '\0';
     attr_p->attr.source_filter.num_src_addr = 0;
 
     /* Find the filter mode */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No src filter attribute value specified for "
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No src filter attribute value specified for "
                      "a=source-filter line", sdp_p->debug_str);
-        }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     for (i = 0; i < SDP_MAX_FILTER_MODE; i++) {
         if (cpr_strncasecmp(tmp, sdp_src_filter_mode_val[i].name,
                         sdp_src_filter_mode_val[i].strlen) == 0) {
             attr_p->attr.source_filter.mode = (sdp_src_filter_mode_e)i;
             break;
         }
     }
     if (attr_p->attr.source_filter.mode == SDP_FILTER_MODE_NOT_PRESENT) {
         /* No point continuing */
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid src filter mode for a=source-filter "
-                     "line", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Invalid src filter mode for a=source-filter "
+            "line", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the network type */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
         sdp_p->conf_p->num_invalid_param++;
@@ -4250,20 +4158,19 @@ sdp_result_e sdp_parse_attr_source_filte
         if (cpr_strncasecmp(tmp, sdp_nettype[i].name,
                         sdp_nettype[i].strlen) == 0) {
             if (sdp_p->conf_p->nettype_supported[i] == TRUE) {
                 attr_p->attr.source_filter.nettype = (sdp_nettype_e)i;
             }
         }
     }
     if (attr_p->attr.source_filter.nettype == SDP_NT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Network type unsupported "
-                     "(%s) for a=source-filter", sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Network type unsupported "
+            "(%s) for a=source-filter", sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the address type */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
         sdp_p->conf_p->num_invalid_param++;
@@ -4276,51 +4183,48 @@ sdp_result_e sdp_parse_attr_source_filte
                 attr_p->attr.source_filter.addrtype = (sdp_addrtype_e)i;
             }
         }
     }
     if (attr_p->attr.source_filter.addrtype == SDP_AT_UNSUPPORTED) {
         if (strncmp(tmp, "*", 1) == 0) {
             attr_p->attr.source_filter.addrtype = SDP_AT_FQDN;
         } else {
-            if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                SDP_WARN("%s Warning: Address type unsupported "
-                         "(%s) for a=source-filter", sdp_p->debug_str, tmp);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Warning: Address type unsupported "
+                "(%s) for a=source-filter", sdp_p->debug_str, tmp);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
     }
 
     /* Find the destination addr */
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.source_filter.dest_addr,
                             sizeof(attr_p->attr.source_filter.dest_addr), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No filter destination address specified for "
-                      "a=source-filter", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No filter destination address specified for "
+            "a=source-filter", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the list of source address to apply the filter */
     for (i = 0; i < SDP_MAX_SRC_ADDR_LIST; i++) {
         ptr = sdp_getnextstrtok(ptr, attr_p->attr.source_filter.src_list[i],
                                 sizeof(attr_p->attr.source_filter.src_list[i]), " \t", &result);
         if (result != SDP_SUCCESS) {
             break;
         }
         attr_p->attr.source_filter.num_src_addr++;
     }
     if (attr_p->attr.source_filter.num_src_addr == 0) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No source list provided "
-                     "for a=source-filter", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No source list provided "
+            "for a=source-filter", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     return (SDP_SUCCESS);
 }
 
 sdp_result_e sdp_build_source_filter (sdp_t *sdp_p, sdp_attr_t *attr_p,
@@ -4356,35 +4260,33 @@ sdp_result_e sdp_parse_attr_rtcp_unicast
     char tmp[SDP_MAX_STRING_LEN];
 
     attr_p->attr.u32_val = SDP_RTCP_UNICAST_MODE_NOT_PRESENT;
 
     memset(tmp, 0, sizeof(tmp));
 
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No rtcp unicast mode specified for "
-                     "a=rtcp-unicast line", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No rtcp unicast mode specified for "
+            "a=rtcp-unicast line", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     for (i = 0; i < SDP_RTCP_MAX_UNICAST_MODE;  i++) {
         if (cpr_strncasecmp(tmp, sdp_rtcp_unicast_mode_val[i].name,
                         sdp_rtcp_unicast_mode_val[i].strlen) == 0) {
             attr_p->attr.u32_val = i;
             break;
         }
     }
     if (attr_p->attr.u32_val == SDP_RTCP_UNICAST_MODE_NOT_PRESENT) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid rtcp unicast mode for "
-                     "a=rtcp-unicast line", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Invalid rtcp unicast mode for "
+            "a=rtcp-unicast line", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     return (SDP_SUCCESS);
 }
 
 sdp_result_e sdp_build_attr_rtcp_unicast (sdp_t *sdp_p, sdp_attr_t *attr_p,
                                           flex_string *fs)
@@ -4480,19 +4382,18 @@ sdp_parse_sdescriptions_key_param (const
     tinybool        keyFound = FALSE;
     int             len,
                     keySize,
     		    saltSize;
     base64_result_t status;
 
     ptr = str;
     if (cpr_strncasecmp(ptr, "inline:", 7) != 0) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Could not find keyword inline", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Could not find keyword inline", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return FALSE;
     }
 
     /* advance pass the inline key word */
     ptr = ptr + 7;
     ptr = sdp_getnextstrtok(ptr, buf, sizeof(buf), "|", &result);
     while (result == SDP_SUCCESS) {
@@ -4501,38 +4402,32 @@ sdp_parse_sdescriptions_key_param (const
 	    keyFound = TRUE;
 	    len = SDP_MAX_STRING_LEN;
 	    /* The key is base64 encoded composed of the master key concatenated with the
 	     * master salt.
 	     */
 	    status = base64_decode((unsigned char *)buf, strlen(buf),
 	                           (unsigned char *)base64decodeData, &len);
 
-	    if (status != BASE64_SUCCESS) {
-	        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-		    SDP_ERROR("%s key-salt error decoding buffer: %s",
-			      sdp_p->debug_str, BASE64_RESULT_TO_STRING(status));
-	        }
-	        return FALSE;
-
-	    }
-
-	    keySize = attr_p->attr.srtp_context.master_key_size_bytes;
-	    saltSize = attr_p->attr.srtp_context.master_salt_size_bytes;
-
-	    if (len != keySize + saltSize) {
-
-	        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-		    SDP_ERROR("%s key-salt size doesn't match: (%d, %d, %d)",
-		              sdp_p->debug_str, len, keySize, saltSize);
-	        }
-
-	        return(FALSE);
-
-	    }
+        if (status != BASE64_SUCCESS) {
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s key-salt error decoding buffer: %s",
+                sdp_p->debug_str, BASE64_RESULT_TO_STRING(status));
+            return FALSE;
+        }
+
+        keySize = attr_p->attr.srtp_context.master_key_size_bytes;
+        saltSize = attr_p->attr.srtp_context.master_salt_size_bytes;
+
+        if (len != keySize + saltSize) {
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s key-salt size doesn't match: (%d, %d, %d)",
+                sdp_p->debug_str, len, keySize, saltSize);
+            return(FALSE);
+        }
 
 	    bcopy(base64decodeData, attr_p->attr.srtp_context.master_key, keySize);
 
 	    bcopy(base64decodeData + keySize,
 	          attr_p->attr.srtp_context.master_salt, saltSize);
 
 	    /* Used only for MGCP */
 	    SDP_SRTP_CONTEXT_SET_MASTER_KEY
@@ -4545,19 +4440,18 @@ sdp_parse_sdescriptions_key_param (const
        }
 
        /* if we haven't reached the end of line, get the next token */
        ptr = sdp_getnextstrtok(ptr, buf, sizeof(buf), "|", &result);
     }
 
     /* if we didn't find the key, error out */
     if (keyFound == FALSE) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Could not find sdescriptions key", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Could not find sdescriptions key", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return FALSE;
     }
 
     return TRUE;
 
 }
 
@@ -4595,17 +4489,17 @@ sdp_build_attr_sdescriptions (sdp_t *sdp
           base64_encoded_input + keySize, saltSize);
 
     outputLen = MAX_BASE64_STRING_LEN;
     status = base64_encode(base64_encoded_input, keySize + saltSize,
 		           base64_encoded_data, &outputLen);
 
     if (status != BASE64_SUCCESS) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Error: Failure to Base64 Encoded data (%s) ",
+            CSFLogError(logTag, "%s Error: Failure to Base64 Encoded data (%s) ",
                        sdp_p->debug_str, BASE64_RESULT_TO_STRING(status));
         }
 	return (SDP_INVALID_PARAMETER);
 
     }
 
     base64_encoded_data[outputLen] = 0;
 
@@ -4699,56 +4593,51 @@ sdp_parse_attr_srtp (sdp_t *sdp_p, sdp_a
              (attr_p->attr.srtp_context.selection_flags);
 
     /* get the tag only if we are version 9 */
     if (vtype == SDP_ATTR_SDESCRIPTIONS) {
         attr_p->attr.srtp_context.tag =
                 sdp_getnextnumtok(ptr, &ptr, " \t", &result);
 
         if (result != SDP_SUCCESS) {
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Could not find sdescriptions tag",
-		          sdp_p->debug_str);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Could not find sdescriptions tag",
+                sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
 
         }
     }
 
     /* get the crypto suite */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Could not find sdescriptions crypto suite", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Could not find sdescriptions crypto suite", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (!sdp_parse_context_crypto_suite(tmp, attr_p, sdp_p)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Unsupported crypto suite", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Unsupported crypto suite", sdp_p->debug_str);
 	    return (SDP_INVALID_PARAMETER);
     }
 
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Could not find sdescriptions key params", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Could not find sdescriptions key params", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (!sdp_parse_sdescriptions_key_param(tmp, attr_p, sdp_p)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Failed to parse key-params", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Failed to parse key-params", sdp_p->debug_str);
         return (SDP_INVALID_PARAMETER);
     }
 
     /* if there are session parameters, scan the session parameters
      * into tmp until we reach end of line. Currently the sdp parser
      * does not parse session parameters but if they are present,
      * we store them for the application.
      */
@@ -4807,22 +4696,20 @@ sdp_result_e sdp_build_attr_ice_attr (sd
 
 
 sdp_result_e sdp_parse_attr_ice_attr (sdp_t *sdp_p, sdp_attr_t *attr_p, const char *ptr) {
     sdp_result_e  result;
     char tmp[SDP_MAX_STRING_LEN];
 
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), "\r\n", &result);
     if (result != SDP_SUCCESS){
-
-      if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-          SDP_WARN("%s Warning: problem parsing ice attribute ", sdp_p->debug_str);
-      }
-      sdp_p->conf_p->num_invalid_param++;
-      return (SDP_INVALID_PARAMETER);
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: problem parsing ice attribute ", sdp_p->debug_str);
+        sdp_p->conf_p->num_invalid_param++;
+        return (SDP_INVALID_PARAMETER);
     }
 
     /* We need the attr= here. This is pretty gross. */
     snprintf(attr_p->attr.ice_attr, sizeof(attr_p->attr.ice_attr),
       "%s:%s", sdp_get_attr_name(attr_p->type), tmp);
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
       SDP_PRINT("%s Parsed a=%s, %s", sdp_p->debug_str, sdp_get_attr_name(attr_p->type), tmp);
@@ -4834,20 +4721,19 @@ sdp_result_e sdp_parse_attr_ice_attr (sd
 sdp_result_e sdp_parse_attr_fingerprint_attr (sdp_t *sdp_p, sdp_attr_t *attr_p,
                                            const char *ptr)
 {
     sdp_result_e  result;
 
     ptr = sdp_getnextstrtok(ptr, attr_p->attr.string_val, sizeof(attr_p->attr.string_val), "\r\n", &result);
 
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No string token found for %s attribute",
-                     sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No string token found for %s attribute",
+            sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Parsed a=%s, %s", sdp_p->debug_str,
                       sdp_get_attr_name(attr_p->type),
                       attr_p->attr.string_val);
         }
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr_access.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr_access.c
@@ -1,15 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "sdp_os_defs.h"
 #include "sdp.h"
 #include "sdp_private.h"
+#include "CSFLog.h"
+
+static const char* logTag = "sdp_attr_access";
 
 /* Attribute access routines are all defined by the following parameters.
  *
  * sdp_ptr     The SDP handle returned by sdp_init_description.
  * level       The level the attribute is defined.  Can be either
  *             SDP_SESSION_LEVEL or 0-n specifying a media line level.
  * inst_num    The instance number of the attribute.  Multiple instances
  *             of a particular attribute may exist at each level and so
@@ -178,17 +181,17 @@ sdp_result_e sdp_add_new_attr (void *sdp
         return (SDP_INVALID_SDP_PTR);
     }
 
     if ((cap_num != 0) &&
         ((attr_type == SDP_ATTR_X_CAP) || (attr_type == SDP_ATTR_X_CPAR) ||
          (attr_type == SDP_ATTR_X_SQN) || (attr_type == SDP_ATTR_CDSC) ||
 	 (attr_type == SDP_ATTR_CPAR) || (attr_type == SDP_ATTR_SQN))) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid attribute type for X-cpar/cdsc "
+            CSFLogDebug(logTag, "%s Warning: Invalid attribute type for X-cpar/cdsc "
                      "parameter.", sdp_p->debug_str);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Some attributes are valid only under media level */
     if (level == SDP_SESSION_LEVEL) {
@@ -717,17 +720,17 @@ sdp_result_e sdp_copy_attr (void *src_sd
         src_sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     src_attr_p = sdp_find_attr(src_sdp_p, src_level, src_cap_num,
                                src_attr_type, src_inst_num);
     if (src_attr_p == NULL) {
         if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Error: Source attribute for copy not found.",
+            CSFLogError(logTag, "%s Error: Source attribute for copy not found.",
                       src_sdp_p->debug_str);
         }
         src_sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     new_attr_p = (sdp_attr_t *)SDP_MALLOC(sizeof(sdp_attr_t));
     if (new_attr_p == NULL) {
@@ -1156,32 +1159,32 @@ sdp_result_e sdp_copy_all_attrs (void *s
 
     /* Find src attribute list. */
     if (src_level == SDP_SESSION_LEVEL) {
         src_attr_p = src_sdp_p->sess_attrs_p;
     } else {
         mca_p = sdp_find_media_level(src_sdp_p, src_level);
         if (mca_p == NULL) {
             if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Invalid src media level (%u) for copy all "
+                CSFLogError(logTag, "%s Invalid src media level (%u) for copy all "
                           "attrs ", src_sdp_p->debug_str, src_level);
             }
             return (SDP_INVALID_PARAMETER);
         }
         src_attr_p = mca_p->media_attrs_p;
     }
 
     /* Find dst attribute list. */
     if (dst_level == SDP_SESSION_LEVEL) {
         dst_attr_p = dst_sdp_p->sess_attrs_p;
     } else {
         mca_p = sdp_find_media_level(dst_sdp_p, dst_level);
         if (mca_p == NULL) {
             if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Invalid dst media level (%u) for copy all "
+                CSFLogError(logTag, "%s Invalid dst media level (%u) for copy all "
                           "attrs ", src_sdp_p->debug_str, dst_level);
             }
             return (SDP_INVALID_PARAMETER);
         }
         dst_attr_p = mca_p->media_attrs_p;
     }
 
     /* Now find the end of the dst attr list.  This is where we will
@@ -1407,17 +1410,17 @@ sdp_result_e sdp_get_attr_type (void *sd
     *inst_num = 0;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if (attr_num < 1) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s, invalid attr num specified (%u) at level %u",
+            CSFLogError(logTag, "%s %s, invalid attr num specified (%u) at level %u",
                       sdp_p->debug_str, fname, attr_num, level);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     for (i=0; i < SDP_MAX_ATTR_TYPES; i++) {
         attr_count[i] = 0;
@@ -1514,17 +1517,17 @@ sdp_result_e sdp_delete_attr (void *sdp_
                     attr_count++;
                     if (attr_count == inst_num) {
                         break;
                     }
                 }
             }
             if (attr_p == NULL) {
                 if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                    SDP_ERROR("%s Delete attribute (%s) instance %d not "
+                    CSFLogError(logTag, "%s Delete attribute (%s) instance %d not "
                               "found.", sdp_p->debug_str,
                               sdp_get_attr_name(attr_type), inst_num);
                 }
                 sdp_p->conf_p->num_invalid_param++;
                 return (SDP_INVALID_PARAMETER);
             }
             if (prev_attr_p == NULL) {
                 sdp_p->sess_attrs_p = attr_p->next_p;
@@ -1544,17 +1547,17 @@ sdp_result_e sdp_delete_attr (void *sdp_
                     attr_count++;
                     if (attr_count == inst_num) {
                         break;
                     }
                 }
             }
             if (attr_p == NULL) {
                 if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                    SDP_ERROR("%s Delete attribute (%s) instance %d "
+                    CSFLogError(logTag, "%s Delete attribute (%s) instance %d "
                               "not found.", sdp_p->debug_str,
                               sdp_get_attr_name(attr_type), inst_num);
                 }
                 sdp_p->conf_p->num_invalid_param++;
                 return (SDP_INVALID_PARAMETER);
             }
             if (prev_attr_p == NULL) {
                 mca_p->media_attrs_p = attr_p->next_p;
@@ -1578,17 +1581,17 @@ sdp_result_e sdp_delete_attr (void *sdp_
                 attr_count++;
                 if (attr_count == inst_num) {
                     break;
                 }
             }
         }
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Delete X-cpar/cpar attribute (%s) cap_num %u, "
+                CSFLogError(logTag, "%s Delete X-cpar/cpar attribute (%s) cap_num %u, "
                           "instance %d not found.", sdp_p->debug_str,
                           sdp_get_attr_name(attr_type), cap_num, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
         if (prev_attr_p == NULL) {
             cap_p->media_attrs_p = attr_p->next_p;
@@ -1707,17 +1710,17 @@ sdp_result_e sdp_find_attr_list (sdp_t *
             }
             *attr_p = mca_p->media_attrs_p;
         }
     } else {
         /* Find the attr list for the capability specified. */
         cap_attr_p = sdp_find_capability(sdp_p, level, cap_num);
         if (cap_attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s %s, invalid capability %u at "
+                CSFLogError(logTag, "%s %s, invalid capability %u at "
                           "level %u specified.", sdp_p->debug_str, fname,
                           cap_num, level);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_CAPABILITY);
         }
         cap_p = cap_attr_p->attr.cap_p;
         *attr_p = cap_p->media_attrs_p;
@@ -1845,17 +1848,17 @@ sdp_attr_t *sdp_find_capability (sdp_t *
                     return (attr_p);
                 }
             }
         }
     }
 
     /* We didn't find the specified capability. */
     if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-        SDP_ERROR("%s Unable to find specified capability (level %u, "
+        CSFLogError(logTag, "%s Unable to find specified capability (level %u, "
                   "cap_num %u).", sdp_p->debug_str, level, cap_num);
     }
     sdp_p->conf_p->num_invalid_param++;
     return (NULL);
 }
 
 /* Function:    sdp_attr_valid(void *sdp_ptr)
  * Description: Returns true or false depending on whether the specified
@@ -1918,27 +1921,27 @@ const char *sdp_attr_get_simple_string (
         (attr_type != SDP_ATTR_DIALED) &&
         (attr_type != SDP_ATTR_DIALING) &&
         (attr_type != SDP_ATTR_FRAMING) &&
         (attr_type != SDP_ATTR_X_SIDIN) &&
         (attr_type != SDP_ATTR_X_SIDOUT)&&
         (attr_type != SDP_ATTR_X_CONFID) &&
         (attr_type != SDP_ATTR_LABEL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute type is not a simple string (%s)",
+            CSFLogError(logTag, "%s Attribute type is not a simple string (%s)",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type));
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, attr_type, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute %s, level %u instance %u not found.",
+            CSFLogError(logTag, "%s Attribute %s, level %u instance %u not found.",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type),
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         return (attr_p->attr.string_val);
     }
@@ -1980,27 +1983,27 @@ sdp_result_e sdp_attr_set_simple_string 
         (attr_type != SDP_ATTR_DIALED) &&
         (attr_type != SDP_ATTR_DIALING) &&
         (attr_type != SDP_ATTR_FRAMING) &&
         (attr_type != SDP_ATTR_X_SIDIN) &&
         (attr_type != SDP_ATTR_X_SIDOUT)&&
         (attr_type != SDP_ATTR_X_CONFID) &&
         (attr_type != SDP_ATTR_LABEL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute type is not a simple string (%s)",
+            CSFLogError(logTag, "%s Attribute type is not a simple string (%s)",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type));
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, attr_type, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute %s, level %u instance %u not found.",
+            CSFLogError(logTag, "%s Attribute %s, level %u instance %u not found.",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type),
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         sstrncpy(attr_p->attr.string_val, string_parm,
                  sizeof(attr_p->attr.string_val));
@@ -2049,27 +2052,27 @@ u32 sdp_attr_get_simple_u32 (void *sdp_p
         (attr_type != SDP_ATTR_TC1_PAYLOAD_BYTES) &&
         (attr_type != SDP_ATTR_TC1_WINDOW_SIZE) &&
         (attr_type != SDP_ATTR_TC2_PAYLOAD_BYTES) &&
         (attr_type != SDP_ATTR_TC2_WINDOW_SIZE) &&
         (attr_type != SDP_ATTR_RTCP) &&
         (attr_type != SDP_ATTR_MID) &&
         (attr_type != SDP_ATTR_FRAMERATE)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute type is not a simple u32 (%s)",
+            CSFLogError(logTag, "%s Attribute type is not a simple u32 (%s)",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type));
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, attr_type, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute %s, level %u instance %u not found.",
+            CSFLogError(logTag, "%s Attribute %s, level %u instance %u not found.",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type),
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.u32_val);
     }
@@ -2114,27 +2117,27 @@ sdp_result_e sdp_attr_set_simple_u32 (vo
         (attr_type != SDP_ATTR_TC1_PAYLOAD_BYTES) &&
         (attr_type != SDP_ATTR_TC1_WINDOW_SIZE) &&
         (attr_type != SDP_ATTR_TC2_PAYLOAD_BYTES) &&
         (attr_type != SDP_ATTR_TC2_WINDOW_SIZE) &&
         (attr_type != SDP_ATTR_RTCP) &&
         (attr_type != SDP_ATTR_MID) &&
         (attr_type != SDP_ATTR_FRAMERATE)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute type is not a simple u32 (%s)",
+            CSFLogError(logTag, "%s Attribute type is not a simple u32 (%s)",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type));
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, attr_type, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute %s, level %u instance %u not found.",
+            CSFLogError(logTag, "%s Attribute %s, level %u instance %u not found.",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type),
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.u32_val = num_parm;
         return (SDP_SUCCESS);
@@ -2171,27 +2174,27 @@ tinybool sdp_attr_get_simple_boolean (vo
         return (FALSE);
     }
 
     if ((attr_type != SDP_ATTR_T38_FILLBITREMOVAL) &&
         (attr_type != SDP_ATTR_T38_TRANSCODINGMMR) &&
         (attr_type != SDP_ATTR_T38_TRANSCODINGJBIG) &&
         (attr_type != SDP_ATTR_TMRGWXID)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute type is not a simple boolean (%s)",
+            CSFLogError(logTag, "%s Attribute type is not a simple boolean (%s)",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type));
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, attr_type, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute %s, level %u instance %u not found.",
+            CSFLogError(logTag, "%s Attribute %s, level %u instance %u not found.",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type),
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.boolean_val);
     }
@@ -2225,27 +2228,27 @@ sdp_result_e sdp_attr_set_simple_boolean
         return (SDP_INVALID_SDP_PTR);
     }
 
     if ((attr_type != SDP_ATTR_T38_FILLBITREMOVAL) &&
         (attr_type != SDP_ATTR_T38_TRANSCODINGMMR) &&
         (attr_type != SDP_ATTR_T38_TRANSCODINGJBIG) &&
         (attr_type != SDP_ATTR_TMRGWXID)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute type is not a simple boolean (%s)",
+            CSFLogError(logTag, "%s Attribute type is not a simple boolean (%s)",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type));
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, attr_type, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute %s, level %u instance %u not found.",
+            CSFLogError(logTag, "%s Attribute %s, level %u instance %u not found.",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type),
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.boolean_val = (tinybool)bool_parm;
         return (SDP_SUCCESS);
@@ -2273,17 +2276,17 @@ sdp_attr_get_maxprate (void *sdp_ptr, u1
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (NULL);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_MAXPRATE, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute %s, level %u instance %u not found.",
+            CSFLogError(logTag, "%s Attribute %s, level %u instance %u not found.",
                       sdp_p->debug_str, sdp_get_attr_name(SDP_ATTR_MAXPRATE),
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         return (attr_p->attr.string_val);
     }
@@ -2330,26 +2333,26 @@ sdp_attr_set_maxprate (void *sdp_ptr, u1
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_MAXPRATE, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Attribute %s, level %u instance %u not found.",
+            CSFLogError(logTag, "%s Attribute %s, level %u instance %u not found.",
                       sdp_p->debug_str, sdp_get_attr_name(SDP_ATTR_MAXPRATE),
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (!sdp_validate_maxprate(string_parm)) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s is not a valid maxprate value.", string_parm);
+                CSFLogError(logTag, "%s is not a valid maxprate value.", string_parm);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
 
         sstrncpy(attr_p->attr.string_val, string_parm,
                  sizeof(attr_p->attr.string_val));
         return (SDP_SUCCESS);
@@ -2376,17 +2379,17 @@ sdp_t38_ratemgmt_e sdp_attr_get_t38ratem
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_T38_UNKNOWN_RATE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_T38_RATEMGMT, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s t38ratemgmt attribute, level %u instance %u "
+            CSFLogError(logTag, "%s t38ratemgmt attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_T38_UNKNOWN_RATE);
     } else {
         return (attr_p->attr.t38ratemgmt);
     }
 }
@@ -2413,17 +2416,17 @@ sdp_result_e sdp_attr_set_t38ratemgmt (v
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_T38_RATEMGMT, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s t38ratemgmt attribute, level %u instance %u "
+            CSFLogError(logTag, "%s t38ratemgmt attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.t38ratemgmt = t38ratemgmt;
         return (SDP_SUCCESS);
     }
@@ -2450,17 +2453,17 @@ sdp_t38_udpec_e sdp_attr_get_t38udpec (v
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_T38_UDPEC_UNKNOWN);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_T38_UDPEC, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s t38udpec attribute, level %u instance %u "
+            CSFLogError(logTag, "%s t38udpec attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_T38_UDPEC_UNKNOWN);
     } else {
         return (attr_p->attr.t38udpec);
     }
 }
@@ -2487,17 +2490,17 @@ sdp_result_e sdp_attr_set_t38udpec (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_T38_UDPEC, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s t38udpec attribute, level %u instance %u "
+            CSFLogError(logTag, "%s t38udpec attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.t38udpec = t38udpec;
         return (SDP_SUCCESS);
     }
@@ -2549,17 +2552,17 @@ sdp_direction_e sdp_get_media_direction 
             } else if (attr_p->type == SDP_ATTR_RECVONLY) {
                 direction = SDP_DIRECTION_RECVONLY;
             } else if (attr_p->type == SDP_ATTR_SENDRECV) {
                 direction = SDP_DIRECTION_SENDRECV;
             }
         }
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid cap_num for media direction.",
+            CSFLogDebug(logTag, "%s Warning: Invalid cap_num for media direction.",
                      sdp_p->debug_str);
         }
     }
 
     return (direction);
 }
 
 /*
@@ -2688,25 +2691,25 @@ sdp_qos_strength_e sdp_attr_get_qos_stre
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_QOS_STRENGTH_UNKNOWN);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid QOS attribute specified for"
+            CSFLogDebug(logTag, "%s Warning: Invalid QOS attribute specified for"
                      "get qos strength.", sdp_p->debug_str);
         }
         return (SDP_QOS_STRENGTH_UNKNOWN);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_QOS_STRENGTH_UNKNOWN);
     } else {
         switch (qos_attr) {
             case SDP_ATTR_QOS:
@@ -2741,25 +2744,25 @@ sdp_qos_dir_e sdp_attr_get_qos_direction
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_QOS_DIR_UNKNOWN);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid QOS attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid QOS attribute specified "
                      "for get qos direction.", sdp_p->debug_str);
         }
         return (SDP_QOS_DIR_UNKNOWN);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_QOS_DIR_UNKNOWN);
     } else {
          switch (qos_attr) {
             case SDP_ATTR_QOS:
@@ -2798,25 +2801,25 @@ sdp_qos_status_types_e sdp_attr_get_qos_
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_QOS_STATUS_TYPE_UNKNOWN);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid QOS attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid QOS attribute specified "
                      "for get qos status_type.", sdp_p->debug_str);
         }
         return (SDP_QOS_STATUS_TYPE_UNKNOWN);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_QOS_STATUS_TYPE_UNKNOWN);
     } else {
         switch (qos_attr) {
             case SDP_ATTR_CURR:
@@ -2852,25 +2855,25 @@ tinybool sdp_attr_get_qos_confirm (void 
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid QOS attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid QOS attribute specified "
                      "for get qos confirm.", sdp_p->debug_str);
         }
         return (FALSE);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.qos.confirm);
     }
@@ -2897,25 +2900,25 @@ sdp_result_e sdp_attr_set_qos_strength (
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid QOS attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid QOS attribute specified "
                      "for set qos strength.", sdp_p->debug_str);
         }
         return (SDP_FAILURE);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         switch (qos_attr) {
             case SDP_ATTR_QOS:
@@ -2953,17 +2956,17 @@ sdp_curr_type_e sdp_attr_get_curr_type (
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_CURR_UNKNOWN_TYPE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_CURR_UNKNOWN_TYPE);
     } else {
         return (attr_p->attr.curr.type);
     }
@@ -2991,17 +2994,17 @@ sdp_des_type_e sdp_attr_get_des_type (vo
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_DES_UNKNOWN_TYPE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_DES_UNKNOWN_TYPE);
     } else {
         return (attr_p->attr.des.type);
     }
@@ -3029,17 +3032,17 @@ sdp_conf_type_e sdp_attr_get_conf_type (
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_CONF_UNKNOWN_TYPE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_CONF_UNKNOWN_TYPE);
     } else {
         return (attr_p->attr.conf.type);
     }
@@ -3068,25 +3071,25 @@ sdp_result_e sdp_attr_set_curr_type (voi
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid curr attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid curr attribute specified "
                      "for set curr type.", sdp_p->debug_str);
         }
         return (SDP_FAILURE);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.curr.type = curr_type;
         return (SDP_SUCCESS);
@@ -3116,25 +3119,25 @@ sdp_result_e sdp_attr_set_des_type (void
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid des attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid des attribute specified "
                      "for set des type.", sdp_p->debug_str);
         }
         return (SDP_FAILURE);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.des.type = des_type;
         return (SDP_SUCCESS);
@@ -3165,25 +3168,25 @@ sdp_result_e sdp_attr_set_conf_type (voi
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid conf attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid conf attribute specified "
                      "for set conf type.", sdp_p->debug_str);
         }
         return (SDP_FAILURE);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.conf.type = conf_type;
         return (SDP_SUCCESS);
@@ -3211,25 +3214,25 @@ sdp_result_e sdp_attr_set_qos_direction 
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid QOS attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid QOS attribute specified "
                      "for set qos direction.", sdp_p->debug_str);
         }
         return (SDP_FAILURE);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         switch (qos_attr) {
             case SDP_ATTR_QOS:
@@ -3272,25 +3275,25 @@ sdp_result_e sdp_attr_set_qos_status_typ
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid QOS attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid QOS attribute specified "
                      "for set qos status_type.", sdp_p->debug_str);
         }
         return (SDP_FAILURE);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         switch (qos_attr) {
             case SDP_ATTR_CURR:
@@ -3332,26 +3335,26 @@ sdp_result_e sdp_attr_set_qos_confirm (v
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if (sdp_validate_qos_attr(qos_attr) == FALSE) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Invalid QOS attribute specified "
+            CSFLogDebug(logTag, "%s Warning: Invalid QOS attribute specified "
                      "for set qos confirm.", sdp_p->debug_str);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num, qos_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(qos_attr), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.qos.confirm = qos_confirm;
         return (SDP_SUCCESS);
@@ -3379,17 +3382,17 @@ sdp_nettype_e sdp_attr_get_subnet_nettyp
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_NT_INVALID);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SUBNET, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Subnet attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Subnet attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_NT_INVALID);
     } else {
         return (attr_p->attr.subnet.nettype);
     }
 }
@@ -3414,17 +3417,17 @@ sdp_addrtype_e sdp_attr_get_subnet_addrt
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_AT_INVALID);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SUBNET, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Subnet attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Subnet attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_AT_INVALID);
     } else {
         return (attr_p->attr.subnet.addrtype);
     }
 }
@@ -3451,17 +3454,17 @@ const char *sdp_attr_get_subnet_addr (vo
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (NULL);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SUBNET, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Subnet attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Subnet attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         return (attr_p->attr.subnet.addr);
     }
 }
@@ -3488,17 +3491,17 @@ int32 sdp_attr_get_subnet_prefix (void *
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SUBNET, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Subnet attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Subnet attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.subnet.prefix);
     }
 }
@@ -3525,17 +3528,17 @@ sdp_result_e sdp_attr_set_subnet_nettype
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SUBNET, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Subnet attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Subnet attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.subnet.nettype = nettype;
         return (SDP_SUCCESS);
     }
@@ -3563,17 +3566,17 @@ sdp_result_e sdp_attr_set_subnet_addrtyp
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SUBNET, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Subnet attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Subnet attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.subnet.addrtype = sdp_addrtype;
         return (SDP_SUCCESS);
     }
@@ -3603,17 +3606,17 @@ sdp_result_e sdp_attr_set_subnet_addr (v
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SUBNET, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Subnet attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Subnet attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         sstrncpy(attr_p->attr.subnet.addr, addr,
                  sizeof(attr_p->attr.subnet.addr)) ;
         return (SDP_SUCCESS);
@@ -3642,17 +3645,17 @@ sdp_result_e sdp_attr_set_subnet_prefix 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SUBNET, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Subnet attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Subnet attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.subnet.prefix = prefix;
         return (SDP_SUCCESS);
     }
@@ -3722,17 +3725,17 @@ u16 sdp_attr_get_rtpmap_payload_type (vo
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTPMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s rtpmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s rtpmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.transport_map.payload_num);
     }
 }
@@ -3758,17 +3761,17 @@ const char *sdp_attr_get_rtpmap_encname 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (NULL);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTPMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s rtpmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s rtpmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         return (attr_p->attr.transport_map.encname);
     }
 }
@@ -3792,17 +3795,17 @@ u32 sdp_attr_get_rtpmap_clockrate (void 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTPMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s rtpmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s rtpmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.transport_map.clockrate);
     }
 }
@@ -3826,17 +3829,17 @@ u16 sdp_attr_get_rtpmap_num_chan (void *
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTPMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s rtpmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s rtpmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.transport_map.num_chan);
     }
 }
@@ -3862,17 +3865,17 @@ sdp_result_e sdp_attr_set_rtpmap_payload
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTPMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s rtpmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s rtpmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.transport_map.payload_num = payload_num;
         return (SDP_SUCCESS);
     }
@@ -3898,17 +3901,17 @@ sdp_result_e sdp_attr_set_rtpmap_encname
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTPMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s rtpmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s rtpmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (encname) {
             sstrncpy(attr_p->attr.transport_map.encname, encname,
                      sizeof(attr_p->attr.transport_map.encname));
@@ -3944,17 +3947,17 @@ sdp_result_e sdp_attr_get_ice_attribute 
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, sdp_attr, inst_num);
     if (attr_p != NULL) {
         *out = attr_p->attr.ice_attr;
         return (SDP_SUCCESS);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s ice attribute, level %u instance %u "
+                CSFLogError(logTag, "%s ice attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     return (SDP_FAILURE);
 }
@@ -3979,17 +3982,17 @@ sdp_result_e sdp_attr_set_ice_attribute(
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, sdp_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s ice attribute, level %u instance %u "
+            CSFLogError(logTag, "%s ice attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (!ice_attrib) {
       return (SDP_INVALID_PARAMETER);
@@ -4025,17 +4028,17 @@ sdp_result_e sdp_attr_get_rtcp_mux_attri
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, sdp_attr, inst_num);
     if (attr_p != NULL) {
     	*rtcp_mux = attr_p->attr.boolean_val;
         return (SDP_SUCCESS);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s rtcp-mux attribute, level %u instance %u "
+                CSFLogError(logTag, "%s rtcp-mux attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     return (SDP_FAILURE);
 }
@@ -4060,17 +4063,17 @@ sdp_result_e sdp_attr_set_rtcp_mux_attri
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, sdp_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s rtcp-mux attribute, level %u instance %u "
+            CSFLogError(logTag, "%s rtcp-mux attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p->attr.boolean_val = rtcp_mux;
     return (SDP_SUCCESS);
@@ -4102,17 +4105,17 @@ sdp_result_e sdp_attr_get_dtls_fingerpri
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, sdp_attr, inst_num);
     if (attr_p != NULL) {
         *out = attr_p->attr.string_val;
         return (SDP_SUCCESS);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s dtls fingerprint attribute, level %u instance %u "
+                CSFLogError(logTag, "%s dtls fingerprint attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     return (SDP_FAILURE);
 }
@@ -4137,17 +4140,17 @@ sdp_result_e sdp_attr_set_dtls_fingerpri
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, sdp_attr, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s dtls fingerprint attribute, level %u instance %u "
+            CSFLogError(logTag, "%s dtls fingerprint attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (!dtls_fingerprint) {
       return (SDP_INVALID_PARAMETER);
@@ -4178,17 +4181,17 @@ sdp_result_e sdp_attr_set_rtpmap_clockra
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTPMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s rtpmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s rtpmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.transport_map.clockrate = clockrate;
         return (SDP_SUCCESS);
     }
@@ -4215,17 +4218,17 @@ sdp_result_e sdp_attr_set_rtpmap_num_cha
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTPMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s rtpmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s rtpmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.transport_map.num_chan = num_chan;
         return (SDP_SUCCESS);
     }
@@ -4295,17 +4298,17 @@ u16 sdp_attr_get_sprtmap_payload_type (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_SPRTMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s sprtmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s sprtmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.transport_map.payload_num);
     }
 }
@@ -4331,17 +4334,17 @@ const char *sdp_attr_get_sprtmap_encname
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (NULL);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_SPRTMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s sprtmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s sprtmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         return (attr_p->attr.transport_map.encname);
     }
 }
@@ -4365,17 +4368,17 @@ u32 sdp_attr_get_sprtmap_clockrate (void
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_SPRTMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s sprtmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s sprtmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.transport_map.clockrate);
     }
 }
@@ -4399,17 +4402,17 @@ u16 sdp_attr_get_sprtmap_num_chan (void 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_SPRTMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s sprtmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s sprtmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.transport_map.num_chan);
     }
 }
@@ -4435,17 +4438,17 @@ sdp_result_e sdp_attr_set_sprtmap_payloa
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_SPRTMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s sprtmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s sprtmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.transport_map.payload_num = payload_num;
         return (SDP_SUCCESS);
     }
@@ -4471,17 +4474,17 @@ sdp_result_e sdp_attr_set_sprtmap_encnam
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_SPRTMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s sprtmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s sprtmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         sstrncpy(attr_p->attr.transport_map.encname, encname,
                  sizeof(attr_p->attr.transport_map.encname));
         return (SDP_SUCCESS);
@@ -4509,17 +4512,17 @@ sdp_result_e sdp_attr_set_sprtmap_clockr
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_SPRTMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s sprtmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s sprtmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.transport_map.clockrate = clockrate;
         return (SDP_SUCCESS);
     }
@@ -4546,17 +4549,17 @@ sdp_result_e sdp_attr_set_sprtmap_num_ch
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_SPRTMAP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s sprtmap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s sprtmap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.transport_map.num_chan = num_chan;
         return (SDP_SUCCESS);
     }
@@ -4631,17 +4634,17 @@ u16 sdp_attr_get_fmtp_payload_type (void
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.fmtp.payload_num);
     }
 }
@@ -4678,17 +4681,17 @@ sdp_ne_res_e sdp_attr_fmtp_is_range_set 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_NO_MATCH);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_NO_MATCH);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     for (i = low_val; i <= high_val; i++) {
@@ -4739,17 +4742,17 @@ sdp_attr_fmtp_valid(void *sdp_ptr, u16 l
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return FALSE;
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return FALSE;
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
 
@@ -4791,17 +4794,17 @@ sdp_result_e sdp_attr_set_fmtp_payload_t
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.fmtp.payload_num = payload_num;
         return (SDP_SUCCESS);
     }
@@ -4826,17 +4829,17 @@ sdp_result_e sdp_attr_set_fmtp_bitmap(vo
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->maxval = maxval;
@@ -4864,17 +4867,17 @@ sdp_result_e sdp_attr_get_fmtp_range (vo
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     memcpy(bmap, fmtp_p->bmap, SDP_NE_NUM_BMAP_WORDS * sizeof(u32) );
@@ -4906,17 +4909,17 @@ sdp_result_e sdp_attr_set_fmtp_range (vo
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     for (i = low_val; i <= high_val; i++) {
@@ -4955,17 +4958,17 @@ sdp_result_e sdp_attr_clear_fmtp_range (
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     for (i = low_val; i <= high_val; i++) {
@@ -5016,17 +5019,17 @@ sdp_ne_res_e sdp_attr_compare_fmtp_range
     }
 
     src_attr_p = sdp_find_attr(src_sdp_p, src_level, src_cap_num,
                                SDP_ATTR_FMTP, src_inst_num);
     dst_attr_p = sdp_find_attr(dst_sdp_p, dst_level, dst_cap_num,
                                SDP_ATTR_FMTP, dst_inst_num);
     if ((src_attr_p == NULL) || (dst_attr_p == NULL)) {
         if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s source or destination fmtp attribute for "
+            CSFLogError(logTag, "%s source or destination fmtp attribute for "
                       "compare not found.", src_sdp_p->debug_str);
         }
         src_sdp_p->conf_p->num_invalid_param++;
         return (SDP_NO_MATCH);
     }
 
     src_fmtp_p = &(src_attr_p->attr.fmtp);
     dst_fmtp_p = &(dst_attr_p->attr.fmtp);
@@ -5082,17 +5085,17 @@ sdp_result_e sdp_attr_copy_fmtp_ranges (
     }
 
     src_attr_p = sdp_find_attr(src_sdp_p, src_level, src_cap_num,
                                SDP_ATTR_FMTP, src_inst_num);
     dst_attr_p = sdp_find_attr(dst_sdp_p, dst_level, dst_cap_num,
                                SDP_ATTR_FMTP, dst_inst_num);
     if ((src_attr_p == NULL) || (dst_attr_p == NULL)) {
         if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s source or destination fmtp attribute for "
+            CSFLogError(logTag, "%s source or destination fmtp attribute for "
                       "copy not found.", src_sdp_p->debug_str);
         }
         src_sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     src_fmtp_p = &(src_attr_p->attr.fmtp);
     dst_fmtp_p = &(dst_attr_p->attr.fmtp);
@@ -5126,17 +5129,17 @@ sdp_result_e sdp_attr_set_fmtp_annexa (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5168,17 +5171,17 @@ sdp_result_e sdp_attr_set_fmtp_annexb  (
 
    if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
    }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5247,17 +5250,17 @@ sdp_result_e sdp_attr_set_fmtp_mode  (vo
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_MODE;
@@ -5291,17 +5294,17 @@ sdp_result_e sdp_attr_set_fmtp_bitrate_t
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5335,17 +5338,17 @@ sdp_result_e sdp_attr_set_fmtp_cif  (voi
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5379,17 +5382,17 @@ sdp_result_e sdp_attr_set_fmtp_qcif  (vo
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5422,17 +5425,17 @@ sdp_result_e sdp_attr_set_fmtp_sqcif  (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5467,17 +5470,17 @@ sdp_result_e sdp_attr_set_fmtp_cif4  (vo
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5511,17 +5514,17 @@ sdp_result_e sdp_attr_set_fmtp_cif16  (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5557,17 +5560,17 @@ sdp_result_e sdp_attr_set_fmtp_maxbr  (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5602,17 +5605,17 @@ sdp_result_e sdp_attr_set_fmtp_custom  (
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5649,17 +5652,17 @@ sdp_result_e sdp_attr_set_fmtp_par  (voi
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5695,17 +5698,17 @@ sdp_result_e sdp_attr_set_fmtp_cpcf (voi
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5740,17 +5743,17 @@ sdp_result_e sdp_attr_set_fmtp_bpp (void
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5784,17 +5787,17 @@ sdp_result_e sdp_attr_set_fmtp_hrd (void
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5815,17 +5818,17 @@ sdp_result_e sdp_attr_set_fmtp_h263_num_
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5859,17 +5862,17 @@ sdp_result_e sdp_attr_set_fmtp_profile_l
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5891,17 +5894,17 @@ sdp_result_e sdp_attr_set_fmtp_parameter
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5926,17 +5929,17 @@ sdp_result_e sdp_attr_set_fmtp_pack_mode
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5955,17 +5958,17 @@ sdp_result_e sdp_attr_set_fmtp_level_asy
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -5985,17 +5988,17 @@ sdp_result_e sdp_attr_set_fmtp_deint_buf
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6016,17 +6019,17 @@ sdp_result_e sdp_attr_set_fmtp_init_buf_
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6047,17 +6050,17 @@ sdp_result_e sdp_attr_set_fmtp_max_don_d
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6077,17 +6080,17 @@ sdp_result_e sdp_attr_set_fmtp_interleav
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6107,17 +6110,17 @@ sdp_result_e sdp_attr_set_fmtp_redundant
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6140,17 +6143,17 @@ sdp_result_e sdp_attr_set_fmtp_max_mbps 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6173,17 +6176,17 @@ sdp_result_e sdp_attr_set_fmtp_max_fs (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6206,17 +6209,17 @@ sdp_result_e sdp_attr_set_fmtp_max_br (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6239,17 +6242,17 @@ sdp_result_e sdp_attr_set_fmtp_max_avera
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6280,17 +6283,17 @@ sdp_result_e sdp_attr_get_fmtp_max_avera
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, 1);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = attr_p->attr.fmtp.maxaveragebitrate;
         return (SDP_SUCCESS);
     }
@@ -6307,17 +6310,17 @@ sdp_result_e sdp_attr_set_fmtp_usedtx (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6350,17 +6353,17 @@ sdp_result_e sdp_attr_get_fmtp_usedtx (v
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = (tinybool)attr_p->attr.fmtp.usedtx;
         return (SDP_SUCCESS);
     }
@@ -6376,17 +6379,17 @@ sdp_result_e sdp_attr_set_fmtp_stereo (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6419,17 +6422,17 @@ sdp_result_e sdp_attr_get_fmtp_stereo (v
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = (tinybool)attr_p->attr.fmtp.stereo;
         return (SDP_SUCCESS);
     }
@@ -6445,17 +6448,17 @@ sdp_result_e sdp_attr_set_fmtp_useinband
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6488,17 +6491,17 @@ sdp_result_e sdp_attr_get_fmtp_useinband
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = (tinybool)attr_p->attr.fmtp.useinbandfec;
         return (SDP_SUCCESS);
     }
@@ -6514,17 +6517,17 @@ sdp_result_e sdp_attr_set_fmtp_maxcodeda
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6555,17 +6558,17 @@ char* sdp_attr_get_fmtp_maxcodedaudioban
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.fmtp.maxcodedaudiobandwidth);
     }
 }
@@ -6580,17 +6583,17 @@ sdp_result_e sdp_attr_set_fmtp_cbr (void
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6623,17 +6626,17 @@ sdp_result_e sdp_attr_get_fmtp_cbr (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = (tinybool)attr_p->attr.fmtp.cbr;
         return (SDP_SUCCESS);
     }
@@ -6647,17 +6650,17 @@ sdp_result_e sdp_attr_get_fmtp_streams (
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (!attr_p) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = attr_p->attr.fmtp.streams;
         return (SDP_SUCCESS);
     }
@@ -6673,17 +6676,17 @@ sdp_result_e sdp_attr_set_fmtp_streams (
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (!attr_p) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_DATACHANNEL;
@@ -6706,17 +6709,17 @@ sdp_result_e sdp_attr_set_fmtp_data_chan
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (!attr_p) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_DATACHANNEL;
@@ -6738,17 +6741,17 @@ sdp_result_e sdp_attr_get_fmtp_data_chan
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
     	return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (!attr_p) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
     	sstrncpy(protocol, attr_p->attr.fmtp.protocol, SDP_MAX_STRING_LEN+1);
     }
     return (SDP_SUCCESS);
@@ -6764,17 +6767,17 @@ sdp_result_e sdp_attr_set_fmtp_max_cpb (
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6797,17 +6800,17 @@ sdp_result_e sdp_attr_set_fmtp_max_dpb (
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6831,17 +6834,17 @@ sdp_result_e sdp_attr_set_fmtp_max_rcmd_
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6862,17 +6865,17 @@ sdp_result_e sdp_attr_set_fmtp_deint_buf
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6893,17 +6896,17 @@ sdp_result_e sdp_attr_set_fmtp_h264_para
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6922,17 +6925,17 @@ sdp_result_e sdp_attr_set_fmtp_h261_anne
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -6960,17 +6963,17 @@ sdp_result_e sdp_attr_set_fmtp_h263_anne
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
@@ -7013,17 +7016,17 @@ tinybool sdp_attr_fmtp_is_annexb_set (vo
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.fmtp.annexb);
     }
 }
@@ -7049,17 +7052,17 @@ tinybool sdp_attr_fmtp_is_annexa_set (vo
    if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
    }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.fmtp.annexa);
     }
 }
@@ -7084,17 +7087,17 @@ int32 sdp_attr_get_fmtp_bitrate_type (vo
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.bitrate);
     }
 }
@@ -7119,17 +7122,17 @@ int32 sdp_attr_get_fmtp_qcif (void *sdp_
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.qcif);
     }
 }
@@ -7153,17 +7156,17 @@ int32 sdp_attr_get_fmtp_cif (void *sdp_p
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.cif);
     }
 }
@@ -7189,17 +7192,17 @@ int32 sdp_attr_get_fmtp_sqcif (void *sdp
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.sqcif);
     }
 }
@@ -7224,17 +7227,17 @@ int32 sdp_attr_get_fmtp_cif4 (void *sdp_
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.cif4);
     }
 }
@@ -7260,17 +7263,17 @@ int32 sdp_attr_get_fmtp_cif16 (void *sdp
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.cif16);
     }
 }
@@ -7296,17 +7299,17 @@ int32 sdp_attr_get_fmtp_maxbr (void *sdp
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.maxbr);
     }
 }
@@ -7332,17 +7335,17 @@ int32 sdp_attr_get_fmtp_custom_x (void *
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.custom_x);
     }
 }
@@ -7367,17 +7370,17 @@ int32 sdp_attr_get_fmtp_custom_y (void *
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.custom_y);
     }
 }
@@ -7403,17 +7406,17 @@ int32 sdp_attr_get_fmtp_custom_mpi (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.custom_mpi);
     }
 }
@@ -7437,17 +7440,17 @@ int32 sdp_attr_get_fmtp_par_width (void 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.par_width);
     }
 }
@@ -7471,17 +7474,17 @@ int32 sdp_attr_get_fmtp_par_height (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.par_height);
     }
 }
@@ -7505,17 +7508,17 @@ int32 sdp_attr_get_fmtp_cpcf (void *sdp_
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.cpcf);
     }
 }
@@ -7539,17 +7542,17 @@ int32 sdp_attr_get_fmtp_bpp (void *sdp_p
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.bpp);
     }
 }
@@ -7573,17 +7576,17 @@ int32 sdp_attr_get_fmtp_hrd (void *sdp_p
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.hrd);
     }
 }
@@ -7607,17 +7610,17 @@ int32 sdp_attr_get_fmtp_profile (void *s
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.profile);
     }
 }
@@ -7641,17 +7644,17 @@ int32 sdp_attr_get_fmtp_level (void *sdp
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.level);
     }
 }
@@ -7675,17 +7678,17 @@ tinybool sdp_attr_get_fmtp_interlace (vo
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return FALSE;
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return FALSE;
     } else {
         return (attr_p->attr.fmtp.is_interlace);
     }
 }
@@ -7710,17 +7713,17 @@ sdp_result_e sdp_attr_get_fmtp_pack_mode
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
 	*val = attr_p->attr.fmtp.packetization_mode;
 	return (SDP_SUCCESS);
     }
@@ -7746,17 +7749,17 @@ sdp_result_e sdp_attr_get_fmtp_level_asy
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
 	*val = attr_p->attr.fmtp.level_asymmetry_allowed;
 	return (SDP_SUCCESS);
     }
@@ -7781,17 +7784,17 @@ const char* sdp_attr_get_fmtp_profile_id
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.fmtp.profile_level_id);
     }
 }
@@ -7815,17 +7818,17 @@ const char* sdp_attr_get_fmtp_param_sets
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.fmtp.parameter_sets);
     }
 }
@@ -7849,17 +7852,17 @@ sdp_result_e sdp_attr_get_fmtp_interleav
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
 	*val = attr_p->attr.fmtp.interleaving_depth;
 	return (SDP_SUCCESS);
     }
@@ -7885,17 +7888,17 @@ sdp_result_e sdp_attr_get_fmtp_deint_buf
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (attr_p->attr.fmtp.flag & SDP_DEINT_BUF_REQ_FLAG) {
 	    *val = attr_p->attr.fmtp.deint_buf_req;
 	    return (SDP_SUCCESS);
@@ -7924,17 +7927,17 @@ sdp_result_e sdp_attr_get_fmtp_max_don_d
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
 	*val = attr_p->attr.fmtp.max_don_diff;
 	return (SDP_SUCCESS);
     }
@@ -7959,17 +7962,17 @@ sdp_result_e sdp_attr_get_fmtp_init_buf_
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (attr_p->attr.fmtp.flag & SDP_INIT_BUF_TIME_FLAG) {
 	    *val = attr_p->attr.fmtp.init_buf_time;
 	    return (SDP_SUCCESS);
@@ -7999,17 +8002,17 @@ sdp_result_e sdp_attr_get_fmtp_max_mbps 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = attr_p->attr.fmtp.max_mbps;
         return (SDP_SUCCESS);
     }
@@ -8034,17 +8037,17 @@ sdp_result_e sdp_attr_get_fmtp_max_fs (v
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = attr_p->attr.fmtp.max_fs;
         return (SDP_SUCCESS);
     }
@@ -8069,17 +8072,17 @@ sdp_result_e sdp_attr_get_fmtp_max_cpb (
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = attr_p->attr.fmtp.max_cpb;
         return (SDP_SUCCESS);
     }
@@ -8104,17 +8107,17 @@ sdp_result_e sdp_attr_get_fmtp_max_dpb (
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = attr_p->attr.fmtp.max_dpb;
         return (SDP_SUCCESS);
     }
@@ -8140,17 +8143,17 @@ sdp_result_e sdp_attr_get_fmtp_max_br (v
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         *val = attr_p->attr.fmtp.max_br;
         return (SDP_SUCCESS);
     }
@@ -8175,17 +8178,17 @@ tinybool sdp_attr_fmtp_is_redundant_pic_
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.fmtp.redundant_pic_cap);
     }
 }
@@ -8211,17 +8214,17 @@ sdp_result_e sdp_attr_get_fmtp_deint_buf
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (attr_p->attr.fmtp.flag & SDP_DEINT_BUF_CAP_FLAG) {
 	    *val = attr_p->attr.fmtp.deint_buf_cap;
 	    return (SDP_SUCCESS);
@@ -8251,17 +8254,17 @@ sdp_result_e sdp_attr_get_fmtp_max_rcmd_
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (attr_p->attr.fmtp.flag & SDP_MAX_RCMD_NALU_SIZE_FLAG) {
 	    *val = attr_p->attr.fmtp.max_rcmd_nalu_size;
 	    return (SDP_SUCCESS);
@@ -8290,17 +8293,17 @@ tinybool sdp_attr_fmtp_is_parameter_add 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.fmtp.parameter_add);
     }
 }
@@ -8328,17 +8331,17 @@ tinybool sdp_attr_get_fmtp_annex_d (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.fmtp.annex_d);
     }
 }
@@ -8353,17 +8356,17 @@ tinybool sdp_attr_get_fmtp_annex_f (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.fmtp.annex_f);
     }
 }
@@ -8378,17 +8381,17 @@ tinybool sdp_attr_get_fmtp_annex_i (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.fmtp.annex_i);
     }
 }
@@ -8403,17 +8406,17 @@ tinybool sdp_attr_get_fmtp_annex_j (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.fmtp.annex_j);
     }
 }
@@ -8428,17 +8431,17 @@ tinybool sdp_attr_get_fmtp_annex_t (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.fmtp.annex_t);
     }
 }
@@ -8453,17 +8456,17 @@ int32 sdp_attr_get_fmtp_annex_k_val (voi
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.annex_k_val);
     }
 }
@@ -8478,17 +8481,17 @@ int32 sdp_attr_get_fmtp_annex_n_val (voi
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.annex_n_val);
     }
 }
@@ -8504,17 +8507,17 @@ int32 sdp_attr_get_fmtp_annex_p_picture_
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.annex_p_val_picture_resize);
     }
 }
@@ -8529,17 +8532,17 @@ int32 sdp_attr_get_fmtp_annex_p_warp (vo
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         return (attr_p->attr.fmtp.annex_p_val_warp);
     }
 }
@@ -8567,17 +8570,17 @@ sdp_fmtp_format_type_e  sdp_attr_fmtp_ge
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_FMTP_UNKNOWN_TYPE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_FMTP,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s fmtp attribute, level %u instance %u "
+            CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_FMTP_UNKNOWN_TYPE);
     } else {
         return (attr_p->attr.fmtp.fmtp_format);
     }
 }
@@ -8602,17 +8605,17 @@ u16 sdp_attr_get_pccodec_num_payload_typ
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_X_PC_CODEC,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-pc-codec attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-pc-codec attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         return (attr_p->attr.pccodec.num_payloads);
     }
 }
@@ -8639,26 +8642,26 @@ u16 sdp_attr_get_pccodec_payload_type (v
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_X_PC_CODEC,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-pc-codec attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-pc-codec attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         if ((payload_num < 1) ||
             (payload_num > attr_p->attr.pccodec.num_payloads)) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s X-pc-codec attribute, level %u instance %u, "
+                CSFLogError(logTag, "%s X-pc-codec attribute, level %u instance %u, "
                           "invalid payload number %u requested.",
                           sdp_p->debug_str, level, inst_num, payload_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (0);
         } else {
             return (attr_p->attr.pccodec.payload_type[payload_num-1]);
         }
@@ -8690,17 +8693,17 @@ sdp_result_e sdp_attr_add_pccodec_payloa
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_X_PC_CODEC,
                            inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-pc-codec attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-pc-codec attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         payload_num = attr_p->attr.pccodec.num_payloads++;
         attr_p->attr.pccodec.payload_type[payload_num] = payload_type;
         return (SDP_SUCCESS);
@@ -8756,17 +8759,17 @@ u16 sdp_attr_get_xcap_first_cap_num (voi
                 } else {
                     cap_num += attr_p->attr.cap_p->num_payloads;
                 }
             }
         }
     }  /* Attr is at a media level */
 
     if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-        SDP_ERROR("%s X-cap attribute, level %u instance %u "
+        CSFLogError(logTag, "%s X-cap attribute, level %u instance %u "
                   "not found.", sdp_p->debug_str, level, inst_num);
     }
     sdp_p->conf_p->num_invalid_param++;
     return (0);
 }
 
 /* Function:    sdp_attr_get_xcap_media_type
  * Description: Returns the media type specified for the given X-cap
@@ -8787,17 +8790,17 @@ sdp_media_e sdp_attr_get_xcap_media_type
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_MEDIA_INVALID);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_X_CAP, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-cap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-cap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_MEDIA_INVALID);
     } else {
         cap_p = attr_p->attr.cap_p;
         return (cap_p->media);
     }
@@ -8823,17 +8826,17 @@ sdp_transport_e sdp_attr_get_xcap_transp
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_TRANSPORT_INVALID);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_X_CAP,
                            inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-cap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-cap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_TRANSPORT_INVALID);
     } else {
         cap_p = attr_p->attr.cap_p;
         return (cap_p->transport);
     }
@@ -8861,17 +8864,17 @@ u16 sdp_attr_get_xcap_num_payload_types 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_X_CAP, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-cap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-cap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         cap_p = attr_p->attr.cap_p;
         return (cap_p->num_payloads);
     }
@@ -8900,27 +8903,27 @@ u16 sdp_attr_get_xcap_payload_type (void
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_X_CAP, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-cap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-cap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         cap_p = attr_p->attr.cap_p;
         if ((payload_num < 1) ||
             (payload_num > cap_p->num_payloads)) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s X-cap attribute, level %u instance %u, "
+                CSFLogError(logTag, "%s X-cap attribute, level %u instance %u, "
                           "payload num %u invalid.", sdp_p->debug_str,
                           level, inst_num, payload_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (0);
         } else {
             *indicator = cap_p->payload_indicator[payload_num-1];
             return (cap_p->payload_type[payload_num-1]);
@@ -8948,17 +8951,17 @@ sdp_result_e sdp_attr_set_xcap_media_typ
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_X_CAP, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-cap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-cap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     cap_p = attr_p->attr.cap_p;
     cap_p->media = media;
@@ -8985,17 +8988,17 @@ sdp_result_e sdp_attr_set_xcap_transport
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_X_CAP, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-cap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-cap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     cap_p = attr_p->attr.cap_p;
     cap_p->transport = transport;
@@ -9023,17 +9026,17 @@ sdp_result_e sdp_attr_add_xcap_payload_t
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_X_CAP, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-cap attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-cap attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     cap_p = attr_p->attr.cap_p;
     cap_p->payload_indicator[cap_p->num_payloads] = indicator;
@@ -9090,17 +9093,17 @@ u16 sdp_attr_get_cdsc_first_cap_num(void
                 } else {
                     cap_num += attr_p->attr.cap_p->num_payloads;
                 }
             }
         }
     }  /* Attr is at a media level */
 
     if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-        SDP_ERROR("%s CDSC attribute, level %u instance %u "
+        CSFLogError(logTag, "%s CDSC attribute, level %u instance %u "
                   "not found.", sdp_p->debug_str, level, inst_num);
     }
     sdp_p->conf_p->num_invalid_param++;
     return (0);
 }
 
 /* Function:    sdp_attr_get_cdsc_media_type
  * Description: Returns the media type specified for the given CDSC
@@ -9121,17 +9124,17 @@ sdp_media_e sdp_attr_get_cdsc_media_type
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_MEDIA_INVALID);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_CDSC, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s CDSC attribute, level %u instance %u "
+            CSFLogError(logTag, "%s CDSC attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_MEDIA_INVALID);
     } else {
         cdsc_p = attr_p->attr.cap_p;
         return (cdsc_p->media);
     }
@@ -9157,17 +9160,17 @@ sdp_transport_e sdp_attr_get_cdsc_transp
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_TRANSPORT_INVALID);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_CDSC,
                            inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s CDSC attribute, level %u instance %u "
+            CSFLogError(logTag, "%s CDSC attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_TRANSPORT_INVALID);
     } else {
         cdsc_p = attr_p->attr.cap_p;
         return (cdsc_p->transport);
     }
@@ -9195,17 +9198,17 @@ u16 sdp_attr_get_cdsc_num_payload_types 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_CDSC, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s CDSC attribute, level %u instance %u "
+            CSFLogError(logTag, "%s CDSC attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         cdsc_p = attr_p->attr.cap_p;
         return (cdsc_p->num_payloads);
     }
@@ -9234,27 +9237,27 @@ u16 sdp_attr_get_cdsc_payload_type (void
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_CDSC, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s CDSC attribute, level %u instance %u "
+            CSFLogError(logTag, "%s CDSC attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         cdsc_p = attr_p->attr.cap_p;
         if ((payload_num < 1) ||
             (payload_num > cdsc_p->num_payloads)) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s CDSC attribute, level %u instance %u, "
+                CSFLogError(logTag, "%s CDSC attribute, level %u instance %u, "
                           "payload num %u invalid.", sdp_p->debug_str,
                           level, inst_num, payload_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (0);
         } else {
             *indicator = cdsc_p->payload_indicator[payload_num-1];
             return (cdsc_p->payload_type[payload_num-1]);
@@ -9281,17 +9284,17 @@ sdp_result_e sdp_attr_set_cdsc_media_typ
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_CDSC, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s CDSC attribute, level %u instance %u "
+            CSFLogError(logTag, "%s CDSC attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     cdsc_p = attr_p->attr.cap_p;
     cdsc_p->media = media;
@@ -9317,17 +9320,17 @@ sdp_result_e sdp_attr_set_cdsc_transport
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_CDSC, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s CDSC attribute, level %u instance %u "
+            CSFLogError(logTag, "%s CDSC attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     cdsc_p = attr_p->attr.cap_p;
     cdsc_p->transport = transport;
@@ -9355,17 +9358,17 @@ sdp_result_e sdp_attr_add_cdsc_payload_t
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, 0, SDP_ATTR_CDSC, inst_num);
     if ((attr_p == NULL) || (attr_p->attr.cap_p == NULL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s CDSC attribute, level %u instance %u "
+            CSFLogError(logTag, "%s CDSC attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     cdsc_p = attr_p->attr.cap_p;
     cdsc_p->payload_indicator[cdsc_p->num_payloads] = indicator;
@@ -9448,17 +9451,17 @@ sdp_result_e sdp_attr_set_rtr_confirm (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTR, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(SDP_ATTR_RTR), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.rtr.confirm = confirm;
         return (SDP_SUCCESS);
@@ -9484,17 +9487,17 @@ tinybool sdp_attr_get_rtr_confirm (void 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_RTR, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s %s attribute, level %u instance %u "
+            CSFLogError(logTag, "%s %s attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str,
                       sdp_get_attr_name(SDP_ATTR_RTR), level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.rtr.confirm);
     }
@@ -9511,17 +9514,17 @@ sdp_mediadir_role_e sdp_attr_get_comedia
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_MEDIADIR_ROLE_UNKNOWN);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_DIRECTION, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Comediadir role attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Comediadir role attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_MEDIADIR_ROLE_UNKNOWN);
     } else {
         return (attr_p->attr.comediadir.role);
     }
 }
@@ -9548,17 +9551,17 @@ sdp_result_e sdp_attr_set_comediadir_rol
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_DIRECTION, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Comediadir role attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Comediadir role attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.comediadir.role = comediadir_role;
         return (SDP_SUCCESS);
     }
@@ -9584,17 +9587,17 @@ tinybool sdp_attr_get_silencesupp_enable
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (FALSE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silenceSuppEnable attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silenceSuppEnable attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (FALSE);
     } else {
         return (attr_p->attr.silencesupp.enabled);
     }
 }
@@ -9622,17 +9625,17 @@ u16 sdp_attr_get_silencesupp_timer (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silenceTimer attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silenceTimer attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         *null_ind = attr_p->attr.silencesupp.timer_null;
         return (attr_p->attr.silencesupp.timer);
     }
@@ -9661,17 +9664,17 @@ sdp_silencesupp_pref_e sdp_attr_get_sile
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_SILENCESUPP_PREF_UNKNOWN);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silence suppPref attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silence suppPref attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_SILENCESUPP_PREF_UNKNOWN);
     } else {
         return (attr_p->attr.silencesupp.pref);
     }
 }
@@ -9699,17 +9702,17 @@ sdp_silencesupp_siduse_e sdp_attr_get_si
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_SILENCESUPP_SIDUSE_UNKNOWN);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silence sidUse attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silence sidUse attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_SILENCESUPP_SIDUSE_UNKNOWN);
     } else {
         return (attr_p->attr.silencesupp.siduse);
     }
 }
@@ -9737,17 +9740,17 @@ u8 sdp_attr_get_silencesupp_fxnslevel (v
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silence fxnslevel attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silence fxnslevel attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         *null_ind = attr_p->attr.silencesupp.fxnslevel_null;
         return (attr_p->attr.silencesupp.fxnslevel);
     }
@@ -9774,17 +9777,17 @@ sdp_result_e sdp_attr_set_silencesupp_en
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silenceSuppEnable attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silenceSuppEnable attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.silencesupp.enabled = enable;
         return (SDP_SUCCESS);
     }
@@ -9813,17 +9816,17 @@ sdp_result_e sdp_attr_set_silencesupp_ti
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silenceTimer attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silenceTimer attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.silencesupp.timer = value;
         attr_p->attr.silencesupp.timer_null = null_ind;
         return (SDP_SUCCESS);
@@ -9851,17 +9854,17 @@ sdp_result_e sdp_attr_set_silencesupp_pr
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silence SuppPref attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silence SuppPref attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.silencesupp.pref = pref;
         return (SDP_SUCCESS);
     }
@@ -9888,17 +9891,17 @@ sdp_result_e sdp_attr_set_silencesupp_si
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silence sidUse attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silence sidUse attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.silencesupp.siduse = siduse;
         return (SDP_SUCCESS);
     }
@@ -9927,17 +9930,17 @@ sdp_result_e sdp_attr_set_silencesupp_fx
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SILENCESUPP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s silenceTimer attribute, level %u instance %u "
+            CSFLogError(logTag, "%s silenceTimer attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.silencesupp.fxnslevel = (u8)value;
         attr_p->attr.silencesupp.fxnslevel_null = null_ind;
         return (SDP_SUCCESS);
@@ -9970,17 +9973,17 @@ u16 sdp_attr_get_mptime_num_intervals (
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_MPTIME, inst_num);
     if (attr_p != NULL) {
         return attr_p->attr.mptime.num_intervals;
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-        SDP_ERROR("%s mptime attribute, level %u instance %u not found.",
+        CSFLogError(logTag, "%s mptime attribute, level %u instance %u not found.",
                   sdp_p->debug_str, level, inst_num);
     }
     sdp_p->conf_p->num_invalid_param++;
     return 0;
 }
 
 /* Function:    sdp_attr_get_mptime_interval
  * Description: Returns the value of the specified interval for the
@@ -10007,26 +10010,26 @@ u16 sdp_attr_get_mptime_interval (
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return 0;
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_MPTIME, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s mptime attribute, level %u instance %u "
+            CSFLogError(logTag, "%s mptime attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return 0;
     }
 
     if ((interval_num<1) || (interval_num>attr_p->attr.mptime.num_intervals)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s mptime attribute, level %u instance %u, "
+            CSFLogError(logTag, "%s mptime attribute, level %u instance %u, "
                       "invalid interval number %u requested.",
                       sdp_p->debug_str, level, inst_num, interval_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return 0;
     }
 
     return attr_p->attr.mptime.intervals[interval_num-1];
@@ -10060,27 +10063,27 @@ sdp_result_e sdp_attr_add_mptime_interva
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return SDP_INVALID_SDP_PTR;
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_MPTIME, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s mptime attribute, level %u instance %u "
+            CSFLogError(logTag, "%s mptime attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return SDP_INVALID_PARAMETER;
     }
 
     interval_num = attr_p->attr.mptime.num_intervals;
     if (interval_num>=SDP_MAX_PAYLOAD_TYPES) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s mptime attribute, level %u instance %u "
+            CSFLogError(logTag, "%s mptime attribute, level %u instance %u "
                       "exceeds maximum length.",
                       sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return SDP_INVALID_PARAMETER;
     }
 
     attr_p->attr.mptime.intervals[interval_num] = mp_interval;
@@ -10107,17 +10110,17 @@ sdp_group_attr_e sdp_get_group_attr (voi
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_GROUP_ATTR_UNSUPPORTED);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_GROUP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Group (a= group line) attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Group (a= group line) attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_GROUP_ATTR_UNSUPPORTED);
     } else {
        if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
            SDP_PRINT("%s Stream data group attr field is :%s ",
 		     sdp_p->debug_str,
@@ -10145,17 +10148,17 @@ sdp_result_e sdp_set_group_attr (void *s
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_GROUP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Group attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Group attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.stream_data.group_attr = group_attr;
         return (SDP_SUCCESS);
     }
@@ -10176,17 +10179,17 @@ u16 sdp_get_group_num_id (void *sdp_ptr,
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (0);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_GROUP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s a=group level attribute, level %u instance %u "
+            CSFLogError(logTag, "%s a=group level attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (0);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Stream data group attr - num of ids is :%d ",
                       sdp_p->debug_str,
@@ -10216,24 +10219,24 @@ sdp_result_e sdp_set_group_num_id (void 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_GROUP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Group attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Group attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else if ((group_num_id == 0) || (group_num_id > SDP_MAX_GROUP_STREAM_ID)){
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Number of group id value provided - %u is invalid\n",
+            CSFLogError(logTag, "%s Number of group id value provided - %u is invalid\n",
                       sdp_p->debug_str, group_num_id);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.stream_data.num_group_id = group_num_id;
         return (SDP_SUCCESS);
     }
@@ -10257,17 +10260,17 @@ int32 sdp_get_group_id (void *sdp_ptr, u
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_GROUP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s a=group level attribute, level %u instance %u "
+            CSFLogError(logTag, "%s a=group level attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Stream data group attr - num of ids is :%d ",
                       sdp_p->debug_str,
@@ -10298,26 +10301,26 @@ sdp_result_e sdp_set_group_id (void *sdp
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_GROUP, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Group attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Group attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
 	num_group_id = attr_p->attr.stream_data.num_group_id;
 	if (num_group_id == SDP_MAX_GROUP_STREAM_ID) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Max number of Group Ids already defined "
+                CSFLogError(logTag, "%s Max number of Group Ids already defined "
                       "for this group line %u", sdp_p->debug_str, level);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
         attr_p->attr.stream_data.group_id_arr[num_group_id] = group_id;
         attr_p->attr.stream_data.num_group_id++;
         return (SDP_SUCCESS);
@@ -10343,17 +10346,17 @@ const char* sdp_attr_get_x_sidin (void *
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (NULL);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_X_SIDIN, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-sidin attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-sidin attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Stream X-sidin attr field is :%s ",
 	       	      sdp_p->debug_str,
@@ -10387,17 +10390,17 @@ sdp_result_e sdp_attr_set_x_sidin (void 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_X_SIDIN, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-sidin attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-sidin attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         sstrncpy(attr_p->attr.stream_data.x_sidin, sidin,
                  sizeof(attr_p->attr.stream_data.x_sidin)) ;
         return (SDP_SUCCESS);
@@ -10423,17 +10426,17 @@ const char* sdp_attr_get_x_sidout (void 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (NULL);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_X_SIDOUT, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-sidout attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-sidout attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Stream X-sidout attr field is :%s ",
 	 	      sdp_p->debug_str,
@@ -10467,17 +10470,17 @@ sdp_result_e sdp_attr_set_x_sidout (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_X_SIDOUT, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-sidout attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-sidout attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         sstrncpy(attr_p->attr.stream_data.x_sidout, sidout,
                  sizeof(attr_p->attr.stream_data.x_sidout)) ;
         return (SDP_SUCCESS);
@@ -10503,17 +10506,17 @@ const char* sdp_attr_get_x_confid (void 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (NULL);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_X_CONFID, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-confid attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-confid attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Stream X-confid attr field is :%s ",
 		      sdp_p->debug_str,
@@ -10547,17 +10550,17 @@ sdp_result_e sdp_attr_set_x_confid (void
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_X_CONFID, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s X-confid attribute, level %u instance %u "
+            CSFLogError(logTag, "%s X-confid attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         sstrncpy(attr_p->attr.stream_data.x_confid, confid,
                  sizeof(attr_p->attr.stream_data.x_confid)) ;
         return (SDP_SUCCESS);
@@ -10592,17 +10595,17 @@ sdp_set_source_filter (void *sdp_ptr, u1
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SOURCE_FILTER, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Source filter attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Source filter attribute, level %u instance %u "
                       "not found", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.source_filter.mode = mode;
     attr_p->attr.source_filter.nettype = nettype;
     attr_p->attr.source_filter.addrtype = addrtype;
@@ -10646,25 +10649,25 @@ sdp_include_new_filter_src_addr (void *s
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SOURCE_FILTER, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Source filter attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Source filter attribute, level %u instance %u "
                       "not found", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     if (attr_p->attr.source_filter.num_src_addr >= SDP_MAX_SRC_ADDR_LIST) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Max number of source addresses included for "
+            CSFLogError(logTag, "%s Max number of source addresses included for "
                       "filter for the instance %u", sdp_p->debug_str,
                        inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_FAILURE);
     }
     sstrncpy(attr_p->attr.source_filter.src_list[
                  attr_p->attr.source_filter.num_src_addr],
@@ -10690,17 +10693,17 @@ sdp_get_source_filter_mode (void *sdp_pt
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_FILTER_MODE_NOT_PRESENT);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SOURCE_FILTER, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Source filter attribute, level %u, "
+            CSFLogError(logTag, "%s Source filter attribute, level %u, "
                       "instance %u not found", sdp_p->debug_str,
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_FILTER_MODE_NOT_PRESENT);
     }
     return (attr_p->attr.source_filter.mode);
 }
@@ -10723,17 +10726,17 @@ sdp_get_filter_destination_attributes (v
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SOURCE_FILTER, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Source filter attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Source filter attribute, level %u instance %u "
                       "not found", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     if (nettype) {
         *nettype = attr_p->attr.source_filter.nettype;
     }
@@ -10763,17 +10766,17 @@ sdp_get_filter_source_address_count (voi
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_VALUE);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SOURCE_FILTER, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Source filter attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Source filter attribute, level %u instance %u "
                       "not found", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_VALUE);
     }
     return (attr_p->attr.source_filter.num_src_addr);
 }
 
@@ -10803,17 +10806,17 @@ sdp_get_filter_source_address (void *sdp
     }
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SOURCE_FILTER, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Source filter attribute, level %u instance %u "
+            CSFLogError(logTag, "%s Source filter attribute, level %u instance %u "
                       "not found", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     if (src_addr_id >= attr_p->attr.source_filter.num_src_addr) {
         return (SDP_INVALID_PARAMETER);
     }
@@ -10836,17 +10839,17 @@ sdp_set_rtcp_unicast_mode (void *sdp_ptr
     if (mode >= SDP_RTCP_MAX_UNICAST_MODE) {
         return (SDP_INVALID_PARAMETER);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_RTCP_UNICAST, inst_num);
 
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s RTCP Unicast attribute, level %u instance %u "
+            CSFLogError(logTag, "%s RTCP Unicast attribute, level %u instance %u "
                       "not found", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     attr_p->attr.u32_val = mode;
 
     return (SDP_SUCCESS);
@@ -10861,17 +10864,17 @@ sdp_get_rtcp_unicast_mode(void *sdp_ptr,
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_RTCP_UNICAST_MODE_NOT_PRESENT);
     }
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_RTCP_UNICAST, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s RTCP Unicast attribute, level %u, "
+            CSFLogError(logTag, "%s RTCP Unicast attribute, level %u, "
                       "instance %u not found", sdp_p->debug_str,
                       level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_RTCP_UNICAST_MODE_NOT_PRESENT);
     }
     return ((sdp_rtcp_unicast_mode_e)attr_p->attr.u32_val);
 }
@@ -10899,17 +10902,17 @@ sdp_attr_get_sdescriptions_tag (void *sd
         return SDP_INVALID_VALUE;
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SDESCRIPTIONS, inst_num);
 
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s srtp attribute tag, level %u instance %u "
+            CSFLogError(logTag, "%s srtp attribute tag, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return SDP_INVALID_VALUE;
     } else {
         return attr_p->attr.srtp_context.tag;
     }
 }
@@ -10950,17 +10953,17 @@ sdp_attr_get_sdescriptions_crypto_suite 
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* There's no version 2 so now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute suite, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute suite, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_SRTP_UNKNOWN_CRYPTO_SUITE;
 	}
     }
 
     return attr_p->attr.srtp_context.suite;
@@ -11002,17 +11005,17 @@ sdp_attr_get_sdescriptions_key (void *sd
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
 	attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute key, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute key, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return NULL;
 	}
     }
 
     return (char*)attr_p->attr.srtp_context.master_key;
@@ -11054,17 +11057,17 @@ sdp_attr_get_sdescriptions_salt (void *s
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute salt, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute salt, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return NULL;
 	}
     }
 
     return (char*) attr_p->attr.srtp_context.master_salt;
@@ -11108,17 +11111,17 @@ sdp_attr_get_sdescriptions_lifetime (voi
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute lifetime, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute lifetime, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return NULL;
 	}
     }
 
     return (char*)attr_p->attr.srtp_context.master_key_lifetime;
@@ -11169,17 +11172,17 @@ sdp_attr_get_sdescriptions_mki (void *sd
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute MKI, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute MKI, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
 	}
     }
 
     *mki_value = (char*)attr_p->attr.srtp_context.mki;
@@ -11225,17 +11228,17 @@ sdp_attr_get_sdescriptions_session_param
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SDESCRIPTIONS, inst_num);
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute session params, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute session params, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return NULL;
         }
     }
 
     return attr_p->attr.srtp_context.session_parameters;
@@ -11279,17 +11282,17 @@ sdp_attr_get_sdescriptions_key_size (voi
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute MKI, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute MKI, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_SDESCRIPTIONS_KEY_SIZE_UNKNOWN;
 	}
     }
 
     return attr_p->attr.srtp_context.master_key_size_bytes;
@@ -11334,17 +11337,17 @@ sdp_attr_get_sdescriptions_salt_size (vo
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute MKI, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute MKI, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_SDESCRIPTIONS_KEY_SIZE_UNKNOWN;
 	}
     }
 
     return attr_p->attr.srtp_context.master_salt_size_bytes;
@@ -11391,17 +11394,17 @@ sdp_attr_get_srtp_crypto_selection_flags
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute MKI, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute MKI, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_SRTP_CRYPTO_SELECTION_FLAGS_UNKNOWN;
 	}
     }
 
     return attr_p->attr.srtp_context.selection_flags;
@@ -11433,17 +11436,17 @@ sdp_attr_set_sdescriptions_tag (void *sd
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SDESCRIPTIONS, inst_num);
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s srtp attribute tag, level %u instance %u "
+            CSFLogError(logTag, "%s srtp attribute tag, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         attr_p->attr.srtp_context.tag = tag_num;
         return (SDP_SUCCESS);
     }
@@ -11488,17 +11491,17 @@ sdp_attr_set_sdescriptions_crypto_suite 
     if (attr_p == NULL) {
 
         /* Version 2 not found, try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
         if (attr_p == NULL) {
 
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute suite, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute suite, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
 	}
     }
 
     attr_p->attr.srtp_context.suite = crypto_suite;
@@ -11559,17 +11562,17 @@ sdp_attr_set_sdescriptions_key (void *sd
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
     if (attr_p == NULL) {
         /* Couldn't find version 2 try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SDESCRIPTIONS, inst_num);
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute key, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute key, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
         }
 
     }
 
@@ -11617,17 +11620,17 @@ sdp_attr_set_sdescriptions_salt (void *s
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
     if (attr_p == NULL) {
         /* Couldn't find version 2, try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp attribute salt, level %u instance %u "
+                CSFLogError(logTag, "%s srtp attribute salt, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
 	}
 
     }
 
@@ -11673,17 +11676,17 @@ sdp_attr_set_sdescriptions_lifetime (voi
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
     if (attr_p == NULL) {
         /* Couldn't find version 2, try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp lifetime attribute, level %u instance %u "
+                CSFLogError(logTag, "%s srtp lifetime attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
 	}
 
     }
 
@@ -11732,17 +11735,17 @@ sdp_attr_set_sdescriptions_mki (void *sd
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
     if (attr_p == NULL) {
         /* Couldn't find version 2, try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp MKI attribute, level %u instance %u "
+                CSFLogError(logTag, "%s srtp MKI attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
 	}
     }
 
     sstrncpy((char*)attr_p->attr.srtp_context.mki, mki_value,
@@ -11792,17 +11795,17 @@ sdp_attr_set_sdescriptions_key_size (voi
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
     if (attr_p == NULL) {
         /* Couldn't find version 2, try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp MKI attribute, level %u instance %u "
+                CSFLogError(logTag, "%s srtp MKI attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
 	}
     }
 
     attr_p->attr.srtp_context.master_key_size_bytes = key_size;
@@ -11849,17 +11852,17 @@ sdp_attr_set_sdescriptions_salt_size (vo
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
     if (attr_p == NULL) {
         /* Couldn't find version 2, try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s srtp MKI attribute, level %u instance %u "
+                CSFLogError(logTag, "%s srtp MKI attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
 	}
     }
 
     attr_p->attr.srtp_context.master_salt_size_bytes = salt_size;
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_config.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_config.c
@@ -1,32 +1,34 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "sdp_os_defs.h"
 #include "sdp.h"
 #include "sdp_private.h"
+#include "CSFLog.h"
 
+static const char* logTag = "sdp_config";
 
 /* Function:    sdp_verify_conf_ptr
  * Description: Verify the configuration pointer is valid by checking for
  *              the SDP magic number.  If not valid, display an error.
  *              Note that we can't keep a statistic of this because we
  *              track stats inside the config structure.
  * Parameters:	conf_p    The configuration structure handle.
  *              str       String containing function name to print.
  * Returns:	TRUE or FALSE.
  */
 tinybool sdp_verify_conf_ptr (sdp_conf_options_t *conf_p)
 {
     if ((conf_p != NULL) && (conf_p->magic_num == SDP_MAGIC_NUM)) {
         return (TRUE);
     } else {
-        sdp_log_errmsg(SDP_ERR_INVALID_CONF_PTR, NULL);
+        CSFLogError(logTag, "SDP: Invalid Config pointer.");
         return (FALSE);
     }
 }
 
 /* Function:    void *sdp_init_config()
  * Description: Initialize SDP configuration structure with the
  *              following defaults:
  *              All debug levels turned OFF.
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_main.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_main.c
@@ -1,16 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "sdp_os_defs.h"
 #include "sdp.h"
 #include "sdp_private.h"
+#include "CSFLog.h"
 
+static const char* logTag = "sdp_main";
 
 /* Note: These *must* be in the same order as the enum types. */
 const sdp_tokenarray_t sdp_token[SDP_MAX_TOKENS] =
 {
     {"v=", sdp_parse_version,      sdp_build_version },
     {"o=", sdp_parse_owner,        sdp_build_owner },
     {"s=", sdp_parse_sessname,     sdp_build_sessname },
     {"i=", sdp_parse_sessinfo,     sdp_build_sessinfo },
@@ -705,46 +707,48 @@ const char *sdp_get_rtcp_unicast_mode_na
  * Parameters:	sdp_p    The SDP structure handle.
  * Returns:	TRUE or FALSE.
  */
 inline tinybool sdp_verify_sdp_ptr (sdp_t *sdp_p)
 {
     if ((sdp_p != NULL) && (sdp_p->magic_num == SDP_MAGIC_NUM)) {
         return (TRUE);
     } else {
-        sdp_log_errmsg(SDP_ERR_INVALID_SDP_PTR, NULL);
+        CSFLogError(logTag, "SDP: Invalid SDP pointer.");
         return (FALSE);
     }
 }
 
 /* Function:    sdp_init_description
  * Description:	Allocates a new SDP structure that can be used for either
  *              parsing or building an SDP description.  This routine
  *              saves the config pointer passed in the SDP structure so
  *              SDP will know how to parse/build based on the options defined.
  *              An SDP structure must be allocated before parsing or building
  *              since the handle must be passed to these routines.
  * Parameters:  config_p     The config handle returned by sdp_init_config
  * Returns:     A handle for a new SDP structure as a void ptr.
 */
-void *sdp_init_description (void *config_p)
+sdp_t *sdp_init_description (const char *peerconnection, void *config_p)
 {
     int i;
     sdp_t *sdp_p;
     sdp_conf_options_t *conf_p = (sdp_conf_options_t *)config_p;
 
     if (sdp_verify_conf_ptr(conf_p) == FALSE) {
         return (NULL);
     }
 
     sdp_p = (sdp_t *)SDP_MALLOC(sizeof(sdp_t));
     if (sdp_p == NULL) {
 	return (NULL);
     }
 
+    sstrncpy(sdp_p->peerconnection, peerconnection, sizeof(sdp_p->peerconnection));
+
     /* Initialize magic number. */
     sdp_p->magic_num = SDP_MAGIC_NUM;
 
     sdp_p->conf_p             = conf_p;
     sdp_p->version            = SDP_CURRENT_VERSION;
     sdp_p->owner_name[0]      = '\0';
     sdp_p->owner_sessid[0]    = '\0';
     sdp_p->owner_version[0]   = '\0';
@@ -774,57 +778,53 @@ void *sdp_init_description (void *config
     for (i=0; i < SDP_MAX_DEBUG_TYPES; i++) {
         sdp_p->debug_flag[i] = conf_p->debug_flag[i];
     }
 
     return (sdp_p);
 }
 
 
-/* Function:    void sdp_debug(void *sdp_p, sdp_debug_e debug_type,
+/* Function:    void sdp_debug(sdp_t *sdp_p, sdp_debug_e debug_type,
  *                             tinybool my_bool);
  * Description:	Define the type of debug for this particular SDP structure.
  *              By default, each SDP description has the settings that are
  *              set for the application.
  *              Valid debug types are ERRORS, WARNINGS, and TRACE.  Each
  *              debug type can be turned on/off individually.  The
  *              debug level can be redefined at any time.
  * Parameters:	sdp_ptr    The SDP handle returned by sdp_init_description.
  *              debug_type Specifies the debug type being enabled/disabled.
  *              my_bool    Defines whether the debug should be enabled or not.
  * Returns:	Nothing.
  */
-void sdp_debug (void *sdp_ptr, sdp_debug_e debug_type, tinybool debug_flag)
+void sdp_debug (sdp_t *sdp_p, sdp_debug_e debug_type, tinybool debug_flag)
 {
-    sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
-
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return;
     }
 
     if (debug_type < SDP_MAX_DEBUG_TYPES)  {
         sdp_p->debug_flag[debug_type] = debug_flag;
     }
 }
 
 
-/* Function:    void sdp_set_string_debug(void *sdp_p, char *debug_str)
+/* Function:    void sdp_set_string_debug(sdp_t *sdp_p, char *debug_str)
  * Description: Define a string to be associated with all debug output
  *              for this SDP. The string will be copied into the SDP
  *              structure and so the library will not be dependent on
  *              the application's memory for this string.
- * Parameters:  sdp_ptr    The SDP handle returned by sdp_init_description.
+ * Parameters:  sdp_p      The SDP handle returned by sdp_init_description.
  *              debug_str  Pointer to a string that should be printed out
  *                         with every debug msg.
  * Returns:     Nothing.
  */
-void sdp_set_string_debug (void *sdp_ptr, char *debug_str)
+void sdp_set_string_debug (sdp_t *sdp_p, const char *debug_str)
 {
-    sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
-
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return;
     }
 
     sstrncpy(sdp_p->debug_str, debug_str, sizeof(sdp_p->debug_str));
 }
 
 
@@ -841,81 +841,76 @@ sdp_result_e sdp_validate_sdp (sdp_t *sd
 
     /* Need to validate c= info is specified at session level or
      * at all m= levels.
      */
     if (sdp_connection_valid((void *)sdp_p, SDP_SESSION_LEVEL) == FALSE) {
         num_media_levels = sdp_get_num_media_lines((void *)sdp_p);
         for (i=1; i <= num_media_levels; i++) {
             if (sdp_connection_valid((void *)sdp_p, (unsigned short)i) == FALSE) {
-                if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                    SDP_ERROR("%s c= connection line not specified for "
-                              "every media level, validation failed.",
-                              sdp_p->debug_str);
-                }
+                sdp_parse_error(sdp_p->peerconnection,
+                    "%s c= connection line not specified for "
+                    "every media level, validation failed.",
+                    sdp_p->debug_str);
                 return (SDP_FAILURE);
             }
         }
     }
 
     /* Validate required lines were specified */
     if ((sdp_owner_valid((void *)sdp_p) == FALSE) &&
         (sdp_p->conf_p->owner_reqd == TRUE)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s o= owner line not specified, validation "
-                      "failed.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s o= owner line not specified, validation failed.",
+            sdp_p->debug_str);
         return (SDP_FAILURE);
     }
 
     if ((sdp_session_name_valid((void *)sdp_p) == FALSE) &&
         (sdp_p->conf_p->session_name_reqd == TRUE)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s s= session name line not specified, validation "
-                      "failed.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s s= session name line not specified, validation failed.",
+            sdp_p->debug_str);
         return (SDP_FAILURE);
     }
 
     if ((sdp_timespec_valid((void *)sdp_p) == FALSE) &&
         (sdp_p->conf_p->timespec_reqd == TRUE)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s t= timespec line not specified, validation "
-                      "failed.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s t= timespec line not specified, validation failed.",
+            sdp_p->debug_str);
         return (SDP_FAILURE);
     }
 
     return (SDP_SUCCESS);
 }
 
 /* Function:    sdp_parse
  * Description: Parse an SDP description in the specified buffer.
- * Parameters:  sdp_ptr  The SDP handle returned by sdp_init_description
+ * Parameters:  sdp_p    The SDP handle returned by sdp_init_description
  *              bufp     Pointer to the buffer containing the SDP
  *                       description to parse.
  *              len      The length of the buffer.
  * Returns:     A result value indicating if the parse was successful and
  *              if not, what type of error was encountered.  The
  *              information from the parse is stored in the sdp_p structure.
  */
-sdp_result_e sdp_parse (void *sdp_ptr, char **bufp, u16 len)
+sdp_result_e sdp_parse (sdp_t *sdp_p, char **bufp, u16 len)
 {
     u8           i;
     u16          cur_level = SDP_SESSION_LEVEL;
     char        *ptr;
     char        *next_ptr = NULL;
     char        *line_end;
     sdp_token_e  last_token = SDP_TOKEN_V;
     sdp_result_e result=SDP_SUCCESS;
     tinybool     parse_done = FALSE;
     tinybool     end_found = FALSE;
     tinybool     first_line = TRUE;
     tinybool     unrec_token = FALSE;
-    sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if ((bufp == NULL) || (*bufp == NULL)) {
         return (SDP_NULL_BUF_PTR);
     }
@@ -937,20 +932,19 @@ sdp_result_e sdp_parse (void *sdp_ptr, c
      */
     while (!end_found) {
 	/* If the last char of this line goes beyond the end of the buffer,
 	 * we don't parse it.
 	 */
         ptr = next_ptr;
         line_end = sdp_findchar(ptr, "\n");
         if (line_end >= (*bufp + len)) {
-            if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                SDP_WARN("%s End of line beyond end of buffer.",
-                         sdp_p->debug_str);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s End of line beyond end of buffer.",
+                sdp_p->debug_str);
             end_found = TRUE;
             break;
         }
 
         /* Print the line if we're tracing. */
         if ((parse_done == FALSE) &&
 	  (sdp_p->debug_flag[SDP_DEBUG_TRACE])) {
 	    SDP_PRINT("%s ", sdp_p->debug_str);
@@ -967,28 +961,25 @@ sdp_result_e sdp_parse (void *sdp_ptr, c
         }
         if (i == SDP_MAX_TOKENS) {
             /* See if the second char on the next line is an '=' char.
              * If so, we note this as an unrecognized token line. */
             if (ptr[1] == '=') {
                 unrec_token = TRUE;
             }
             if (first_line == TRUE) {
-                if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                    SDP_ERROR("%s Attempt to parse text not recognized as "
-                              "SDP text, parse fails.", sdp_p->debug_str);
+                sdp_parse_error(sdp_p->peerconnection,
+                    "%s Attempt to parse text not recognized as "
+                    "SDP text, parse fails.", sdp_p->debug_str);
                     /* If we haven't already printed out the line we
                      * were trying to parse, do it now.
                      */
-                    if (!sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
-			SDP_PRINT("%s ", sdp_p->debug_str);
-
-		        SDP_PRINT("%*s", line_end - ptr, ptr);
-
-                    }
+                if (!sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
+                    SDP_PRINT("%s ", sdp_p->debug_str);
+                    SDP_PRINT("%*s", line_end - ptr, ptr);
                 }
                 sdp_p->conf_p->num_not_sdp_desc++;
                 return (SDP_NOT_SDP_DESCRIPTION);
             } else {
                 end_found = TRUE;
                 break;
             }
         }
@@ -1013,50 +1004,47 @@ sdp_result_e sdp_parse (void *sdp_ptr, c
         }
 
         /* Only certain tokens are valid at the media level. */
         if (cur_level != SDP_SESSION_LEVEL) {
             if ((i != SDP_TOKEN_I) && (i != SDP_TOKEN_C) &&
                 (i != SDP_TOKEN_B) && (i != SDP_TOKEN_K) &&
                 (i != SDP_TOKEN_A) && (i != SDP_TOKEN_M)) {
                 sdp_p->conf_p->num_invalid_token_order++;
-                if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                    SDP_WARN("%s Warning: Invalid token %s found at media "
-                             "level", sdp_p->debug_str, sdp_token[i].name);
-                }
+                sdp_parse_error(sdp_p->peerconnection,
+                    "%s Warning: Invalid token %s found at media level",
+                    sdp_p->debug_str, sdp_token[i].name);
                 continue;
             }
         }
 
         /* Verify the token ordering. */
         if (first_line == TRUE) {
             if (i != SDP_TOKEN_V) {
                 if (sdp_p->conf_p->version_reqd == TRUE) {
-                    if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                        SDP_ERROR("%s First line not v=, parse fails",
-                                  sdp_p->debug_str);
-                    }
+                    sdp_parse_error(sdp_p->peerconnection,
+                        "%s First line not v=, parse fails",
+                        sdp_p->debug_str);
                     sdp_p->conf_p->num_invalid_token_order++;
                     result = SDP_INVALID_TOKEN_ORDERING;
                     parse_done = TRUE;
                 } else {
                     last_token = (sdp_token_e)i;
                 }
             } else {
                 last_token = (sdp_token_e)i;
             }
             first_line = FALSE;
         } else {
             if (i < last_token) {
                 sdp_p->conf_p->num_invalid_token_order++;
-                if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                    SDP_WARN("%s Warning: Invalid token ordering detected, "
-                             "token %s found after token %s", sdp_p->debug_str,
-                             sdp_token[i].name, sdp_token[last_token].name);
-                }
+                sdp_parse_error(sdp_p->peerconnection,
+                    "%s Warning: Invalid token ordering detected, "
+                    "token %s found after token %s", sdp_p->debug_str,
+                    sdp_token[i].name, sdp_token[last_token].name);
             }
         }
 
         /* Finally parse the line. */
         ptr += SDP_TOKEN_LEN;
         result = sdp_token[i].parse_func(sdp_p, cur_level, (const char *)ptr);
         last_token = (sdp_token_e)i;
         if (last_token == SDP_TOKEN_M) {
@@ -1100,26 +1088,25 @@ sdp_result_e sdp_parse (void *sdp_ptr, c
         return (result);
     }
 }
 
 
 /* Function:    sdp_build
  * Description: Build an SDP description in the specified buffer based
  *              on the information in the given SDP structure.
- * Parameters:  sdp_ptr  The SDP handle returned by sdp_init_description
+ * Parameters:  sdp_p    The SDP handle returned by sdp_init_description
  *              fs A flex_string where the SDP description should be built.
  * Returns:     A result value indicating if the build was successful and
  *              if not, what type of error was encountered - e.g.,
  *              description was too long for the given buffer.
  */
-sdp_result_e sdp_build (void *sdp_ptr, flex_string *fs)
+sdp_result_e sdp_build (sdp_t *sdp_p, flex_string *fs)
 {
     int i, j;
-    sdp_t              *sdp_p = (sdp_t *)sdp_ptr;
     sdp_result_e        result = SDP_SUCCESS;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if (!fs) {
         return (SDP_NULL_BUF_PTR);
@@ -1159,26 +1146,25 @@ sdp_result_e sdp_build (void *sdp_ptr, f
     }
 
     return (result);
 }
 
 /* Function:    sdp_copy
  * Description: Create a new SDP structure that is an exact copy of the
  *              one passed in.
- * Parameters:  sdp_ptr  The SDP handle of the SDP to be copied.
+ * Parameters:  orig_sdp_p  The SDP handle of the SDP to be copied.
  * Returns:     A handle for a new SDP structure as a void ptr.
 */
-void *sdp_copy (void *sdp_ptr)
+sdp_t *sdp_copy (sdp_t *orig_sdp_p)
 {
     int i, j;
     u16                 cur_level;
     sdp_result_e        rc;
     sdp_t              *new_sdp_p;
-    sdp_t              *orig_sdp_p = (sdp_t *)sdp_ptr;
     sdp_timespec_t     *cur_time_p = NULL;
     sdp_timespec_t     *orig_time_p = NULL;
     sdp_mca_t          *orig_mca_p = NULL;
     sdp_mca_t          *new_mca_p = NULL;
     sdp_mca_t          *dst_mca_p = NULL;
     sdp_media_profiles_t *src_media_profile_p;
     sdp_media_profiles_t *dst_media_profile_p;
 
@@ -1190,16 +1176,19 @@ void *sdp_copy (void *sdp_ptr)
         return (NULL);
     }
 
     new_sdp_p = (sdp_t *)SDP_MALLOC(sizeof(sdp_t));
     if (new_sdp_p == NULL) {
         return (NULL);
     }
 
+    sstrncpy(new_sdp_p->peerconnection, orig_sdp_p->peerconnection,
+        sizeof(new_sdp_p->peerconnection));
+
     /* Initialize magic number. */
     new_sdp_p->magic_num = orig_sdp_p->magic_num;
 
     new_sdp_p->conf_p             = orig_sdp_p->conf_p;
     new_sdp_p->version            = orig_sdp_p->version;
     sstrncpy(new_sdp_p->owner_name, orig_sdp_p->owner_name,
              SDP_MAX_LINE_LEN+1);
     sstrncpy(new_sdp_p->owner_sessid, orig_sdp_p->owner_sessid,
@@ -1376,24 +1365,23 @@ void *sdp_copy (void *sdp_ptr)
         new_sdp_p->debug_flag[i] = orig_sdp_p->debug_flag[i];
     }
 
     return (new_sdp_p);
 }
 
 /* Function:    sdp_free_description
  * Description:	Free an SDP description and all memory associated with it.
- * Parameters:  sdp_ptr  The SDP handle returned by sdp_init_description
+ * Parameters:  sdp_p  The SDP handle returned by sdp_init_description
  * Returns:     A result value indicating if the free was successful and
  *              if not, what type of error was encountered - e.g., sdp_p
  *              was invalid and didn't point to an SDP structure.
 */
-sdp_result_e sdp_free_description (void *sdp_ptr)
+sdp_result_e sdp_free_description (sdp_t *sdp_p)
 {
-    sdp_t           *sdp_p = (sdp_t *)sdp_ptr;
     sdp_timespec_t  *time_p, *next_time_p;
     sdp_attr_t      *attr_p, *next_attr_p;
     sdp_mca_t       *mca_p, *next_mca_p;
     sdp_bw_t        *bw_p;
     sdp_bw_data_t   *bw_data_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
@@ -1454,8 +1442,22 @@ sdp_result_e sdp_free_description (void 
 	SDP_FREE(mca_p);
 	mca_p = next_mca_p;
     }
 
     SDP_FREE(sdp_p);
 
     return (SDP_SUCCESS);
 }
+
+/*
+ * sdp_parse_error
+ * Send SDP parsing errors to log and up to peerconnection
+ */
+void sdp_parse_error(const char *peerconnection, const char *format, ...) {
+    va_list ap;
+
+    /* TODO - report error up to PeerConnection here */
+
+    va_start(ap, format);
+    CSFLogErrorV("SDP Parse", format, ap);
+    va_end(ap);
+}
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_os_defs.h
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_os_defs.h
@@ -8,18 +8,16 @@
 
 #include "cpr_types.h"
 #include "cpr_stdio.h"
 #include "cpr_stdlib.h"
 #include "cpr_string.h"
 #include "phone_debug.h"
 
 
-#define SDP_ERROR     buginf
-#define SDP_WARN      buginf
 #define SDP_PRINT     buginf
 #define SDP_MALLOC(x) cpr_calloc(1, (x))
 #define SDP_FREE      cpr_free
 
 typedef uint8_t    tinybool;
 typedef uint8_t    u8;
 typedef uint16_t   u16;
 typedef uint16_t   uint16;
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_private.h
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_private.h
@@ -3,541 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _SDP_PRIVATE_H_
 #define _SDP_PRIVATE_H_
 
 
 #include "sdp.h"
 
-/* SDP Defines */
-
-#define SDP_MAX_STRING_LEN      256  /* Max len for SDP string       */
-#define SDP_MAX_SHORT_STRING_LEN      12  /* Max len for a short SDP string  */
-#define SDP_MAX_PAYLOAD_TYPES   23  /* Max payload types in m= line */
-#define SDP_TOKEN_LEN           2   /* Len of <token>=              */
-#define SDP_CURRENT_VERSION     0   /* Current default SDP version  */
-#define SDP_MAX_PORT_PARAMS     4   /* Max m= port params - x/x/x/x */
-#define SDP_MIN_DYNAMIC_PAYLOAD 96  /* Min dynamic payload */
-#define SDP_MAX_DYNAMIC_PAYLOAD 127 /* Max dynamic payload */
-#define SDP_MIN_CIF_VALUE 1  /* applies to all  QCIF,CIF,CIF4,CIF16,SQCIF */
-#define SDP_MAX_CIF_VALUE 32 /* applies to all  QCIF,CIF,CIF4,CIF16,SQCIF */
-#define SDP_MAX_SRC_ADDR_LIST  1 /* Max source addrs for which filter applies */
-
-
-#define SDP_DEFAULT_PACKETIZATION_MODE_VALUE 0 /* max packetization mode for H.264 */
-#define SDP_MAX_PACKETIZATION_MODE_VALUE 2 /* max packetization mode for H.264 */
-
-#define SDP_MAX_LEVEL_ASYMMETRY_ALLOWED_VALUE 1 /* max level asymmetry allowed value for H.264 */
-#define SDP_DEFAULT_LEVEL_ASYMMETRY_ALLOWED_VALUE 1 /* default level asymmetry allowed value for H.264 */
-#define SDP_INVALID_LEVEL_ASYMMETRY_ALLOWED_VALUE 2 /* invalid value for level-asymmetry-allowed param for H.264 */
-
-
-/* Max number of stream ids that can be grouped together */
-#define SDP_MAX_GROUP_STREAM_ID 10
-
-
-#define SDP_MAGIC_NUM           0xabcdabcd
-
-#define SDP_UNSUPPORTED         "Unsupported"
-#define SDP_MAX_LINE_LEN   256 /* Max len for SDP Line */
-
-#define SDP_MAX_PROFILE_VALUE  10
-#define SDP_MAX_LEVEL_VALUE    100
-#define SDP_MIN_PROFILE_LEVEL_VALUE 0
-#define SDP_MAX_TTL_VALUE  255
-#define SDP_MIN_MCAST_ADDR_HI_BIT_VAL 224
-#define SDP_MAX_MCAST_ADDR_HI_BIT_VAL 239
-
-/* SDP Enum Types */
-
-typedef enum {
-    SDP_ERR_INVALID_CONF_PTR,
-    SDP_ERR_INVALID_SDP_PTR,
-    SDP_ERR_INTERNAL,
-    SDP_MAX_ERR_TYPES
-} sdp_errmsg_e;
-
-/* SDP Structure Definitions */
-
-/* String names of varios tokens */
-typedef struct {
-    char                     *name;
-    u8                        strlen;
-} sdp_namearray_t;
-
-/* c= line info */
-typedef struct {
-    sdp_nettype_e             nettype;
-    sdp_addrtype_e            addrtype;
-    char                      conn_addr[SDP_MAX_STRING_LEN+1];
-    tinybool                  is_multicast;
-    u16                       ttl;
-    u16                       num_of_addresses;
-} sdp_conn_t;
-
-/* t= line info */
-typedef struct sdp_timespec {
-    char                      start_time[SDP_MAX_STRING_LEN+1];
-    char                      stop_time[SDP_MAX_STRING_LEN+1];
-    struct sdp_timespec      *next_p;
-} sdp_timespec_t;
-
-
-/* k= line info */
-typedef struct sdp_encryptspec {
-    sdp_encrypt_type_e        encrypt_type;
-    char		      encrypt_key[SDP_MAX_STRING_LEN+1];
-} sdp_encryptspec_t;
-
-
-/* FMTP attribute deals with named events in the range of 0-255 as
- * defined in RFC 2833 */
-#define SDP_MIN_NE_VALUE      0
-#define SDP_MAX_NE_VALUES     256
-#define SDP_NE_BITS_PER_WORD  ( sizeof(u32) * 8 )
-#define SDP_NE_NUM_BMAP_WORDS ((SDP_MAX_NE_VALUES + SDP_NE_BITS_PER_WORD - 1)/SDP_NE_BITS_PER_WORD )
-#define SDP_NE_BIT_0          ( 0x00000001 )
-#define SDP_NE_ALL_BITS       ( 0xFFFFFFFF )
-
-#define SDP_DEINT_BUF_REQ_FLAG   0x1
-#define SDP_INIT_BUF_TIME_FLAG   0x2
-#define SDP_MAX_RCMD_NALU_SIZE_FLAG   0x4
-#define SDP_DEINT_BUF_CAP_FLAG   0x8
-
-typedef struct sdp_fmtp {
-    u16                       payload_num;
-    u32                       maxval;  /* maxval optimizes bmap search */
-    u32                       bmap[ SDP_NE_NUM_BMAP_WORDS ];
-    sdp_fmtp_format_type_e    fmtp_format; /* Gives the format type
-                                              for FMTP attribute*/
-    tinybool                  annexb_required;
-    tinybool                  annexa_required;
-
-    tinybool                  annexa;
-    tinybool                  annexb;
-    u32                       bitrate;
-    u32                       mode;
-
-    /* some OPUS specific fmtp params */
-    u32                       maxaveragebitrate;
-    u16                       usedtx;
-    u16                       stereo;
-    u16                       useinbandfec;
-    char                      maxcodedaudiobandwidth[SDP_MAX_STRING_LEN+1];
-    u16                       cbr;
-
-    /* some Data Channel specific fmtp params */
-    u16                       streams;   /* Num streams per Data Channel */
-    char                      protocol[SDP_MAX_STRING_LEN+1];
-
-    /* BEGIN - All Video related FMTP parameters */
-    u16                       qcif;
-    u16                       cif;
-    u16                       maxbr;
-    u16                       sqcif;
-    u16                       cif4;
-    u16                       cif16;
-
-    u16                       custom_x;
-    u16                       custom_y;
-    u16                       custom_mpi;
-    /* CUSTOM=360,240,4 implies X-AXIS=360, Y-AXIS=240; MPI=4 */
-    u16                       par_width;
-    u16                       par_height;
-    /* PAR=12:11 implies par_width=12, par_height=11 */
-
-    /* CPCF should be a float. IOS does not support float and so it is u16 */
-    /* For portable stack, CPCF should be defined as float and the parsing should
-     * be modified accordingly */
-    u16                       cpcf;
-    u16                       bpp;
-    u16                       hrd;
-
-    int16                     profile;
-    int16                     level;
-    tinybool                  is_interlace;
-
-    /* some more H.264 specific fmtp params */
-    char		      profile_level_id[SDP_MAX_STRING_LEN+1];
-    char                      parameter_sets[SDP_MAX_STRING_LEN+1];
-    u16                       packetization_mode;
-    u16                       level_asymmetry_allowed;
-    u16                       interleaving_depth;
-    u32                       deint_buf_req;
-    u32                       max_don_diff;
-    u32                       init_buf_time;
-
-    u32                       max_mbps;
-    u32                       max_fs;
-    u32                       max_cpb;
-    u32                       max_dpb;
-    u32                       max_br;
-    tinybool                  redundant_pic_cap;
-    u32                       deint_buf_cap;
-    u32                       max_rcmd_nalu_size;
-    tinybool                  parameter_add;
-
-    tinybool                  annex_d;
-
-    tinybool                  annex_f;
-    tinybool                  annex_i;
-    tinybool                  annex_j;
-    tinybool                  annex_t;
-
-    /* H.263 codec requires annex K,N and P to have values */
-    u16                       annex_k_val;
-    u16                       annex_n_val;
-
-    /* Annex P can take one or more values in the range 1-4 . e.g P=1,3 */
-    u16                       annex_p_val_picture_resize; /* 1 = four; 2 = sixteenth */
-    u16                       annex_p_val_warp; /* 3 = half; 4=sixteenth */
-
-    u8                        flag;
-
-  /* END - All Video related FMTP parameters */
-
-} sdp_fmtp_t;
-
-/* a=qos|secure|X-pc-qos|X-qos info */
-typedef struct sdp_qos {
-    sdp_qos_strength_e        strength;
-    sdp_qos_dir_e             direction;
-    tinybool                  confirm;
-    sdp_qos_status_types_e    status_type;
-} sdp_qos_t;
-
-/* a=curr:qos status_type direction */
-typedef struct sdp_curr {
-    sdp_curr_type_e           type;
-    sdp_qos_status_types_e    status_type;
-    sdp_qos_dir_e             direction;
-} sdp_curr_t;
-
-/* a=des:qos strength status_type direction */
-typedef struct sdp_des {
-    sdp_des_type_e            type;
-    sdp_qos_strength_e        strength;
-    sdp_qos_status_types_e    status_type;
-    sdp_qos_dir_e             direction;
-} sdp_des_t;
-
-/* a=conf:qos status_type direction */
-typedef struct sdp_conf {
-    sdp_conf_type_e           type;
-    sdp_qos_status_types_e    status_type;
-    sdp_qos_dir_e             direction;
-} sdp_conf_t;
-
-
-/* a=rtpmap or a=sprtmap info */
-typedef struct sdp_transport_map {
-    u16                       payload_num;
-    char                      encname[SDP_MAX_STRING_LEN+1];
-    u32                       clockrate;
-    u16                       num_chan;
-} sdp_transport_map_t;
-
-
-/* a=rtr info */
-typedef struct sdp_rtr {
-    tinybool                  confirm;
-} sdp_rtr_t;
-
-/* a=subnet info */
-typedef struct sdp_subnet {
-    sdp_nettype_e             nettype;
-    sdp_addrtype_e            addrtype;
-    char                      addr[SDP_MAX_STRING_LEN+1];
-    int32                     prefix;
-} sdp_subnet_t;
-
-
-/* a=X-pc-codec info */
-typedef struct sdp_pccodec {
-    u16                       num_payloads;
-    ushort                    payload_type[SDP_MAX_PAYLOAD_TYPES];
-} sdp_pccodec_t;
-
-/* a=direction info */
-typedef struct sdp_comediadir {
-    sdp_mediadir_role_e      role;
-    tinybool                 conn_info_present;
-    sdp_conn_t               conn_info;
-    u32                      src_port;
-} sdp_comediadir_t;
-
-
-
-/* a=silenceSupp info */
-typedef struct sdp_silencesupp {
-    tinybool                  enabled;
-    tinybool                  timer_null;
-    u16                       timer;
-    sdp_silencesupp_pref_e    pref;
-    sdp_silencesupp_siduse_e  siduse;
-    tinybool                  fxnslevel_null;
-    u8                        fxnslevel;
-} sdp_silencesupp_t;
-
-
-/*
- * a=mptime info */
-/* Note that an interval value of zero corresponds to
- * the "-" syntax on the a= line.
- */
-typedef struct sdp_mptime {
-    u16                       num_intervals;
-    ushort                    intervals[SDP_MAX_PAYLOAD_TYPES];
-} sdp_mptime_t;
-
-/*
- * a=X-sidin:<val>, a=X-sidout:< val> and a=X-confid: <val>
- * Stream Id,ConfID related attributes to be used for audio/video conferencing
- *
-*/
-
-typedef struct sdp_stream_data {
-    char                      x_sidin[SDP_MAX_STRING_LEN+1];
-    char                      x_sidout[SDP_MAX_STRING_LEN+1];
-    char                      x_confid[SDP_MAX_STRING_LEN+1];
-    sdp_group_attr_e          group_attr; /* FID or LS */
-    u16                       num_group_id;
-    u16                       group_id_arr[SDP_MAX_GROUP_STREAM_ID];
-} sdp_stream_data_t;
-
-/*
- * a=source-filter:<filter-mode> <filter-spec>
- * <filter-spec> = <nettype> <addrtype> <dest-addr> <src_addr><src_addr>...
- * One or more source addresses to apply filter, for one or more connection
- * address in unicast/multicast environments
- */
-typedef struct sdp_source_filter {
-   sdp_src_filter_mode_e  mode;
-   sdp_nettype_e     nettype;
-   sdp_addrtype_e    addrtype;
-   char              dest_addr[SDP_MAX_STRING_LEN+1];
-   u16               num_src_addr;
-   char              src_list[SDP_MAX_SRC_ADDR_LIST+1][SDP_MAX_STRING_LEN+1];
-} sdp_source_filter_t;
-
-/*
- * b=<bw-modifier>:<val>
- *
-*/
-typedef struct sdp_bw_data {
-    struct sdp_bw_data       *next_p;
-    sdp_bw_modifier_e        bw_modifier;
-    int                      bw_val;
-} sdp_bw_data_t;
-
-/*
- * This structure houses a linked list of sdp_bw_data_t instances. Each
- * sdp_bw_data_t instance represents one b= line.
- */
-typedef struct sdp_bw {
-    u16                      bw_data_count;
-    sdp_bw_data_t            *bw_data_list;
-} sdp_bw_t;
-
-/* Media lines for AAL2 may have more than one transport type defined
- * each with its own payload type list.  These are referred to as
- * profile types instead of transport types.  This structure is used
- * to handle these multiple profile types. Note: One additional profile
- * field is needed because of the way parsing is done.  This is not an
- * error. */
-typedef struct sdp_media_profiles {
-    u16             num_profiles;
-    sdp_transport_e profile[SDP_MAX_PROFILES+1];
-    u16             num_payloads[SDP_MAX_PROFILES];
-    sdp_payload_ind_e payload_indicator[SDP_MAX_PROFILES][SDP_MAX_PAYLOAD_TYPES];
-    u16             payload_type[SDP_MAX_PROFILES][SDP_MAX_PAYLOAD_TYPES];
-} sdp_media_profiles_t;
-
-
-/*
- * sdp_srtp_crypto_context_t
- *  This type is used to hold cryptographic context information.
- *
- */
-
-typedef struct sdp_srtp_crypto_context_t_ {
-    int32                   tag;
-    unsigned long           selection_flags;
-    sdp_srtp_crypto_suite_t suite;
-    unsigned char           master_key[SDP_SRTP_MAX_KEY_SIZE_BYTES];
-    unsigned char           master_salt[SDP_SRTP_MAX_SALT_SIZE_BYTES];
-    unsigned char           master_key_size_bytes;
-    unsigned char           master_salt_size_bytes;
-    unsigned long           ssrc; /* not used */
-    unsigned long           roc;  /* not used */
-    unsigned long           kdr;  /* not used */
-    unsigned short          seq;  /* not used */
-    sdp_srtp_fec_order_t    fec_order; /* not used */
-    unsigned char           master_key_lifetime[SDP_SRTP_MAX_LIFETIME_BYTES];
-    unsigned char           mki[SDP_SRTP_MAX_MKI_SIZE_BYTES];
-    u16                     mki_size_bytes;
-    char*                   session_parameters;
-} sdp_srtp_crypto_context_t;
-
-
-/* m= line info and associated attribute list */
-/* Note: Most of the port parameter values are 16-bit values.  We set
- * the type to int32 so we can return either a 16-bit value or the
- * choose value. */
-typedef struct sdp_mca {
-    sdp_media_e               media;
-    sdp_conn_t                conn;
-    sdp_transport_e           transport;
-    sdp_port_format_e         port_format;
-    int32                     port;
-    int32                     sctpport;
-    int32                     num_ports;
-    int32                     vpi;
-    u32                       vci;  /* VCI needs to be 32-bit */
-    int32                     vcci;
-    int32                     cid;
-    u16                       num_payloads;
-    sdp_payload_ind_e         payload_indicator[SDP_MAX_PAYLOAD_TYPES];
-    u16                       payload_type[SDP_MAX_PAYLOAD_TYPES];
-    sdp_media_profiles_t     *media_profiles_p;
-    tinybool                  sessinfo_found;
-    sdp_encryptspec_t         encrypt;
-    sdp_bw_t                  bw;
-    sdp_attr_e                media_direction; /* Either INACTIVE, SENDONLY,
-                                                  RECVONLY, or SENDRECV */
-    u32                       mid;
-    struct sdp_attr          *media_attrs_p;
-    struct sdp_mca           *next_p;
-} sdp_mca_t;
-
-
-/* generic a= line info */
-typedef struct sdp_attr {
-    sdp_attr_e                type;
-    union {
-        tinybool              boolean_val;
-        u32                   u32_val;
-        char                  string_val[SDP_MAX_STRING_LEN+1];
-        char                  ice_attr[SDP_MAX_STRING_LEN+1];
-        sdp_fmtp_t            fmtp;
-        sdp_qos_t             qos;
-        sdp_curr_t            curr;
-        sdp_des_t             des;
-        sdp_conf_t            conf;
-        sdp_transport_map_t   transport_map;	/* A rtpmap or sprtmap */
-        sdp_subnet_t          subnet;
-        sdp_t38_ratemgmt_e    t38ratemgmt;
-        sdp_t38_udpec_e       t38udpec;
-        sdp_pccodec_t         pccodec;
-        sdp_silencesupp_t     silencesupp;
-        sdp_mca_t            *cap_p;	/* A X-CAP or CDSC attribute */
-        sdp_rtr_t             rtr;
-	sdp_comediadir_t      comediadir;
-	sdp_srtp_crypto_context_t srtp_context;
-        sdp_mptime_t          mptime;
-        sdp_stream_data_t     stream_data;
-        char                  unknown[SDP_MAX_STRING_LEN+1];
-        sdp_source_filter_t   source_filter;
-    } attr;
-    struct sdp_attr          *next_p;
-} sdp_attr_t;
-
-typedef struct sdp_srtp_crypto_suite_list_ {
-    sdp_srtp_crypto_suite_t crypto_suite_val;
-    char * crypto_suite_str;
-    unsigned char key_size_bytes;
-    unsigned char salt_size_bytes;
-} sdp_srtp_crypto_suite_list;
-
-/* Application configuration options */
-typedef struct sdp_conf_options {
-    u32                       magic_num;
-    tinybool                  debug_flag[SDP_MAX_DEBUG_TYPES];
-    tinybool                  version_reqd;
-    tinybool                  owner_reqd;
-    tinybool                  session_name_reqd;
-    tinybool                  timespec_reqd;
-    tinybool                  media_supported[SDP_MAX_MEDIA_TYPES];
-    tinybool                  nettype_supported[SDP_MAX_NETWORK_TYPES];
-    tinybool                  addrtype_supported[SDP_MAX_ADDR_TYPES];
-    tinybool                  transport_supported[SDP_MAX_TRANSPORT_TYPES];
-    tinybool                  allow_choose[SDP_MAX_CHOOSE_PARAMS];
-    /* Statistics counts */
-    u32                       num_builds;
-    u32                       num_parses;
-    u32                       num_not_sdp_desc;
-    u32                       num_invalid_token_order;
-    u32                       num_invalid_param;
-    u32                       num_no_resource;
-    struct sdp_conf_options  *next_p;
-} sdp_conf_options_t;
-
-
-/* Session level SDP info with pointers to media line info. */
-/* Elements here that can only be one of are included directly. Elements */
-/* that can be more than one are pointers.                               */
-typedef struct {
-    u32                       magic_num;
-    sdp_conf_options_t       *conf_p;
-    tinybool                  debug_flag[SDP_MAX_DEBUG_TYPES];
-    char                      debug_str[SDP_MAX_STRING_LEN+1];
-    u32                       debug_id;
-    int32                     version; /* version is really a u16 */
-    char                      owner_name[SDP_MAX_STRING_LEN+1];
-    char                      owner_sessid[SDP_MAX_STRING_LEN+1];
-    char                      owner_version[SDP_MAX_STRING_LEN+1];
-    sdp_nettype_e             owner_network_type;
-    sdp_addrtype_e            owner_addr_type;
-    char                      owner_addr[SDP_MAX_STRING_LEN+1];
-    char                      sessname[SDP_MAX_STRING_LEN+1];
-    tinybool                  sessinfo_found;
-    tinybool                  uri_found;
-    sdp_conn_t                default_conn;
-    sdp_timespec_t           *timespec_p;
-    sdp_encryptspec_t         encrypt;
-    sdp_bw_t                  bw;
-    sdp_attr_t               *sess_attrs_p;
-
-    /* Info to help with building capability attributes. */
-    u16                       cur_cap_num;
-    sdp_mca_t                *cur_cap_p;
-    /* Info to help parsing X-cpar attrs. */
-    u16                       cap_valid;
-    u16                       last_cap_inst;
-    /* Info to help building X-cpar/cpar attrs. */
-    sdp_attr_e		      last_cap_type;
-
-    /* MCA - Media, connection, and attributes */
-    sdp_mca_t                *mca_p;
-    ushort                    mca_count;
-} sdp_t;
-
-
-/* Token processing table. */
-typedef struct {
-    char *name;
-    sdp_result_e (*parse_func)(sdp_t *sdp_p, u16 level, const char *ptr);
-    sdp_result_e (*build_func)(sdp_t *sdp_p, u16 level, flex_string *fs);
-} sdp_tokenarray_t;
-
-
-/* Attribute processing table. */
-typedef struct {
-    char *name;
-    u16 strlen;
-    sdp_result_e (*parse_func)(sdp_t *sdp_p, sdp_attr_t *attr_p,
-                               const char *ptr);
-    sdp_result_e (*build_func)(sdp_t *sdp_p, sdp_attr_t *attr_p,
-                               flex_string *fs);
-} sdp_attrarray_t;
-
-
-/* Data declarations */
-
 extern const sdp_attrarray_t sdp_attr[];
 extern const sdp_namearray_t sdp_media[];
 extern const sdp_namearray_t sdp_nettype[];
 extern const sdp_namearray_t sdp_addrtype[];
 extern const sdp_namearray_t sdp_transport[];
 extern const sdp_namearray_t sdp_encrypt[];
 extern const sdp_namearray_t sdp_payload[];
 extern const sdp_namearray_t sdp_t38_rate[];
@@ -824,14 +299,13 @@ extern tinybool sdp_getchoosetok(const c
 
 extern
 tinybool verify_sdescriptions_mki(char *buf, char *mkiVal, u16 *mkiLen);
 
 extern
 tinybool verify_sdescriptions_lifetime(char *buf);
 
 /* sdp_services_xxx.c */
-extern void sdp_log_errmsg(sdp_errmsg_e err_msg, char *str);
 extern void sdp_dump_buffer(char *_ptr, int _size_bytes);
 
 tinybool sdp_checkrange(sdp_t *sdp, char *num, ulong* lval);
 
 #endif /* _SDP_PRIVATE_H_ */
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_services_unix.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_services_unix.c
@@ -10,16 +10,17 @@
 /******************************************************************/
 /*  Required Platform Routines                                    */
 /*                                                                */
 /*     These routines are called from the common SDP code.        */
 /*     They must be provided for each platform.                   */
 /*                                                                */
 /******************************************************************/
 
+#if 0
 void sdp_log_errmsg (sdp_errmsg_e errmsg, char *str)
 {
     switch (errmsg) {
 
     case SDP_ERR_INVALID_CONF_PTR:
         SDP_ERROR("\nSDP: Invalid Config pointer (%s).", str);
         break;
 
@@ -30,16 +31,17 @@ void sdp_log_errmsg (sdp_errmsg_e errmsg
     case SDP_ERR_INTERNAL:
         SDP_ERROR("\nSDP: Internal error (%s).", str);
         break;
 
     default:
         break;
     }
 }
+#endif
 
 /*
  * sdp_dump_buffer
  *
  * Utility to send _size_bytes of data from the string
  * pointed to by _ptr to the buginf function. This may make
  * multiple buginf calls if the buffer is too large for buginf.
  */
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_services_win32.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_services_win32.c
@@ -10,16 +10,17 @@
 /******************************************************************/
 /*  Required Platform Routines                                    */
 /*                                                                */
 /*     These routines are called from the common SDP code.        */
 /*     They must be provided for each platform.                   */
 /*                                                                */
 /******************************************************************/
 
+#if 0
 void sdp_log_errmsg (sdp_errmsg_e errmsg, char *str)
 {
     switch (errmsg) {
 
     case SDP_ERR_INVALID_CONF_PTR:
         SDP_ERROR("\nSDP: Invalid Config pointer (%s).", str);
         break;
 
@@ -30,16 +31,17 @@ void sdp_log_errmsg (sdp_errmsg_e errmsg
     case SDP_ERR_INTERNAL:
         SDP_ERROR("\nSDP: Internal error (%s).", str);
         break;
 
     default:
         break;
     }
 }
+#endif
 
 /*
  * sdp_dump_buffer
  *
  * Utility to send _size_bytes of data from the string
  * pointed to by _ptr to the buginf function. This may make
  * multiple buginf calls if the buffer is too large for buginf.
  */
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_token.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_token.c
@@ -5,49 +5,49 @@
 #include <errno.h>
 
 #include "sdp_os_defs.h"
 #include "sdp.h"
 #include "sdp_private.h"
 #include "configmgr.h"
 #include "prot_configmgr.h"
 #include "ccapi.h"
+#include "CSFLog.h"
+
+static const char *logTag = "sdp_token";
 
 #define MCAST_STRING_LEN 4
 
 
 sdp_result_e sdp_parse_version (sdp_t *sdp_p, u16 level, const char *ptr)
 {
     sdp_result_e result = SDP_FAILURE;
 
     sdp_p->version = (u16)sdp_getnextnumtok(ptr, &ptr, " \t", &result);
     if ((result != SDP_SUCCESS) || (sdp_p->version != SDP_CURRENT_VERSION)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Invalid version (%lu) found, parse failed.",
-                      sdp_p->debug_str, sdp_p->version);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Invalid version (%lu) found, parse failed.",
+            sdp_p->debug_str, sdp_p->version);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parse version line successful, version %u",
                   sdp_p->debug_str, (u16)sdp_p->version);
     }
     return (SDP_SUCCESS);
 }
 
 sdp_result_e sdp_build_version (sdp_t *sdp_p, u16 level, flex_string *fs)
 {
     if (sdp_p->version == SDP_INVALID_VALUE) {
         if (sdp_p->conf_p->version_reqd == TRUE) {
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Invalid version for v= line, "
-                          "build failed.", sdp_p->debug_str);
-            }
+            CSFLogError(logTag, "%s Invalid version for v= line, "
+                        "build failed.", sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         } else {
             /* v= line is not required. */
             return (SDP_SUCCESS);
         }
     }
 
@@ -63,134 +63,125 @@ sdp_result_e sdp_parse_owner (sdp_t *sdp
 {
     int          i;
     char        *tmpptr;
     sdp_result_e result;
     char         tmp[SDP_MAX_STRING_LEN];
 
     if (sdp_p->owner_name[0] != '\0') {
         sdp_p->conf_p->num_invalid_token_order++;
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: More than one o= line specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: More than one o= line specified.",
+            sdp_p->debug_str);
     }
 
     /* Find the owner name. */
     ptr = sdp_getnextstrtok(ptr, sdp_p->owner_name, sizeof(sdp_p->owner_name), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No owner name specified for o=.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No owner name specified for o=.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the owner session id.  This is a numeric field but is
      * stored as a string since it may be 64 bit.
      */
     ptr = sdp_getnextstrtok(ptr, sdp_p->owner_sessid, sizeof(sdp_p->owner_sessid), " \t", &result);
     if (result == SDP_SUCCESS) {
         /* Make sure the sessid is numeric, even though we store it as
          * a string.
          */
         (void)sdp_getnextnumtok(sdp_p->owner_sessid,
                                 (const char **)&tmpptr, " \t",&result);
     }
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Invalid owner session id specified for o=.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Invalid owner session id specified for o=.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the owner version. */
     ptr = sdp_getnextstrtok(ptr, sdp_p->owner_version, sizeof(sdp_p->owner_version), " \t", &result);
     if (result == SDP_SUCCESS) {
         /* Make sure the version is numeric, even though we store it as
          * a string.
          */
         (void)sdp_getnextnumtok(sdp_p->owner_version,
                                 (const char **)&tmpptr," \t",&result);
     }
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Invalid owner version specified for o=.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Invalid owner version specified for o=.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the owner network type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No owner network type specified for o=.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No owner network type specified for o=.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     sdp_p->owner_network_type = SDP_NT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_NETWORK_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_nettype[i].name,
                         sdp_nettype[i].strlen) == 0) {
             if (sdp_p->conf_p->nettype_supported[i] == TRUE) {
                 sdp_p->owner_network_type = (sdp_nettype_e)i;
             }
         }
     }
     if (sdp_p->owner_network_type == SDP_NT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Owner network type unsupported (%s)",
-                      sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Owner network type unsupported (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the owner address type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No owner address type specified for o=.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No owner address type specified for o=.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     sdp_p->owner_addr_type = SDP_AT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_ADDR_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_addrtype[i].name,
                         sdp_addrtype[i].strlen) == 0) {
             if (sdp_p->conf_p->addrtype_supported[i] == TRUE) {
                 sdp_p->owner_addr_type = (sdp_addrtype_e)i;
             }
         }
     }
     if ((sdp_p->owner_addr_type == SDP_AT_UNSUPPORTED) &&
         (sdp_p->owner_network_type != SDP_NT_ATM)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Owner address type unsupported (%s)",
-                      sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Owner address type unsupported (%s)",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the owner address. */
     ptr = sdp_getnextstrtok(ptr, sdp_p->owner_addr, sizeof(sdp_p->owner_addr), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No owner address specified.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No owner address specified.", sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parse owner: name %s, session id %s, version %s",
                   sdp_p->debug_str, sdp_p->owner_name, sdp_p->owner_sessid,
                   sdp_p->owner_version);
@@ -214,20 +205,18 @@ sdp_result_e sdp_build_owner (sdp_t *sdp
            (sdp_p->owner_addr_type == SDP_AT_INVALID)) {
           flex_string_sprintf(fs, "o=%s %s %s %s - -\r\n",
                     sdp_p->owner_name, sdp_p->owner_sessid,
                     sdp_p->owner_version,
                     sdp_get_network_name(sdp_p->owner_network_type));
         }
 
         if (sdp_p->conf_p->owner_reqd == TRUE) {
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Invalid params for o= owner line, "
-                          "build failed.", sdp_p->debug_str);
-            }
+            CSFLogError(logTag, "%s Invalid params for o= owner line, "
+                        "build failed.", sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         } else {
             /* o= line is not required. */
             return (SDP_SUCCESS);
         }
     }
 
@@ -246,47 +235,43 @@ sdp_result_e sdp_build_owner (sdp_t *sdp
 
 sdp_result_e sdp_parse_sessname (sdp_t *sdp_p, u16 level, const char *ptr)
 {
     int   str_len;
     char *endptr;
 
     if (sdp_p->sessname[0] != '\0') {
         sdp_p->conf_p->num_invalid_token_order++;
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: More than one s= line specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: More than one s= line specified.",
+            sdp_p->debug_str);
     }
 
     endptr = sdp_findchar(ptr, "\r\n");
     if (ptr == endptr) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No session name specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No session name specified.",
+            sdp_p->debug_str);
     }
     str_len = MIN(endptr - ptr, SDP_MAX_STRING_LEN);
     sstrncpy(sdp_p->sessname, ptr, str_len+1);
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parse session name, %s",
                   sdp_p->debug_str, sdp_p->sessname);
     }
     return (SDP_SUCCESS);
 }
 
 sdp_result_e sdp_build_sessname (sdp_t *sdp_p, u16 level, flex_string *fs)
 {
     if (sdp_p->sessname[0] == '\0') {
         if (sdp_p->conf_p->session_name_reqd == TRUE) {
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s No param defined for s= session name line, "
-                          "build failed.", sdp_p->debug_str);
-            }
+            CSFLogError(logTag, "%s No param defined for s= session name line, "
+                        "build failed.", sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         } else {
             /* s= line is not required. */
             return (SDP_SUCCESS);
         }
     }
 
@@ -305,43 +290,40 @@ sdp_result_e sdp_build_sessname (sdp_t *
 sdp_result_e sdp_parse_sessinfo (sdp_t *sdp_p, u16 level, const char *ptr)
 {
     char *endptr;
     sdp_mca_t *mca_p;
 
     if (level == SDP_SESSION_LEVEL) {
         if (sdp_p->sessinfo_found == TRUE) {
             sdp_p->conf_p->num_invalid_token_order++;
-            if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                SDP_WARN("%s Warning: More than one i= line specified.",
-                         sdp_p->debug_str);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Warning: More than one i= line specified.",
+                sdp_p->debug_str);
         }
         sdp_p->sessinfo_found = TRUE;
     } else {
         mca_p = sdp_find_media_level(sdp_p, level);
         if (mca_p == NULL) {
             return (SDP_FAILURE);
         }
         if (mca_p->sessinfo_found == TRUE) {
             sdp_p->conf_p->num_invalid_token_order++;
-            if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-                SDP_WARN("%s Warning: More than one i= line specified"
-                         " for media line %d.", sdp_p->debug_str, level);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Warning: More than one i= line specified"
+                " for media line %d.", sdp_p->debug_str, level);
         }
         mca_p->sessinfo_found = TRUE;
     }
 
     endptr = sdp_findchar(ptr, "\n");
     if (ptr == endptr) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No session info specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No session info specified.",
+            sdp_p->debug_str);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed session info line.", sdp_p->debug_str);
     }
     return (SDP_SUCCESS);
 }
 
@@ -352,28 +334,26 @@ sdp_result_e sdp_build_sessinfo (sdp_t *
 }
 
 sdp_result_e sdp_parse_uri (sdp_t *sdp_p, u16 level, const char *ptr)
 {
     char *endptr;
 
     if (sdp_p->uri_found == TRUE) {
         sdp_p->conf_p->num_invalid_token_order++;
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: More than one u= line specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: More than one u= line specified.",
+            sdp_p->debug_str);
     }
     sdp_p->uri_found = TRUE;
 
     endptr = sdp_findchar(ptr, "\n");
     if (ptr == endptr) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No URI info specified.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No URI info specified.", sdp_p->debug_str);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed URI line.", sdp_p->debug_str);
     }
     return (SDP_SUCCESS);
 }
 
@@ -384,19 +364,18 @@ sdp_result_e sdp_build_uri (sdp_t *sdp_p
 }
 
 sdp_result_e sdp_parse_email (sdp_t *sdp_p, u16 level, const char *ptr)
 {
     char *endptr;
 
     endptr = sdp_findchar(ptr, "\n");
     if (ptr == endptr) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No email info specified.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No email info specified.", sdp_p->debug_str);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parse email line", sdp_p->debug_str);
     }
     return (SDP_SUCCESS);
 }
 
@@ -407,20 +386,19 @@ sdp_result_e sdp_build_email (sdp_t *sdp
 }
 
 sdp_result_e sdp_parse_phonenum (sdp_t *sdp_p, u16 level, const char *ptr)
 {
     char *endptr;
 
     endptr = sdp_findchar(ptr, "\n");
     if (ptr == endptr) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No phone number info specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No phone number info specified.",
+            sdp_p->debug_str);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parse phone number line", sdp_p->debug_str);
     }
     return (SDP_SUCCESS);
 }
 
@@ -454,111 +432,104 @@ sdp_result_e sdp_parse_connection (sdp_t
     }
 
     /* See if the c= line is already defined at this level. We don't
      * currently support multihoming and so we only support one c= at
      * each level.
      */
     if (conn_p->nettype != SDP_NT_INVALID) {
         sdp_p->conf_p->num_invalid_token_order++;
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s c= line specified twice at same level, "
-                      "parse failed.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s c= line specified twice at same level, "
+            "parse failed.", sdp_p->debug_str);
         return (SDP_INVALID_TOKEN_ORDERING);
     }
 
     /* Find the connection network type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No connection network type specified for c=.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No connection network type specified for c=.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     conn_p->nettype = SDP_NT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_NETWORK_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_nettype[i].name,
                         sdp_nettype[i].strlen) == 0) {
             if (sdp_p->conf_p->nettype_supported[i] == TRUE) {
                 conn_p->nettype = (sdp_nettype_e)i;
             }
         }
     }
     if (conn_p->nettype == SDP_NT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Connection network type unsupported "
-                     "(%s) for c=.", sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Connection network type unsupported "
+            "(%s) for c=.", sdp_p->debug_str, tmp);
     }
 
     /* Find the connection address type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
         if (conn_p->nettype == SDP_NT_ATM) {
             /* If the nettype is ATM, addr type and addr are not reqd */
             if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
                 SDP_PRINT("%s Parse connection: network %s", sdp_p->debug_str,
                           sdp_get_network_name(conn_p->nettype));
             }
             return (SDP_SUCCESS);
         } else {
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s No connection address type specified for "
-                          "c=.", sdp_p->debug_str);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s No connection address type specified for "
+                "c=.", sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
     }
     conn_p->addrtype = SDP_AT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_ADDR_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_addrtype[i].name,
                         sdp_addrtype[i].strlen) == 0) {
             if (sdp_p->conf_p->addrtype_supported[i] == TRUE) {
                 conn_p->addrtype = (sdp_addrtype_e)i;
             }
         }
     }
     if (conn_p->addrtype == SDP_AT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Connection address type unsupported "
-                     "(%s) for c=.", sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Connection address type unsupported "
+            "(%s) for c=.", sdp_p->debug_str, tmp);
     }
 
     /* Find the connection address. */
     ptr = sdp_getnextstrtok(ptr, conn_p->conn_addr, sizeof(conn_p->conn_addr), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No connection address specified for c=.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No connection address specified for c=.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     /* We currently only support addrs containing '/'s for EPN addrs.
      * For other addrs this would indicate multicast addrs. */
     /* Multicast host group addresses are defined to be the IP addresses
      * whose high-order four bits are 1110, giving an address range from
      * 224.0.0.0 through 239.255.255.255
      */
     /* multicast addr check */
     sstrncpy (mcast_str, conn_p->conn_addr, MCAST_STRING_LEN);
 
     errno = 0;
     strtoul_result = strtoul(mcast_str, &strtoul_end, 10);
 
     if (errno || mcast_str == strtoul_end || strtoul_result > 255) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Error parsing address %s for mcast.",
-                      sdp_p->debug_str, mcast_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Error parsing address %s for mcast.",
+            sdp_p->debug_str, mcast_str);
         sdp_p->conf_p->num_invalid_param++;
         return SDP_INVALID_PARAMETER;
     }
 
 
     mcast_bits = (int) strtoul_result;
     if ((mcast_bits >= SDP_MIN_MCAST_ADDR_HI_BIT_VAL ) &&
         (mcast_bits <= SDP_MAX_MCAST_ADDR_HI_BIT_VAL)) {
@@ -571,32 +542,30 @@ sdp_result_e sdp_parse_connection (sdp_t
         slash_ptr = sdp_findchar(conn_p->conn_addr, "/");
         if (slash_ptr[0] != '\0') {
             if (conn_p->is_multicast) {
                 SDP_PRINT("%s A multicast address with slash %s",
                           sdp_p->debug_str, conn_p->conn_addr);
                 slash_ptr++;
                 slash_ptr = sdp_getnextstrtok(slash_ptr, tmp, sizeof(tmp), "/", &result);
                 if (result != SDP_SUCCESS) {
-                    if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                        SDP_ERROR("%s No ttl value specified for this multicast addr with a slash",
-                                 sdp_p->debug_str);
-                    }
+                    sdp_parse_error(sdp_p->peerconnection,
+                        "%s No ttl value specified for this multicast addr with a slash",
+                        sdp_p->debug_str);
                     sdp_p->conf_p->num_invalid_param++;
                     return (SDP_INVALID_PARAMETER);
                 }
 
                 errno = 0;
                 strtoul_result = strtoul(tmp, &strtoul_end, 10);
 
                 if (errno || tmp == strtoul_end || conn_p->ttl > SDP_MAX_TTL_VALUE) {
-                    if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                        SDP_ERROR("%s Invalid TTL: Value must be in the range 0-255 ",
-                                  sdp_p->debug_str);
-                    }
+                    sdp_parse_error(sdp_p->peerconnection,
+                        "%s Invalid TTL: Value must be in the range 0-255 ",
+                        sdp_p->debug_str);
                     sdp_p->conf_p->num_invalid_param++;
                     return (SDP_INVALID_PARAMETER);
                 }
 
                 conn_p->ttl = (int) strtoul_result;
 
                 /* search for num of addresses */
                 /*sa_ignore NO_NULL_CHK
@@ -608,20 +577,19 @@ sdp_result_e sdp_parse_connection (sdp_t
                     SDP_PRINT("%s Found a num addr field for multicast addr %s ",
                               sdp_p->debug_str,slash_ptr);
                     slash_ptr++;
 
                     errno = 0;
                     strtoul_result = strtoul(slash_ptr, &strtoul_end, 10);
 
                     if (errno || slash_ptr == strtoul_end || strtoul_result == 0) {
-		                if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                        SDP_ERROR("%s Invalid Num of addresses: Value must be > 0 ",
-                                  sdp_p->debug_str);
-                        }
+                        sdp_parse_error(sdp_p->peerconnection,
+                            "%s Invalid Num of addresses: Value must be > 0 ",
+                            sdp_p->debug_str);
                         sdp_p->conf_p->num_invalid_param++;
                         return SDP_INVALID_PARAMETER;
                     }
 
                     conn_p->num_of_addresses = (int) strtoul_result;
                 }
 	        } else {
                 sdp_p->conf_p->num_invalid_param++;
@@ -630,20 +598,19 @@ sdp_result_e sdp_parse_connection (sdp_t
                 return (SDP_INVALID_PARAMETER);
             }
         }
     }
 
     /* See if the address is the choose param and if it's allowed. */
     if ((sdp_p->conf_p->allow_choose[SDP_CHOOSE_CONN_ADDR] == FALSE) &&
         (strcmp(conn_p->conn_addr, "$") == 0)) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Choose parameter for connection "
-                     "address specified but not allowed.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Choose parameter for connection "
+            "address specified but not allowed.", sdp_p->debug_str);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parse connection: network %s, address type %s, "
                   "address %s ttl= %d num of addresses = %d",
                   sdp_p->debug_str,
                   sdp_get_network_name(conn_p->nettype),
                   sdp_get_address_name(conn_p->addrtype),
@@ -745,53 +712,49 @@ sdp_result_e sdp_parse_bandwidth (sdp_t 
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parse bandwidth line", sdp_p->debug_str);
     }
 
     /* Find the bw type (AS, CT or TIAS) */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), ":", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No bandwidth type specified for b= ",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No bandwidth type specified for b= ",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     for (i=0; i < SDP_MAX_BW_MODIFIER_VAL; i++) {
         if (cpr_strncasecmp(tmp, sdp_bw_modifier_val[i].name,
                         sdp_bw_modifier_val[i].strlen) == 0) {
             bw_modifier  = (sdp_bw_modifier_e)i;
             break;
         }
     }
 
     if (bw_modifier == SDP_BW_MODIFIER_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Error: BW Modifier type unsupported (%s).",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Error: BW Modifier type unsupported (%s).",
+            sdp_p->debug_str, tmp);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Find the BW type value */
     /*sa_ignore NO_NULL_CHK
       {ptr is valid since the pointer was checked earlier and the
        function would have exited if NULL.}*/
     if (*ptr == ':') {
         ptr++;
         bw_val = sdp_getnextnumtok(ptr, &ptr, " \t", &result);
         if ((result != SDP_SUCCESS)) {
-
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Error: No BW Value specified ",
-                          sdp_p->debug_str);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Error: No BW Value specified ",
+                sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
     }
 
     /*
      * Allocate a new sdp_bw_data_t instance and set it's values from the
      * input parameters.
@@ -887,38 +850,36 @@ sdp_result_e sdp_parse_timespec (sdp_t *
     if (result == SDP_SUCCESS) {
         /* Make sure the start_time is numeric, even though we store it as
          * a string.
          */
         (void)sdp_getnextnumtok(timespec_p->start_time,
                                 (const char **)&tmpptr, " \t", &result);
     }
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Invalid timespec start time specified.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Invalid timespec start time specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         SDP_FREE(timespec_p);
         return (SDP_INVALID_PARAMETER);
     }
 
     ptr = sdp_getnextstrtok(ptr, timespec_p->stop_time, sizeof(timespec_p->stop_time), " \t", &result);
     if (result == SDP_SUCCESS) {
         /* Make sure the start_time is numeric, even though we store it as
          * a string.
          */
         (void)sdp_getnextnumtok(timespec_p->stop_time,
                                 (const char **)&tmpptr, " \t", &result);
     }
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s Invalid timespec stop time specified.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Invalid timespec stop time specified.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         SDP_FREE(timespec_p);
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Link the new timespec in to the end of the list. */
     if (sdp_p->timespec_p == NULL) {
         sdp_p->timespec_p = timespec_p;
@@ -937,20 +898,18 @@ sdp_result_e sdp_parse_timespec (sdp_t *
 }
 
 sdp_result_e sdp_build_timespec (sdp_t *sdp_p, u16 level, flex_string *fs)
 {
     if ((sdp_p->timespec_p == NULL) ||
         (sdp_p->timespec_p->start_time == '\0') ||
         (sdp_p->timespec_p->stop_time == '\0')) {
         if (sdp_p->conf_p->timespec_reqd == TRUE) {
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Invalid params for t= time spec line, "
-                          "build failed.", sdp_p->debug_str);
-            }
+            CSFLogError(logTag, "%s Invalid params for t= time spec line, "
+                        "build failed.", sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         } else {
             /* t= line not required. */
             return (SDP_SUCCESS);
         }
     }
 
@@ -965,20 +924,19 @@ sdp_result_e sdp_build_timespec (sdp_t *
 }
 
 sdp_result_e sdp_parse_repeat_time (sdp_t *sdp_p, u16 level, const char *ptr)
 {
     char *endptr;
 
     endptr = sdp_findchar(ptr, "\n");
     if (ptr == endptr) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No repeat time parameters "
-                     "specified.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No repeat time parameters "
+            "specified.", sdp_p->debug_str);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed repeat time line", sdp_p->debug_str);
     }
     return (SDP_SUCCESS);
 }
 
@@ -989,20 +947,19 @@ sdp_result_e sdp_build_repeat_time (sdp_
 }
 
 sdp_result_e sdp_parse_timezone_adj (sdp_t *sdp_p, u16 level, const char *ptr)
 {
     char *endptr;
 
     endptr = sdp_findchar(ptr, "\n");
     if (ptr == endptr) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: No timezone parameters specified.",
-                     sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: No timezone parameters specified.",
+            sdp_p->debug_str);
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parse timezone adustment line", sdp_p->debug_str);
     }
     return (SDP_SUCCESS);
 }
 
@@ -1029,55 +986,52 @@ sdp_result_e sdp_parse_encryption (sdp_t
         }
         encrypt_p = &(mca_p->encrypt);
     }
     encrypt_p->encrypt_key[0] = '\0';
 
     /* Find the encryption type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), ":", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No encryption type specified for k=.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No encryption type specified for k=.",
+            sdp_p->debug_str);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     encrypt_p->encrypt_type = SDP_ENCRYPT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_ENCRYPT_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_encrypt[i].name,
                         sdp_encrypt[i].strlen) == 0) {
             encrypt_p->encrypt_type = (sdp_encrypt_type_e)i;
             break;
         }
     }
     if (encrypt_p->encrypt_type == SDP_ENCRYPT_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Encryption type unsupported (%s).",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Encryption type unsupported (%s).",
+            sdp_p->debug_str, tmp);
     }
 
     /* Find the encryption key. */
     encrypt_p->encrypt_key[0] = '\0';
     /*sa_ignore NO_NULL_CHK
       {ptr is valid since the pointer was checked earlier and the
        function would have exited if NULL.}*/
     if (*ptr == ':')
         ptr++;
     if (encrypt_p->encrypt_type != SDP_ENCRYPT_PROMPT) {
         ptr = sdp_getnextstrtok(ptr, encrypt_p->encrypt_key, sizeof(encrypt_p->encrypt_key), " \t", &result);
         if ((result != SDP_SUCCESS) &&
             ((encrypt_p->encrypt_type == SDP_ENCRYPT_CLEAR) ||
              (encrypt_p->encrypt_type == SDP_ENCRYPT_BASE64) ||
              (encrypt_p->encrypt_type == SDP_ENCRYPT_URI))) {
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                SDP_ERROR("%s Warning: No encryption key specified "
-                          "as required.", sdp_p->debug_str);
-            }
+            sdp_parse_error(sdp_p->peerconnection,
+                "%s Warning: No encryption key specified "
+                "as required.", sdp_p->debug_str);
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
     }
 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parse encryption type %s, key %s", sdp_p->debug_str,
                    sdp_get_encrypt_name(encrypt_p->encrypt_type),
@@ -1144,48 +1098,45 @@ sdp_result_e sdp_parse_media (sdp_t *sdp
     if (mca_p == NULL) {
         sdp_p->conf_p->num_no_resource++;
         return (SDP_NO_RESOURCE);
     }
 
     /* Find the media type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No media type specified, parse failed.",
-                      sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No media type specified, parse failed.",
+            sdp_p->debug_str);
         SDP_FREE(mca_p);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     mca_p->media = SDP_MEDIA_UNSUPPORTED;
     for (i=0; i < SDP_MAX_MEDIA_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_media[i].name,
                         sdp_media[i].strlen) == 0) {
             mca_p->media = (sdp_media_e)i;
         }
     }
     if (mca_p->media == SDP_MEDIA_UNSUPPORTED) {
-        if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
-            SDP_WARN("%s Warning: Media type unsupported (%s).",
-                     sdp_p->debug_str, tmp);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s Warning: Media type unsupported (%s).",
+            sdp_p->debug_str, tmp);
     }
 
     /* Find the port token parameters, but don't process it until
      * we determine the transport protocol as that determines what
      * port number formats are valid.
      */
     ptr = sdp_getnextstrtok(ptr, port, sizeof(port), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No port specified in m= media line, "
-                      "parse failed.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No port specified in m= media line, "
+            "parse failed.", sdp_p->debug_str);
         SDP_FREE(mca_p);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     port_ptr = port;
     for (i=0; i < SDP_MAX_PORT_PARAMS; i++) {
         if (sdp_getchoosetok(port_ptr, &port_ptr, "/ \t", &result) == TRUE) {
             num[i] = SDP_CHOOSE_PARAM;
@@ -1197,20 +1148,19 @@ sdp_result_e sdp_parse_media (sdp_t *sdp
             }
         }
         num_port_params++;
     }
 
     /* Find the transport protocol type. */
     ptr = sdp_getnextstrtok(ptr, tmp, sizeof(tmp), " \t", &result);
     if (result != SDP_SUCCESS) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            SDP_ERROR("%s No transport protocol type specified, "
-                      "parse failed.", sdp_p->debug_str);
-        }
+        sdp_parse_error(sdp_p->peerconnection,
+            "%s No transport protocol type specified, "
+            "parse failed.", sdp_p->debug_str);
         SDP_FREE(mca_p);
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
     mca_p->transport = SDP_TRANSPORT_UNSUPPORTED;
     for (i=0; i < SDP_MAX_TRANSPORT_TYPES; i++) {
         if (cpr_strncasecmp(tmp, sdp_transport[i].name,
                         sdp_