提交 b6737e31 authored 作者: kapil's avatar kapil

adding command handler to handle command indication from megaco stack

上级 e3eed73e
......@@ -945,6 +945,8 @@ int mgco_mg_ssap_config(megaco_profile_t* profile)
return SWITCH_STATUS_FALSE;
}
pCfg->chEnabled = 0x01;
pCfg->userInfo.pres.pres = PRSNT_NODEF;
pCfg->userInfo.id.pres = NOTPRSNT;
pCfg->userInfo.mid.pres = PRSNT_NODEF;
......
......@@ -62,4 +62,12 @@ switch_status_t sng_mgco_init(sng_mg_event_interface_t* event);
switch_status_t sng_mgco_stack_shutdown(void);
int sng_mgco_mg_get_status(int elemId, MgMngmt* cfm, megaco_profile_t* mg_cfg, mg_peer_profile_t* mg_peer);
/****************************************************************************************************************/
/* MG Stack defines */
/* Free Commands inside MG CH command */
#define mg_free_cmd(_cmd) mgFreeEventMem(_cmd)
/****************************************************************************************************************/
#endif /* _MEGACO_STACK_H_ */
......@@ -27,6 +27,7 @@ switch_status_t config_profile(megaco_profile_t *profile, switch_bool_t reload)
char *var, *val;
mg_peer_profile_t* peer_profile = NULL;
switch_xml_config_item_t *instructions1 = NULL;
switch_memory_pool_t *pool;
if (!(xml = switch_xml_open_cfg(file, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not open %s\n", file);
......@@ -86,8 +87,9 @@ switch_status_t config_profile(megaco_profile_t *profile, switch_bool_t reload)
peer_profile = NULL;
if (!strcmp(name, profile->peer_list[idx])) {
/* peer profile */
peer_profile = switch_core_alloc(profile->pool, sizeof(*peer_profile));
peer_profile->pool = profile->pool;
switch_core_new_memory_pool(&pool);
peer_profile = switch_core_alloc(pool, sizeof(*peer_profile));
peer_profile->pool = pool;
peer_profile->name = switch_core_strdup(peer_profile->pool, name);
switch_thread_rwlock_create(&peer_profile->rwlock, peer_profile->pool);
instructions1 = (peer_profile ? get_peer_instructions(peer_profile) : NULL);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论