update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3385 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
594ccf8bb8
commit
9415cdcacb
|
@ -1 +1 @@
|
||||||
Wed Nov 15 20:20:53 UTC 2006
|
Thu Nov 16 16:09:31 UTC 2006
|
||||||
|
|
|
@ -250,7 +250,7 @@ ldl_status ldl_session_destroy(ldl_session_t **session_p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, char *id, char *them, char *me)
|
ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, char *id, char *them, char *me, ldl_user_flag_t flags)
|
||||||
{
|
{
|
||||||
ldl_session_t *session = NULL;
|
ldl_session_t *session = NULL;
|
||||||
|
|
||||||
|
@ -264,9 +264,9 @@ ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, c
|
||||||
session->id = apr_pstrdup(session->pool, id);
|
session->id = apr_pstrdup(session->pool, id);
|
||||||
session->them = apr_pstrdup(session->pool, them);
|
session->them = apr_pstrdup(session->pool, them);
|
||||||
|
|
||||||
if (me) {
|
|
||||||
session->initiator = apr_pstrdup(session->pool, me);
|
session->initiator = apr_pstrdup(session->pool, (flags & LDL_FLAG_OUTBOUND) ? me : them);
|
||||||
}
|
|
||||||
|
|
||||||
if (ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
|
if (ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
|
||||||
session->login = apr_pstrdup(session->pool, me);
|
session->login = apr_pstrdup(session->pool, me);
|
||||||
|
@ -298,7 +298,7 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
|
||||||
char *msg = NULL;
|
char *msg = NULL;
|
||||||
|
|
||||||
if (!(session = apr_hash_get(handle->sessions, id, APR_HASH_KEY_STRING))) {
|
if (!(session = apr_hash_get(handle->sessions, id, APR_HASH_KEY_STRING))) {
|
||||||
ldl_session_create(&session, handle, id, from, to);
|
ldl_session_create(&session, handle, id, from, to, LDL_FLAG_NONE);
|
||||||
if (!session) {
|
if (!session) {
|
||||||
return LDL_STATUS_MEMERR;
|
return LDL_STATUS_MEMERR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,10 +110,12 @@ typedef enum {
|
||||||
} ldl_flag_t;
|
} ldl_flag_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
LDL_FLAG_NONE = 0,
|
||||||
LDL_FLAG_TLS = (1 << 10),
|
LDL_FLAG_TLS = (1 << 10),
|
||||||
LDL_FLAG_SASL_PLAIN = (1 << 11),
|
LDL_FLAG_SASL_PLAIN = (1 << 11),
|
||||||
LDL_FLAG_SASL_MD5 = (1 << 12),
|
LDL_FLAG_SASL_MD5 = (1 << 12),
|
||||||
LDL_FLAG_COMPONENT = (1 << 13),
|
LDL_FLAG_COMPONENT = (1 << 13),
|
||||||
|
LDL_FLAG_OUTBOUND = (1 << 14)
|
||||||
} ldl_user_flag_t;
|
} ldl_user_flag_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -253,9 +255,10 @@ void ldl_session_set_value(ldl_session_t *session, char *key, char *val);
|
||||||
\param id the id to use for the session
|
\param id the id to use for the session
|
||||||
\param them the id of the other end of the call
|
\param them the id of the other end of the call
|
||||||
\param me the id of our end of the call
|
\param me the id of our end of the call
|
||||||
|
\param flags user flags
|
||||||
\return SUCCESS OR FAILURE
|
\return SUCCESS OR FAILURE
|
||||||
*/
|
*/
|
||||||
ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, char *id, char *them, char *me);
|
ldl_status ldl_session_create(ldl_session_t **session_p, ldl_handle_t *handle, char *id, char *them, char *me, ldl_user_flag_t flags);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief get the id of a session
|
\brief get the id of a session
|
||||||
|
|
|
@ -1565,7 +1565,7 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
|
||||||
switch_stun_random_string(sess_id, 10, "0123456789");
|
switch_stun_random_string(sess_id, 10, "0123456789");
|
||||||
tech_pvt->us = switch_core_session_strdup(session, user);
|
tech_pvt->us = switch_core_session_strdup(session, user);
|
||||||
tech_pvt->them = switch_core_session_strdup(session, full_id);
|
tech_pvt->them = switch_core_session_strdup(session, full_id);
|
||||||
ldl_session_create(&dlsession, mdl_profile->handle, sess_id, full_id, user);
|
ldl_session_create(&dlsession, mdl_profile->handle, sess_id, full_id, user, LDL_FLAG_OUTBOUND);
|
||||||
tech_pvt->profile = mdl_profile;
|
tech_pvt->profile = mdl_profile;
|
||||||
ldl_session_set_private(dlsession, *new_session);
|
ldl_session_set_private(dlsession, *new_session);
|
||||||
//ldl_session_set_value(dlsession, "dnis", dnis);
|
//ldl_session_set_value(dlsession, "dnis", dnis);
|
||||||
|
|
Loading…
Reference in New Issue