mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-09 01:06:00 +00:00
Merge branch 'nsg-4.3' of git.sangoma.com:smg_freeswitch into nsg-4.3
This commit is contained in:
commit
9c9330d7e2
@ -735,6 +735,8 @@ switch_status_t handle_term_status_cli_cmd(switch_stream_handle_t *stream, megac
|
|||||||
|
|
||||||
if(MG_TERM_RTP == term->type){
|
if(MG_TERM_RTP == term->type){
|
||||||
stream->write_function(stream, "RTP Termination ID [%d] \n",term->u.rtp.term_id);
|
stream->write_function(stream, "RTP Termination ID [%d] \n",term->u.rtp.term_id);
|
||||||
|
stream->write_function(stream, "RTP MEDIA Type [%s] \n",
|
||||||
|
( MGM_IMAGE == term->u.rtp.media_type)?"MGM_IMAGE":"MGM_AUDIO");
|
||||||
stream->write_function(stream, "RTP Termination Local Address[%s] \n",
|
stream->write_function(stream, "RTP Termination Local Address[%s] \n",
|
||||||
(NULL != term->u.rtp.local_addr)?term->u.rtp.local_addr:"NULL");
|
(NULL != term->u.rtp.local_addr)?term->u.rtp.local_addr:"NULL");
|
||||||
stream->write_function(stream, "RTP Termination Local Port[%d] \n",term->u.rtp.local_port);
|
stream->write_function(stream, "RTP Termination Local Port[%d] \n",term->u.rtp.local_port);
|
||||||
|
@ -727,6 +727,7 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mg_print_t38_attributes(term);
|
||||||
|
|
||||||
/* TODO - locally assigned SDP must be the part of termination...which we can use to fill responses*/
|
/* TODO - locally assigned SDP must be the part of termination...which we can use to fill responses*/
|
||||||
|
|
||||||
@ -793,6 +794,7 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|||||||
mg_fill_mgco_termid(out_termId, (char*)term->name, strlen((char*)term->name), &rsp.u.mgCmdRsp[0]->memCp);
|
mg_fill_mgco_termid(out_termId, (char*)term->name, strlen((char*)term->name), &rsp.u.mgCmdRsp[0]->memCp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(is_rtp){
|
||||||
/* Whatever Media descriptor we have received, we can copy that and then
|
/* Whatever Media descriptor we have received, we can copy that and then
|
||||||
* whatever we want we can modify the fields */
|
* whatever we want we can modify the fields */
|
||||||
/* Kapil - TODO - will see if there is any problem of coping the
|
/* Kapil - TODO - will see if there is any problem of coping the
|
||||||
@ -822,7 +824,6 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* only for RTP */
|
/* only for RTP */
|
||||||
if(is_rtp){
|
|
||||||
if(SWITCH_STATUS_FALSE == mg_build_sdp(&desc->u.media, inc_med_desc, mg_profile, term, &rsp.u.mgCmdRsp[0]->memCp)) {
|
if(SWITCH_STATUS_FALSE == mg_build_sdp(&desc->u.media, inc_med_desc, mg_profile, term, &rsp.u.mgCmdRsp[0]->memCp)) {
|
||||||
if(term->mg_error_code && (*term->mg_error_code == MGT_MGCP_RSP_CODE_INCONSISTENT_LCL_OPT)){
|
if(term->mg_error_code && (*term->mg_error_code == MGT_MGCP_RSP_CODE_INCONSISTENT_LCL_OPT)){
|
||||||
mg_util_set_err_string(&errTxt, " Unsupported Codec ");
|
mg_util_set_err_string(&errTxt, " Unsupported Codec ");
|
||||||
@ -1209,6 +1210,8 @@ switch_status_t handle_mg_modify_cmd(megaco_profile_t* mg_profile, MgMgcoCommand
|
|||||||
term->u.rtp.term_id);
|
term->u.rtp.term_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mg_print_t38_attributes(term);
|
||||||
|
|
||||||
|
|
||||||
/* SDP updated to termination */
|
/* SDP updated to termination */
|
||||||
megaco_activate_termination(term);
|
megaco_activate_termination(term);
|
||||||
|
@ -218,6 +218,7 @@ switch_status_t mg_send_ins_service_change(megaco_profile_t* mg_profile, const c
|
|||||||
switch_status_t mg_send_notify(megaco_profile_t* mg_profile, const char* term_name, MgMgcoObsEvt* oevt);
|
switch_status_t mg_send_notify(megaco_profile_t* mg_profile, const char* term_name, MgMgcoObsEvt* oevt);
|
||||||
switch_status_t mg_send_dtmf_notify(megaco_profile_t* mg_profile, const char* term_name, char* digits, int num_of_collected_digits);
|
switch_status_t mg_send_dtmf_notify(megaco_profile_t* mg_profile, const char* term_name, char* digits, int num_of_collected_digits);
|
||||||
switch_status_t mg_send_ito_notify(megaco_profile_t* mg_profile);
|
switch_status_t mg_send_ito_notify(megaco_profile_t* mg_profile);
|
||||||
|
void mg_print_t38_attributes(mg_termination_t* term);
|
||||||
switch_status_t mg_util_build_obs_evt_desc (MgMgcoObsEvt *obs_event, MgMgcoRequestId *request_id, MgMgcoObsEvtDesc **ptr_obs_desc);
|
switch_status_t mg_util_build_obs_evt_desc (MgMgcoObsEvt *obs_event, MgMgcoRequestId *request_id, MgMgcoObsEvtDesc **ptr_obs_desc);
|
||||||
void mg_print_time();
|
void mg_print_time();
|
||||||
switch_status_t mg_activate_ito_timer(megaco_profile_t* profile);
|
switch_status_t mg_activate_ito_timer(megaco_profile_t* profile);
|
||||||
|
@ -430,6 +430,56 @@ void mg_util_set_cmd_name_string (MgStr *errTxt, MgMgcoCommand *cmd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************************************************************/
|
||||||
|
void mgco_fill_t38_sdp_attr(CmSdpAttrSet *s, mg_termination_t* term, CmMemListCp *memCp)
|
||||||
|
{
|
||||||
|
int i=0x00;
|
||||||
|
|
||||||
|
if(!term->u.rtp.t38_options) return;
|
||||||
|
if (!s->numComp.pres) return ;
|
||||||
|
|
||||||
|
for (i = 0; i < s->numComp.val; i++) {
|
||||||
|
CmSdpAttr *a = s->attr[i];
|
||||||
|
if(NOTPRSNT == a->type.pres) continue;
|
||||||
|
|
||||||
|
switch(a->type.val)
|
||||||
|
{
|
||||||
|
case CM_SDP_ATTR_T38_FAX:
|
||||||
|
{
|
||||||
|
CmSdpAttrT38Fax* f = &a->u.fax;
|
||||||
|
if(NOTPRSNT == f->type.pres) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"CM_SDP_ATTR_T38_FAX: TYPE not present \n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* NOTE - Ideally i should not change ,whatever is coming we can return..due to
|
||||||
|
trillium issue forcefully coping the data...will remove once get trillium fix*/
|
||||||
|
if(f->type.val == CM_SDP_ATTR_T38_FAX_UNKNOWN) {
|
||||||
|
if((i==0) && term->u.rtp.t38_options->T38FaxRateManagement){
|
||||||
|
MG_SET_TKNSTROSXL((f->u.unknown.name),strlen("FaxRateManagement"),"FaxRateManagement", memCp);
|
||||||
|
MG_SET_TKNSTROSXL((f->u.unknown.val),
|
||||||
|
strlen(term->u.rtp.t38_options->T38FaxRateManagement),
|
||||||
|
term->u.rtp.t38_options->T38FaxRateManagement, memCp);
|
||||||
|
}
|
||||||
|
if((i==1) && term->u.rtp.t38_options->T38FaxUdpEC){
|
||||||
|
MG_SET_TKNSTROSXL((f->u.unknown.name),strlen("FaxUdpEC"),"FaxUdpEC", memCp);
|
||||||
|
MG_SET_TKNSTROSXL((f->u.unknown.val),
|
||||||
|
strlen(term->u.rtp.t38_options->T38FaxUdpEC),
|
||||||
|
term->u.rtp.t38_options->T38FaxUdpEC, memCp);
|
||||||
|
}
|
||||||
|
if((i==2)){
|
||||||
|
char buf[10] = {0};
|
||||||
|
sprintf(buf,"%d",term->u.rtp.t38_options->T38MaxBitRate);
|
||||||
|
MG_SET_TKNSTROSXL((f->u.unknown.name),strlen("MaxBitRate"),"MaxBitRate", memCp);
|
||||||
|
MG_SET_TKNSTROSXL((f->u.unknown.val),
|
||||||
|
strlen(buf), buf, memCp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/*****************************************************************************************************************************/
|
/*****************************************************************************************************************************/
|
||||||
void mgco_handle_sdp_attr_set(CmSdpAttrSet *s, mg_termination_t* term)
|
void mgco_handle_sdp_attr_set(CmSdpAttrSet *s, mg_termination_t* term)
|
||||||
{
|
{
|
||||||
@ -755,6 +805,44 @@ void mgco_handle_sdp_attr_set(CmSdpAttrSet *s, mg_termination_t* term)
|
|||||||
}
|
}
|
||||||
case CM_SDP_ATTR_T38_FAX:
|
case CM_SDP_ATTR_T38_FAX:
|
||||||
{
|
{
|
||||||
|
CmSdpAttrT38Fax* f = &a->u.fax;
|
||||||
|
if(NOTPRSNT == f->type.pres) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"CM_SDP_ATTR_T38_FAX: TYPE not present \n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t CM_SDP_ATTR_T38_FAX: type=%d\n", f->type.val);
|
||||||
|
|
||||||
|
if(f->type.val == CM_SDP_ATTR_T38_FAX_UNKNOWN) {
|
||||||
|
if(f->u.unknown.name.pres){
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"T38: Attribute : name[len=%d, value=%s] \n",
|
||||||
|
f->u.unknown.name.len,(char*)f->u.unknown.name.val);
|
||||||
|
}
|
||||||
|
if(f->u.unknown.val.pres){
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"T38: Attribute : value[len=%d, value=%s] \n",
|
||||||
|
f->u.unknown.val.len,(char*)f->u.unknown.val.val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* filling default values */
|
||||||
|
if(NULL == term->u.rtp.t38_options){
|
||||||
|
term->u.rtp.t38_options =
|
||||||
|
switch_core_alloc(term->pool, sizeof *term->u.rtp.t38_options);
|
||||||
|
}
|
||||||
|
term->u.rtp.t38_options->T38FaxVersion = 0x01;
|
||||||
|
term->u.rtp.t38_options->T38MaxBitRate = 14400;
|
||||||
|
term->u.rtp.t38_options->T38FaxRateManagement =
|
||||||
|
switch_core_strdup(term->pool,"transferredTCF") ;
|
||||||
|
//term->u.rtp.t38_options->T38FaxMaxBuffer = ;
|
||||||
|
//term->u.rtp.t38_options->T38FaxMaxDatagram = ;
|
||||||
|
term->u.rtp.t38_options->T38FaxUdpEC =
|
||||||
|
switch_core_strdup(term->pool,"t38UDPRedundancy") ;
|
||||||
|
//term->u.rtp.t38_options->T38VendorInfo =
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -765,8 +853,6 @@ void mgco_handle_sdp_attr_set(CmSdpAttrSet *s, mg_termination_t* term)
|
|||||||
}else{
|
}else{
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "a-line not present \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "a-line not present \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mgco_handle_sdp_c_line(CmSdpConn *s, mg_termination_t* term, mgco_sdp_types_e sdp_type)
|
void mgco_handle_sdp_c_line(CmSdpConn *s, mg_termination_t* term, mgco_sdp_types_e sdp_type)
|
||||||
@ -852,7 +938,8 @@ void mgco_handle_sdp_media_param(CmSdpMedPar *s, mg_termination_t* term, mgco_sd
|
|||||||
CmSdpMedProtoFmts *a = s->pflst[i];
|
CmSdpMedProtoFmts *a = s->pflst[i];
|
||||||
|
|
||||||
/*Prot*/
|
/*Prot*/
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, " Proto Type = %d \n", (NOTPRSNT != a->prot.type.pres)?a->prot.type.val:-1);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
" Proto Type = %d \n", (NOTPRSNT != a->prot.type.pres)?a->prot.type.val:-1);
|
||||||
switch(a->prot.type.val)
|
switch(a->prot.type.val)
|
||||||
{
|
{
|
||||||
case CM_SDP_MEDIA_PROTO_UNKNOWN:
|
case CM_SDP_MEDIA_PROTO_UNKNOWN:
|
||||||
@ -867,6 +954,12 @@ void mgco_handle_sdp_media_param(CmSdpMedPar *s, mg_termination_t* term, mgco_sd
|
|||||||
(NOTPRSNT != a->prot.u.subtype.type.pres)?a->prot.u.subtype.type.val: -1);
|
(NOTPRSNT != a->prot.u.subtype.type.pres)?a->prot.u.subtype.type.val: -1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case CM_SDP_MEDIA_PROTO_UDPTL:
|
||||||
|
{
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
" Proto Type T38 -UDPTL , subtype = %d \n",
|
||||||
|
(NOTPRSNT != a->prot.u.subtype.type.pres)?a->prot.u.subtype.type.val: -1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*repeated from "prot" field */
|
/*repeated from "prot" field */
|
||||||
@ -879,9 +972,11 @@ void mgco_handle_sdp_media_param(CmSdpMedPar *s, mg_termination_t* term, mgco_sd
|
|||||||
{
|
{
|
||||||
CmSdpMedFmtRtpList* r = &a->u.rtp;
|
CmSdpMedFmtRtpList* r = &a->u.rtp;
|
||||||
int i = 0x00;
|
int i = 0x00;
|
||||||
|
term->u.rtp.media_type = MGM_AUDIO;
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, " CM_SDP_MEDIA_PROTO_RTP: \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, " CM_SDP_MEDIA_PROTO_RTP: \n");
|
||||||
if(NOTPRSNT != r->num.pres){
|
if(NOTPRSNT != r->num.pres){
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, " Number of Formats[%d] \n", r->num.val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
" Number of Formats[%d] \n", r->num.val);
|
||||||
|
|
||||||
for(i=0;i<r->num.val;i++){
|
for(i=0;i<r->num.val;i++){
|
||||||
mgco_print_CmSdpU8OrNil(r->fmts[i]);
|
mgco_print_CmSdpU8OrNil(r->fmts[i]);
|
||||||
@ -961,10 +1056,33 @@ void mgco_handle_sdp_media_param(CmSdpMedPar *s, mg_termination_t* term, mgco_sd
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case CM_SDP_UDPTL_FMT_T38:
|
case CM_SDP_MEDIA_PROTO_UDPTL:
|
||||||
{
|
{
|
||||||
/*CmSdpMedFmtUdptlList* t = &a->u.t38;*/
|
CmSdpMedFmtUdptlList* t = &a->u.t38;
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, " CM_SDP_UDPTL_FMT_T38: \n");
|
int i = 0;
|
||||||
|
|
||||||
|
if(NOTPRSNT == t->num.pres) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
|
||||||
|
" CM_SDP_MEDIA_PROTO_UDPTL: no format defines..\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
term->u.rtp.media_type = MGM_IMAGE;
|
||||||
|
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
" CM_SDP_MEDIA_PROTO_UDPTL: formats[%d]\n", t->num.val);
|
||||||
|
|
||||||
|
for(i=0; i< t->num.val;i++)
|
||||||
|
{
|
||||||
|
CmSdpT38Fmt* f = t->fmts[i];
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
" f->knownFmt.pres=%d, f->knownFmt.val=%d\n",
|
||||||
|
f->knownFmt.pres,f->knownFmt.val);
|
||||||
|
if(f->unknownFmt.pres){
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"f->unknownFmt.val[%s]\n",f->unknownFmt.val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -985,7 +1103,8 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
|
|
||||||
if (sdp->numComp.pres == NOTPRSNT) {
|
if (sdp->numComp.pres == NOTPRSNT) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
" No %s SDP present \n", (MG_SDP_LOCAL== sdp_type)?"MG_SDP_LOCAL":"MG_SDP_REMOTE");
|
" No %s SDP present \n",
|
||||||
|
(MG_SDP_LOCAL== sdp_type)?"MG_SDP_LOCAL":"MG_SDP_REMOTE");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1000,38 +1119,52 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
/************************************************************************************************************************/
|
/************************************************************************************************************************/
|
||||||
/* Version */
|
/* Version */
|
||||||
if(NOTPRSNT != s->ver.pres) {
|
if(NOTPRSNT != s->ver.pres) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, " SDP Version = %d \n", s->ver.val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
" SDP Version = %d \n", s->ver.val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************************************************/
|
/************************************************************************************************************************/
|
||||||
/* Orig */
|
/* Orig */
|
||||||
if(NOTPRSNT != s->orig.pres.pres) {
|
if(NOTPRSNT != s->orig.pres.pres) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "********** SDP orig line ****** \n \t Type = %d \n", s->orig.type.val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"********** SDP orig line ****** \n \t Type = %d \n",
|
||||||
|
s->orig.type.val);
|
||||||
|
|
||||||
if(NOTPRSNT != s->orig.orig.pres.pres) {
|
if(NOTPRSNT != s->orig.orig.pres.pres) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t User Name = %s \n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t User Name = %s \n",
|
||||||
(NOTPRSNT != s->orig.orig.usrName.pres)?(char*)s->orig.orig.usrName.val:"Not Present");
|
(NOTPRSNT != s->orig.orig.usrName.pres)?
|
||||||
|
(char*)s->orig.orig.usrName.val:"Not Present");
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Session Id = %s \n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
(NOTPRSNT != s->orig.orig.sessId.pres)?(char*)s->orig.orig.sessId.val:"Not Present");
|
"\t Session Id = %s \n",
|
||||||
|
(NOTPRSNT != s->orig.orig.sessId.pres)?
|
||||||
|
(char*)s->orig.orig.sessId.val:"Not Present");
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Session Version = %s \n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
(NOTPRSNT != s->orig.orig.sessVer.pres)?(char*)s->orig.orig.sessVer.val:"Not Present");
|
"\t Session Version = %s \n",
|
||||||
|
(NOTPRSNT != s->orig.orig.sessVer.pres)?
|
||||||
|
(char*)s->orig.orig.sessVer.val:"Not Present");
|
||||||
|
|
||||||
/* sdpAddr */
|
/* sdpAddr */
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Net Type = %d \n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Net Type = %d \n",
|
||||||
(NOTPRSNT != s->orig.orig.sdpAddr.netType.type.pres)?s->orig.orig.sdpAddr.netType.type.val:-1);
|
(NOTPRSNT != s->orig.orig.sdpAddr.netType.type.pres)?
|
||||||
|
s->orig.orig.sdpAddr.netType.type.val:-1);
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Address Type = %d \n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
(NOTPRSNT != s->orig.orig.sdpAddr.addrType.pres)?s->orig.orig.sdpAddr.addrType.val:-1);
|
"\t Address Type = %d \n",
|
||||||
|
(NOTPRSNT != s->orig.orig.sdpAddr.addrType.pres)
|
||||||
|
?s->orig.orig.sdpAddr.addrType.val:-1);
|
||||||
|
|
||||||
/* print IPV4 address */
|
/* print IPV4 address */
|
||||||
if (s->orig.orig.sdpAddr.addrType.pres && s->orig.orig.sdpAddr.addrType.val == CM_SDP_ADDR_TYPE_IPV4 &&
|
if (s->orig.orig.sdpAddr.addrType.pres &&
|
||||||
|
s->orig.orig.sdpAddr.addrType.val == CM_SDP_ADDR_TYPE_IPV4 &&
|
||||||
s->orig.orig.sdpAddr.netType.type.val == CM_SDP_NET_TYPE_IN &&
|
s->orig.orig.sdpAddr.netType.type.val == CM_SDP_NET_TYPE_IN &&
|
||||||
s->orig.orig.sdpAddr.u.ip4.addrType.val == CM_SDP_IPV4_IP_UNI) {
|
s->orig.orig.sdpAddr.u.ip4.addrType.val == CM_SDP_IPV4_IP_UNI)
|
||||||
|
{
|
||||||
|
|
||||||
if (s->orig.orig.sdpAddr.u.ip4.addrType.pres) {
|
if (s->orig.orig.sdpAddr.u.ip4.addrType.pres) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Address: %d.%d.%d.%d\n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"Address: %d.%d.%d.%d\n",
|
||||||
s->orig.orig.sdpAddr.u.ip4.u.ip.b[0].val,
|
s->orig.orig.sdpAddr.u.ip4.u.ip.b[0].val,
|
||||||
s->orig.orig.sdpAddr.u.ip4.u.ip.b[1].val,
|
s->orig.orig.sdpAddr.u.ip4.u.ip.b[1].val,
|
||||||
s->orig.orig.sdpAddr.u.ip4.u.ip.b[2].val,
|
s->orig.orig.sdpAddr.u.ip4.u.ip.b[2].val,
|
||||||
@ -1039,7 +1172,8 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t O-line not present \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t O-line not present \n");
|
||||||
}
|
}
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "********** ****** \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "********** ****** \n");
|
||||||
}
|
}
|
||||||
@ -1050,7 +1184,8 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
/* Session Name (s = line) */
|
/* Session Name (s = line) */
|
||||||
|
|
||||||
if(NOTPRSNT != s->sessName.pres) {
|
if(NOTPRSNT != s->sessName.pres) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Session Name = %s \n", s->sessName.val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t Session Name = %s \n", s->sessName.val);
|
||||||
} else{
|
} else{
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t s-line not present \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t s-line not present \n");
|
||||||
}
|
}
|
||||||
@ -1059,18 +1194,22 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
/* Session Info(i= line) */
|
/* Session Info(i= line) */
|
||||||
|
|
||||||
if(NOTPRSNT != s->info.pres) {
|
if(NOTPRSNT != s->info.pres) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Session Info = %s \n", s->info.val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t Session Info = %s \n", s->info.val);
|
||||||
} else{
|
} else{
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t i-line not present \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t i-line not present \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************************************************/
|
/************************************************************************************************************************/
|
||||||
/* Session Uri */
|
/* Session Uri */
|
||||||
|
|
||||||
if(NOTPRSNT != s->uri.pres) {
|
if(NOTPRSNT != s->uri.pres) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Session Uri = %s \n", s->uri.val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t Session Uri = %s \n", s->uri.val);
|
||||||
} else{
|
} else{
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t uri not present \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t uri not present \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************************************************/
|
/************************************************************************************************************************/
|
||||||
@ -1098,26 +1237,34 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
if(NOTPRSNT != s->sdpTime.pres.pres) {
|
if(NOTPRSNT != s->sdpTime.pres.pres) {
|
||||||
if(NOTPRSNT != s->sdpTime.sdpOpTimeSet.numComp.pres) {
|
if(NOTPRSNT != s->sdpTime.sdpOpTimeSet.numComp.pres) {
|
||||||
int i = 0x00;
|
int i = 0x00;
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SDP op time present with total component[%d]\n", s->sdpTime.sdpOpTimeSet.numComp.val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"SDP op time present with total component[%d]\n",
|
||||||
|
s->sdpTime.sdpOpTimeSet.numComp.val);
|
||||||
for (i = 0;i<s->sdpTime.sdpOpTimeSet.numComp.val;i++){
|
for (i = 0;i<s->sdpTime.sdpOpTimeSet.numComp.val;i++){
|
||||||
CmSdpOpTime* t = s->sdpTime.sdpOpTimeSet.sdpOpTime[i];
|
CmSdpOpTime* t = s->sdpTime.sdpOpTimeSet.sdpOpTime[i];
|
||||||
if(NOTPRSNT == t->pres.pres) continue;
|
if(NOTPRSNT == t->pres.pres) continue;
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Start Time = %s \n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
(NOTPRSNT != t->startTime.pres)?(char*)t->startTime.val:"Not Present");
|
"\t Start Time = %s \n",
|
||||||
|
(NOTPRSNT != t->startTime.pres)?
|
||||||
|
(char*)t->startTime.val:"Not Present");
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Stop Time = %s \n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
(NOTPRSNT != t->stopTime.pres)?(char*)t->stopTime.val:"Not Present");
|
"\t Stop Time = %s \n",
|
||||||
|
(NOTPRSNT != t->stopTime.pres)?
|
||||||
|
(char*)t->stopTime.val:"Not Present");
|
||||||
|
|
||||||
/*repeat time repFieldSet */
|
/*repeat time repFieldSet */
|
||||||
|
|
||||||
if(NOTPRSNT != t->repFieldSet.numComp.pres) {
|
if(NOTPRSNT != t->repFieldSet.numComp.pres) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SDP repeat time present with total component[%d]\n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"SDP repeat time present with total component[%d]\n",
|
||||||
t->repFieldSet.numComp.val);
|
t->repFieldSet.numComp.val);
|
||||||
|
|
||||||
/*TODO - print repeat fields */
|
/*TODO - print repeat fields */
|
||||||
}else{
|
}else{
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SDP repeat time not present \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"SDP repeat time not present \n");
|
||||||
}
|
}
|
||||||
} /* sdpOpTimeSet.numComp for loop -- end */
|
} /* sdpOpTimeSet.numComp for loop -- end */
|
||||||
}else{/*sdpOpTimeSet.numComp.pres if -- end */
|
}else{/*sdpOpTimeSet.numComp.pres if -- end */
|
||||||
@ -1139,7 +1286,8 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
(NOTPRSNT != s->keyType.keyType.pres)?s->keyType.keyType.val:-1);
|
(NOTPRSNT != s->keyType.keyType.pres)?s->keyType.keyType.val:-1);
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Key Data = %s \n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Key Data = %s \n",
|
||||||
(NOTPRSNT != s->keyType.key_data.pres)?(char*)s->keyType.key_data.val:"Not Present");
|
(NOTPRSNT != s->keyType.key_data.pres)?
|
||||||
|
(char*)s->keyType.key_data.val:"Not Present");
|
||||||
}else{
|
}else{
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "k-line not present \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "k-line not present \n");
|
||||||
}
|
}
|
||||||
@ -1153,7 +1301,9 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
/* Media Descriptor Set */
|
/* Media Descriptor Set */
|
||||||
|
|
||||||
if (s->mediaDescSet.numComp.pres) {
|
if (s->mediaDescSet.numComp.pres) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "****** Media Descriptor Set present with numComp[%d]\n", s->mediaDescSet.numComp.val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"****** Media Descriptor Set present with numComp[%d]\n",
|
||||||
|
s->mediaDescSet.numComp.val);
|
||||||
for (mediaId = 0; mediaId < s->mediaDescSet.numComp.val; mediaId++) {
|
for (mediaId = 0; mediaId < s->mediaDescSet.numComp.val; mediaId++) {
|
||||||
CmSdpMediaDesc *desc = s->mediaDescSet.mediaDesc[mediaId];
|
CmSdpMediaDesc *desc = s->mediaDescSet.mediaDesc[mediaId];
|
||||||
|
|
||||||
@ -1162,11 +1312,17 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
/* Media Field */
|
/* Media Field */
|
||||||
{
|
{
|
||||||
CmSdpMediaField* f = &desc->field;
|
CmSdpMediaField* f = &desc->field;
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Media Type = %d \n",(NOTPRSNT != f->mediaType.pres)?f->mediaType.val:-1);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Media = %s \n",(NOTPRSNT != f->media.pres)?(char*)f->media.val:"Not Present");
|
"\t Media Type = %d \n",
|
||||||
|
(NOTPRSNT != f->mediaType.pres)?f->mediaType.val:-1);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t Media = %s \n",(NOTPRSNT != f->media.pres)?
|
||||||
|
(char*)f->media.val:"Not Present");
|
||||||
|
|
||||||
/* Channel ID */
|
/* Channel ID */
|
||||||
if(NOTPRSNT != f->id.type.pres){
|
if(NOTPRSNT != f->id.type.pres){
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t VcId Type = %d \n", f->id.type.val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t VcId Type = %d \n", f->id.type.val);
|
||||||
switch(f->id.type.val){
|
switch(f->id.type.val){
|
||||||
case CM_SDP_VCID_PORT:
|
case CM_SDP_VCID_PORT:
|
||||||
{
|
{
|
||||||
@ -1208,7 +1364,8 @@ void mgco_handle_incoming_sdp(CmSdpInfoSet *sdp, mg_termination_t* term, mgco_sd
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*info */
|
/*info */
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\t Info = %s \n",(NOTPRSNT != desc->info.pres)?(char*)desc->info.val:"Not Present");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
|
"\t Info = %s \n",(NOTPRSNT != desc->info.pres)?(char*)desc->info.val:"Not Present");
|
||||||
|
|
||||||
/*connection set */
|
/*connection set */
|
||||||
{
|
{
|
||||||
@ -2042,7 +2199,8 @@ switch_status_t mg_build_sdp(MgMgcoMediaDesc* out, MgMgcoMediaDesc* inc, megaco_
|
|||||||
/* check for codec */
|
/* check for codec */
|
||||||
if((NOTPRSNT == media->field.par.numProtFmts.pres) ||
|
if((NOTPRSNT == media->field.par.numProtFmts.pres) ||
|
||||||
(0 == media->field.par.numProtFmts.val)){
|
(0 == media->field.par.numProtFmts.val)){
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR,"No codec specified in incoming local descriptor \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR,
|
||||||
|
"No codec specified in incoming local descriptor \n");
|
||||||
mg_add_supported_media_codec(media, mg_profile, term, memCp );
|
mg_add_supported_media_codec(media, mg_profile, term, memCp );
|
||||||
}else{
|
}else{
|
||||||
/* check for media format/codec */
|
/* check for media format/codec */
|
||||||
@ -2055,18 +2213,16 @@ switch_status_t mg_build_sdp(MgMgcoMediaDesc* out, MgMgcoMediaDesc* inc, megaco_
|
|||||||
&&(0 != format->u.rtp.num.val))
|
&&(0 != format->u.rtp.num.val))
|
||||||
{
|
{
|
||||||
/* If the codec type is CHOOSE then we need to fill our list */
|
/* If the codec type is CHOOSE then we need to fill our list */
|
||||||
for(i = 0; i < format->u.rtp.num.val; i++)
|
for(i = 0; i < format->u.rtp.num.val; i++) {
|
||||||
{
|
|
||||||
fmt = format->u.rtp.fmts[i];
|
fmt = format->u.rtp.fmts[i];
|
||||||
|
|
||||||
if((NOTPRSNT == fmt->type.pres) || (NOTPRSNT == fmt->val.pres)) continue;
|
if((NOTPRSNT == fmt->type.pres) || (NOTPRSNT == fmt->val.pres)) continue;
|
||||||
|
|
||||||
if(CM_SDP_CHOOSE == fmt->type.val){
|
if(CM_SDP_CHOOSE == fmt->type.val){
|
||||||
choose_codec = 0x1;
|
choose_codec = 0x1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(choose_codec){
|
if(choose_codec){
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "CHOOSE codec is requested fill out supported codecs \n");
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
|
||||||
|
"CHOOSE codec is requested fill out supported codecs \n");
|
||||||
|
|
||||||
/* delete existing rtp format list..TODO find better way */
|
/* delete existing rtp format list..TODO find better way */
|
||||||
for(i = 0; i < format->u.rtp.num.val; i++)
|
for(i = 0; i < format->u.rtp.num.val; i++)
|
||||||
@ -2075,12 +2231,19 @@ switch_status_t mg_build_sdp(MgMgcoMediaDesc* out, MgMgcoMediaDesc* inc, megaco_
|
|||||||
}
|
}
|
||||||
/* If the codec type is CHOOSE then we need to fill our list */
|
/* If the codec type is CHOOSE then we need to fill our list */
|
||||||
mg_add_supported_media_codec(media, mg_profile, term, memCp);
|
mg_add_supported_media_codec(media, mg_profile, term, memCp);
|
||||||
}
|
} else if (!choose_codec &&
|
||||||
else if (!choose_codec && (SWITCH_STATUS_FALSE == mg_rem_unsupported_codecs(mg_profile, term , &format->u.rtp, &media->attrSet, memCp)))
|
(SWITCH_STATUS_FALSE ==
|
||||||
|
mg_rem_unsupported_codecs(mg_profile, term , &format->u.rtp, &media->attrSet, memCp)))
|
||||||
{
|
{
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else if ((NOTPRSNT != format->protType.pres) &&
|
||||||
|
(CM_SDP_MEDIA_PROTO_UDPTL == format->protType.val)){
|
||||||
|
/* ideally whatever is received we can send back *
|
||||||
|
* due to issue in trillium , we need to manually copy the fields now */
|
||||||
|
mgco_fill_t38_sdp_attr(&media->attrSet, term, memCp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2089,9 +2252,41 @@ switch_status_t mg_build_sdp(MgMgcoMediaDesc* out, MgMgcoMediaDesc* inc, megaco_
|
|||||||
/**********************************************************************************************************************************/
|
/**********************************************************************************************************************************/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
/*****************************************************************************************************************************/
|
/*****************************************************************************************************************************/
|
||||||
|
void mg_print_t38_attributes(mg_termination_t* term)
|
||||||
|
{
|
||||||
|
switch_assert(term);
|
||||||
|
|
||||||
|
if((MG_TERM_RTP == term->type) && (term->u.rtp.t38_options)){
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
|
||||||
|
"switch_t38_options_t for termination[%s]\n", term->name);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38FaxVersion[%d]\n",
|
||||||
|
term->u.rtp.t38_options->T38FaxVersion);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38MaxBitRate[%d]\n",
|
||||||
|
term->u.rtp.t38_options->T38MaxBitRate);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38FaxFillBitRemoval[%d]\n",
|
||||||
|
term->u.rtp.t38_options->T38FaxFillBitRemoval);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38FaxTranscodingMMR[%d]\n",
|
||||||
|
term->u.rtp.t38_options->T38FaxTranscodingMMR);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38FaxTranscodingJBIG[%d]\n",
|
||||||
|
term->u.rtp.t38_options->T38FaxTranscodingJBIG);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38FaxRateManagement[%s]\n",
|
||||||
|
(NULL != term->u.rtp.t38_options->T38FaxRateManagement)?
|
||||||
|
term->u.rtp.t38_options->T38FaxRateManagement:"NULL");
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38FaxMaxBuffer[%d]\n",
|
||||||
|
term->u.rtp.t38_options->T38FaxMaxBuffer);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38FaxMaxDatagram[%d]\n",
|
||||||
|
term->u.rtp.t38_options->T38FaxMaxDatagram);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38FaxUdpEC[%s]\n",
|
||||||
|
(NULL != term->u.rtp.t38_options->T38FaxUdpEC)?
|
||||||
|
term->u.rtp.t38_options->T38FaxUdpEC:"NULL");
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,"T38VendorInfo[%s]\n",
|
||||||
|
(NULL != term->u.rtp.t38_options->T38VendorInfo)?
|
||||||
|
term->u.rtp.t38_options->T38VendorInfo:"NULL");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -115,6 +115,7 @@ static inline const char *mg_media_type2str(mg_media_type_t type) {
|
|||||||
case MGM_INVALID:
|
case MGM_INVALID:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline mg_media_type_t mg_media_type_parse(const char *str) {
|
static inline mg_media_type_t mg_media_type_parse(const char *str) {
|
||||||
@ -123,6 +124,7 @@ static inline mg_media_type_t mg_media_type_parse(const char *str) {
|
|||||||
} else if (!strcasecmp(str, "image")) {
|
} else if (!strcasecmp(str, "image")) {
|
||||||
return MGM_IMAGE;
|
return MGM_IMAGE;
|
||||||
}
|
}
|
||||||
|
return MGM_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mg_context_s {
|
struct mg_context_s {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user