matt code changes
This commit is contained in:
parent
c347689465
commit
53543aa72d
|
@ -374,6 +374,7 @@ void megaco_termination_destroy(mg_termination_t *term)
|
|||
term->active_events = NULL;
|
||||
}
|
||||
|
||||
|
||||
switch_clear_flag(term, MGT_ALLOCATED);
|
||||
switch_clear_flag(term, MGT_ACTIVE);
|
||||
|
||||
|
@ -427,7 +428,7 @@ switch_status_t megaco_context_add_termination(mg_context_t *ctx, mg_termination
|
|||
if (zstr(ctx->terminations[1]->uuid)) {
|
||||
megaco_activate_termination(ctx->terminations[1]);
|
||||
}
|
||||
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Bridging: %s (%s) <> %s (%s)\n",
|
||||
ctx->terminations[0]->name, ctx->terminations[0]->uuid,
|
||||
ctx->terminations[1]->name, ctx->terminations[1]->uuid);
|
||||
|
|
|
@ -2879,8 +2879,14 @@ switch_status_t mg_send_notify(megaco_profile_t* mg_profile, const char* term_n
|
|||
request.transId.val = get_txn_id();
|
||||
|
||||
request.contextId.type.pres = PRSNT_NODEF;
|
||||
request.contextId.type.val = MGT_CXTID_NULL;
|
||||
|
||||
if(term->context){
|
||||
printf("Temrination is in context, adding context-id[%d]\n",term->context->context_id);
|
||||
request.contextId.type.val = MGT_CXTID_OTHER;
|
||||
request.contextId.val.pres = PRSNT_NODEF;
|
||||
request.contextId.val.val = term->context->context_id;
|
||||
} else{
|
||||
request.contextId.type.val = MGT_CXTID_NULL;
|
||||
}
|
||||
request.cmdStatus.pres = PRSNT_NODEF;
|
||||
request.cmdStatus.val = CH_CMD_STATUS_END_OF_TXN;
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
rate,
|
||||
ptime,
|
||||
1,
|
||||
/*SWITCH_CODEC_FLAG_ENCODE |*/ SWITCH_CODEC_FLAG_DECODE,
|
||||
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
|
||||
NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
|
||||
goto fail;
|
||||
|
@ -231,7 +231,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
rate,
|
||||
ptime,
|
||||
1,
|
||||
SWITCH_CODEC_FLAG_ENCODE /*| SWITCH_CODEC_FLAG_DECODE*/,
|
||||
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
|
||||
NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in New Issue