{
switch_channel_t *channel = switch_core_session_get_channel(session);
mg_termination_t *term = switch_channel_get_private(channel, "_mg_term_");
- char digit[2] = { dtmf->digit };
+ //char digit[2] = { dtmf->digit };
if (!term) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find termination structure for session [%s]\n",
switch_core_session_get_uuid(session));
//switch_status_t mg_send_dtmf_notify(megaco_profile_t* mg_profile, const char* term_name, char* digits, int num_of_collected_digits);
//mg_send_dtmf_notify(term->profile, term->name, digit, 1);
- switch_log_printf("NOT Sending notify to MGC for dtmf: %c\n", dtmf->digit);
+ //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "MEGACO DTMF Signaling NOT Sending notify to MGC for dtmf:%c\n",dtmf->digit);
return SWITCH_STATUS_SUCCESS;
}
CmSdpAttrFmtp* f = &a->u.fmtp;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t CM_SDP_ATTR_FMTP: \n");
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Format Type = %d \n",(NOTPRSNT == f->type.pres)?f->type.val:-1);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Format Type = %d \n",(NOTPRSNT != f->type.pres)?f->type.val:-1);
break;
}
if(NOTPRSNT != r->pres.pres){
/* payload type */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Payload Type = %d \n",
- (NOTPRSNT != r->pay.type.pres)?r->pay.type.val:-1);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "\t Payload Type = %d \n",
+ (NOTPRSNT != r->pay.type.pres)?r->pay.type.val:-1);
/* payload value */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Payload Value = %d \n",
- (NOTPRSNT != r->pay.val.pres)?r->pay.val.val:-1);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "\t Payload Value = %d \n",
+ (NOTPRSNT != r->pay.val.pres)?r->pay.val.val:-1);
/* encoding name */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Encoding Name value = %d \n",
- (NOTPRSNT != r->enc.val.pres)?r->enc.val.val:-1);
-
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Encoding Name name = %s \n",
- (NOTPRSNT != r->enc.name.pres)?(char*)r->enc.name.val:"Not Present");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "\t Encoding Name value = %d \n",
+ (NOTPRSNT != r->enc.val.pres)?r->enc.val.val:-1);
+
+ if((NOTPRSNT != r->enc.val.pres ) &&
+ (CM_SDP_ENC_TELEPHONE_EVENT == r->enc.val.val)){
+
+ term->u.rtp.rfc2833_pt=r->pay.val.val;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ " Updating rfc2833_pt to [%d] \n", term->u.rtp.rfc2833_pt);
+ }
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "\t Encoding Name name = %s \n",
+ (NOTPRSNT != r->enc.name.pres)?
+ (char*)r->enc.name.val:"Not Present");
#ifdef BIT_64
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Clock Rate = %d \n",
- (NOTPRSNT != r->clk.pres)?r->clk.val:-1);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "\t Clock Rate = %d \n",
+ (NOTPRSNT != r->clk.pres)?r->clk.val:-1);
#else
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Clock Rate = %ld \n",
- (NOTPRSNT != r->clk.pres)?r->clk.val:-1);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "\t Clock Rate = %ld \n",
+ (NOTPRSNT != r->clk.pres)?r->clk.val:-1);
#endif
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Encoding Parameters = %s \n",
- (NOTPRSNT != r->parms.pres)?(char*)r->parms.val:"Not Present");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "\t Encoding Parameters = %s \n",
+ (NOTPRSNT != r->parms.pres)?
+ (char*)r->parms.val:"Not Present");
}
break;
}
/* see if received codec is present in our codec supported list */
for (id = 0; codecs[id] && id < codec_count; id++) {
int pt = codecs[id]->ianacode;
- switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Matching recv codec[%d] with supported codec[%d] \n", fmt->val.val, pt);
+ switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
+ "Matching recv codec[%d] with supported codec[%d] \n", fmt->val.val, pt);
//const char *name = codecs[id]->iananame;
+ /* anything > 96 is dymanic we should skip codec match */
+ if(fmt->val.val >= 96) {foundCodec = 0x01; break;}
if(pt == fmt->val.val){
foundCodec = 0x01;
break;