/** Save private data in session private data, and save session in hash tabel, under GetToken() key */
/** Save private data in session private data, and save session in hash tabel, under GetToken() key */
switch_core_session_set_private(session,static_cast<void*>(tech_pvt));///save private data in session context
switch_core_session_set_private(session,static_cast<void*>(tech_pvt));///save private data in session context
switch_core_hash_insert_locked(m_pSessionsHashTable,*(connection.GetToken()),static_cast<void*>(session));///save pointer to session in hash table, for later retreival
/***Mark incoming call as AnsweredPending ??? */
/** Before adding this session to sessions hash table,
* lock he mutex so no concurrent
* callback can be runing for this connection
* probably other callbacks are called from this task
* but carfulness wont bite
*/
switch_mutex_lock(tech_pvt->m_mutex);
/** insert connection to hash table */
switch_core_hash_insert_locked(m_pSessionsHashTable,*(connection.GetToken()),static_cast<void*>(session));///save pointer to session in hash table, for later retreival