mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-05 03:41:53 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user