add some methods to CoreSession

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8352 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-05-10 17:02:43 +00:00
parent 0e6bb5f606
commit a5e10ebcb9
10 changed files with 403 additions and 86 deletions
+27
View File
@@ -382,11 +382,38 @@ SWITCH_DECLARE_CONSTRUCTOR CoreSession::~CoreSession()
switch_core_session_rwunlock(session);
}
switch_safe_free(xml_cdr_text);
switch_safe_free(uuid);
switch_safe_free(tts_name);
switch_safe_free(voice_name);
}
SWITCH_DECLARE(char *) CoreSession::getXMLCDR()
{
switch_xml_t cdr;
sanity_check("");
switch_safe_free(xml_cdr_text);
if (switch_ivr_generate_xml_cdr(session, &cdr) == SWITCH_STATUS_SUCCESS) {
xml_cdr_text = switch_xml_toxml(cdr, SWITCH_FALSE);
switch_xml_free(cdr);
}
return (char *) (xml_cdr_text ? xml_cdr_text : "");
}
SWITCH_DECLARE(void) CoreSession::setEventData(Event *e)
{
sanity_check_noreturn;
if (channel && e->event) {
switch_channel_event_set_data(channel, e->event);
}
}
SWITCH_DECLARE(int) CoreSession::answer()
{
switch_status_t status;