mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-05 02:34:18 +00:00
we always have the seesion in the app function
This commit is contained in:
parent
9bf98d0dd3
commit
7508481597
@ -1682,7 +1682,7 @@ SWITCH_STANDARD_APP(lcr_app_function)
|
|||||||
switch_caller_profile_t *caller_profile = NULL;
|
switch_caller_profile_t *caller_profile = NULL;
|
||||||
callback_t routes = { 0 };
|
callback_t routes = { 0 };
|
||||||
lcr_route cur_route = { 0 };
|
lcr_route cur_route = { 0 };
|
||||||
switch_memory_pool_t *pool;
|
switch_memory_pool_t *pool = switch_core_session_get_pool(session);
|
||||||
switch_event_t *event;
|
switch_event_t *event;
|
||||||
const char *intra = NULL;
|
const char *intra = NULL;
|
||||||
const char *lrn = NULL;
|
const char *lrn = NULL;
|
||||||
@ -1691,18 +1691,9 @@ SWITCH_STANDARD_APP(lcr_app_function)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session) {
|
routes.session = session;
|
||||||
pool = switch_core_session_get_pool(session);
|
|
||||||
routes.session = session;
|
|
||||||
} else {
|
|
||||||
switch_core_new_memory_pool(&pool);
|
|
||||||
switch_event_create(&event, SWITCH_EVENT_MESSAGE);
|
|
||||||
routes.event = event;
|
|
||||||
}
|
|
||||||
|
|
||||||
routes.pool = pool;
|
routes.pool = pool;
|
||||||
|
|
||||||
|
|
||||||
lrn = switch_channel_get_variable(channel, "lrn");
|
lrn = switch_channel_get_variable(channel, "lrn");
|
||||||
routes.lrn_number = (char *) lrn;
|
routes.lrn_number = (char *) lrn;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user