提交 17755cbd authored 作者: Kapil Gupta's avatar Kapil Gupta

adding t38 option code

上级 83e0d9c3
...@@ -727,6 +727,7 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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);
......
...@@ -113,6 +113,7 @@ static inline const char *mg_media_type2str(mg_media_type_t type) { ...@@ -113,6 +113,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) {
...@@ -121,6 +122,7 @@ static inline mg_media_type_t mg_media_type_parse(const char *str) { ...@@ -121,6 +122,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 {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论