Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
December 2007
- 13 participants
- 565 discussions
[commit] r6923 - freeswitch/trunk/src/mod/dialplans/mod_dialplan_asterisk
by Freeswitch SVN 20 Dec '07
by Freeswitch SVN 20 Dec '07
20 Dec '07
Author: anthm
Date: Thu Dec 20 18:25:45 2007
New Revision: 6923
Modified:
freeswitch/trunk/src/mod/dialplans/mod_dialplan_asterisk/mod_dialplan_asterisk.c
Log:
tweak
Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_asterisk/mod_dialplan_asterisk.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_asterisk/mod_dialplan_asterisk.c (original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_asterisk/mod_dialplan_asterisk.c Thu Dec 20 18:25:45 2007
@@ -160,7 +160,7 @@
caller_profile = switch_channel_get_caller_profile(channel);
}
- if (caller_profile) {
+ if (caller_profile && !switch_strlen_zero(caller_profile->destination_number)) {
context = caller_profile->context ? caller_profile->context : "default";
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Obtaining Profile!\n");
1
0
20 Dec '07
Author: brian
Date: Thu Dec 20 17:49:04 2007
New Revision: 6922
Modified:
freeswitch/trunk/conf/dialplan/default.xml
freeswitch/trunk/conf/directory/default.xml
Log:
adding more tweaks to default config
Modified: freeswitch/trunk/conf/dialplan/default.xml
==============================================================================
--- freeswitch/trunk/conf/dialplan/default.xml (original)
+++ freeswitch/trunk/conf/dialplan/default.xml Thu Dec 20 17:49:04 2007
@@ -91,7 +91,7 @@
<action application="set" data="sip_h_Call-Info=<sip:$${local_ip_v4}>;answer-after=0"/>
<action application="set" data="sip_auto_answer=true"/>
<action application="set" data="export_vars=sip_h_Call-Info,sip_auto_answer"/>
- <action application="bridge" data="USER/${dialed_ext}@$${domain}"/>
+ <action application="bridge" data="user/${dialed_ext}@$${domain}"/>
</condition>
</extension>
@@ -111,14 +111,14 @@
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="voicemail" data="check default $${domain} ${dialed_ext}"/>
- <anti-action application="ring_ready"/>
- <anti-action application="set" data="call_timeout=130"/>
+ <anti-action application="set" data="transfer_ringback=${us-ring}"/>
+ <anti-action application="set" data="call_timeout=30"/>
<anti-action application="set" data="hangup_after_bridge=true"/>
<anti-action application="set" data="left_hanging_extension=5900"/>
<anti-action application="set" data="continue_on_fail=true"/>
<anti-action application="db" data="insert/call_return/${dialed_ext}/${caller_id_number}"/>
<anti-action application="db" data="insert/last_dial_ext/${dialed_ext}/${uuid}"/>
- <anti-action application="bridge" data="{left_hanging_extension=5900,transfer_fallback_extension=${dialed_ext}}USER/${dialed_ext}@$${domain}"/>
+ <anti-action application="bridge" data="user/${dialed_ext}@$${domain}"/>
<anti-action application="answer"/>
<anti-action application="sleep" data="1000"/>
<anti-action application="voicemail" data="default $${domain} ${dialed_ext}"/>
Modified: freeswitch/trunk/conf/directory/default.xml
==============================================================================
--- freeswitch/trunk/conf/directory/default.xml (original)
+++ freeswitch/trunk/conf/directory/default.xml Thu Dec 20 17:49:04 2007
@@ -2,7 +2,7 @@
<!--the domain or ip (the right hand side of the @ in the addr-->
<domain name="$${domain}">
<params>
- <param name="dial-string" value="sofia/${dialed_domain}/${dialed_user}"/>
+ <param name="dial-string" value="{left_hanging_extension=5900,transfer_fallback_extension=${dialed_user}}sofia/${dialed_domain}/${dialed_user}"/>
</params>
<X-PRE-PROCESS cmd="include" data="default/*.xml"/>
1
0
Author: anthm
Date: Thu Dec 20 16:42:00 2007
New Revision: 6921
Modified:
freeswitch/trunk/src/include/switch_channel.h
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/include/switch_core_event_hook.h
freeswitch/trunk/src/include/switch_ivr.h
freeswitch/trunk/src/include/switch_module_interfaces.h
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
freeswitch/trunk/src/mod/dialplans/mod_dialplan_asterisk/mod_dialplan_asterisk.c
freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_core_session.c
freeswitch/trunk/src/switch_cpp.cpp
freeswitch/trunk/src/switch_ivr_originate.c
freeswitch/trunk/src/switch_swig.c
Log:
fix FSCORE-74
Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h (original)
+++ freeswitch/trunk/src/include/switch_channel.h Thu Dec 20 16:42:00 2007
@@ -210,6 +210,8 @@
*/
SWITCH_DECLARE(switch_status_t) switch_channel_set_variable(switch_channel_t *channel, const char *varname, const char *value);
+SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_partner(switch_channel_t *channel, const char *varname, const char *value);
+
/*!
\brief Retrieve a variable from a given channel
\param channel channel to retrieve variable from
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Thu Dec 20 16:42:00 2007
@@ -698,12 +698,15 @@
\param caller_profile the originator's caller profile
\param new_session a NULL pointer to aim at the newly created session
\param pool optional existing memory pool to donate to the session
+ \paeam flags flags to use
\return the cause code of the attempted call
*/
SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
char *endpoint_name,
switch_caller_profile_t *caller_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_core_session_t **new_session,
+ switch_memory_pool_t **pool,
+ switch_originate_flag_t flags);
/*!
\brief Receive a message on a given session
Modified: freeswitch/trunk/src/include/switch_core_event_hook.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core_event_hook.h (original)
+++ freeswitch/trunk/src/include/switch_core_event_hook.h Thu Dec 20 16:42:00 2007
@@ -48,7 +48,8 @@
typedef struct switch_io_event_hook_send_dtmf switch_io_event_hook_send_dtmf_t;
typedef struct switch_io_event_hook_recv_dtmf switch_io_event_hook_recv_dtmf_t;
typedef struct switch_io_event_hook_state_change switch_io_event_hook_state_change_t;
-typedef switch_status_t (*switch_outgoing_channel_hook_t) (switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t *);
+typedef switch_status_t (*switch_outgoing_channel_hook_t)
+(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t *, switch_originate_flag_t);
typedef switch_status_t (*switch_receive_message_hook_t) (switch_core_session_t *, switch_core_session_message_t *);
typedef switch_status_t (*switch_receive_event_hook_t) (switch_core_session_t *, switch_event_t *);
typedef switch_status_t (*switch_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Thu Dec 20 16:42:00 2007
@@ -355,6 +355,7 @@
\param cid_name_override override the caller id name
\param cid_num_override override the caller id number
\param caller_profile_override override the entire calling caller profile
+ \param flags flags to pass
\return SWITCH_STATUS_SUCCESS if bleg is a running session.
\note bleg will be read locked which must be unlocked with switch_core_session_rwunlock() before losing scope
*/
@@ -364,7 +365,10 @@
const char *bridgeto,
uint32_t timelimit_sec,
const switch_state_handler_table_t *table,
- const char *cid_name_override, const char *cid_num_override, switch_caller_profile_t *caller_profile_override);
+ const char *cid_name_override,
+ const char *cid_num_override,
+ switch_caller_profile_t *caller_profile_override,
+ switch_originate_flag_t flags);
/*!
\brief Bridge Audio from one session to another
Modified: freeswitch/trunk/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/trunk/src/include/switch_module_interfaces.h (original)
+++ freeswitch/trunk/src/include/switch_module_interfaces.h Thu Dec 20 16:42:00 2007
@@ -98,8 +98,8 @@
struct switch_io_event_hooks;
-typedef switch_call_cause_t
-(*switch_io_outgoing_channel_t)(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t **);
+typedef switch_call_cause_t (*switch_io_outgoing_channel_t)
+(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t **, switch_originate_flag_t);
typedef switch_status_t (*switch_io_read_frame_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_io_write_frame_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_io_kill_channel_t) (switch_core_session_t *, int);
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Thu Dec 20 16:42:00 2007
@@ -137,6 +137,12 @@
typedef uint8_t switch_byte_t;
typedef enum {
+ SOF_NONE = 0,
+ SOF_NOBLOCK = (1 << 0),
+ SOF_FORKED_DIAL = (1 << 1)
+} switch_originate_flag_t;
+
+typedef enum {
SPF_NONE = 0,
SPF_ODD = (1 << 0),
SPF_EVEN = (1 << 1)
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Thu Dec 20 16:42:00 2007
@@ -1432,7 +1432,7 @@
timeout = atoi(argv[6]);
}
- if (switch_ivr_originate(NULL, &caller_session, &cause, aleg, timeout, NULL, cid_name, cid_num, NULL) != SWITCH_STATUS_SUCCESS) {
+ if (switch_ivr_originate(NULL, &caller_session, &cause, aleg, timeout, NULL, cid_name, cid_num, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
if (machine) {
stream->write_function(stream, "-ERR %s\n", switch_channel_cause2str(cause));
} else {
Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Thu Dec 20 16:42:00 2007
@@ -3630,7 +3630,7 @@
if (conference == NULL) {
char *dialstr = switch_mprintf("{ignore_early_media=true}%s", bridgeto);
- status = switch_ivr_originate(NULL, &peer_session, cause, dialstr, 60, NULL, cid_name, cid_num, NULL);
+ status = switch_ivr_originate(NULL, &peer_session, cause, dialstr, 60, NULL, cid_name, cid_num, NULL, SOF_NONE);
switch_safe_free(dialstr);
if (status != SWITCH_STATUS_SUCCESS) {
@@ -3667,7 +3667,7 @@
/* establish an outbound call leg */
if (switch_ivr_originate(session,
&peer_session, cause, bridgeto, timeout, &audio_bridge_peer_state_handlers, cid_name, cid_num,
- NULL) != SWITCH_STATUS_SUCCESS) {
+ NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot create outgoing channel, cause: %s\n", switch_channel_cause2str(*cause));
if (caller_channel) {
switch_channel_hangup(caller_channel, *cause);
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Thu Dec 20 16:42:00 2007
@@ -1374,7 +1374,7 @@
}
}
- if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
+ if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Originate Failed. Cause: %s\n", switch_channel_cause2str(cause));
/* no answer is *always* a reason to continue */
@@ -1449,19 +1449,23 @@
switch_endpoint_interface_t *user_endpoint_interface;
static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_core_session_t **new_session,
+ switch_memory_pool_t **pool,
+ switch_originate_flag_t flags);
switch_io_routines_t user_io_routines = {
/*.outgoing_channel */ user_outgoing_channel
};
static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_core_session_t **new_session,
+ switch_memory_pool_t **pool,
+ switch_originate_flag_t flags)
{
switch_xml_t x_domain = NULL, xml = NULL, x_user = NULL, x_param, x_params;
char *user = NULL, *domain = NULL;
const char *dest = NULL;
- static switch_call_cause_t cause;
+ static switch_call_cause_t cause = SWITCH_CAUSE_SUCCESS;
unsigned int timelimit = 60;
switch_channel_t *new_channel = NULL;
@@ -1472,7 +1476,7 @@
}
*domain++ = '\0';
-
+
if (switch_xml_locate_user("id", user, domain, NULL, &xml, &x_domain, &x_user, "as_channel=true") != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "can't find user [%s@%s]\n", user, domain);
goto done;
@@ -1510,7 +1514,8 @@
const char *var;
char *d_dest = NULL;
switch_channel_t *channel;
-
+ switch_originate_flag_t myflags = SOF_NONE;
+
channel = switch_core_session_get_channel(session);
if ((var = switch_channel_get_variable(channel, "call_timeout"))) {
timelimit = atoi(var);
@@ -1521,7 +1526,11 @@
d_dest = switch_channel_expand_variables(channel, dest);
- if (switch_ivr_originate(session, new_session, &cause, d_dest, timelimit, NULL, NULL, NULL, NULL) == SWITCH_STATUS_SUCCESS) {
+ if ((flags & SOF_FORKED_DIAL)) {
+ myflags |= SOF_NOBLOCK;
+ }
+
+ if (switch_ivr_originate(session, new_session, &cause, d_dest, timelimit, NULL, NULL, NULL, NULL, myflags) == SWITCH_STATUS_SUCCESS) {
const char *context;
switch_caller_profile_t *cp;
Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_asterisk/mod_dialplan_asterisk.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_asterisk/mod_dialplan_asterisk.c (original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_asterisk/mod_dialplan_asterisk.c Thu Dec 20 16:42:00 2007
@@ -312,15 +312,19 @@
/* fake chan_sip */
switch_endpoint_interface_t *sip_endpoint_interface;
static switch_call_cause_t sip_outgoing_channel(switch_core_session_t *session,
- switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session,
+ switch_memory_pool_t **pool,
+ switch_originate_flag_t flags);
switch_io_routines_t sip_io_routines = {
/*.outgoing_channel */ sip_outgoing_channel
};
static switch_call_cause_t sip_outgoing_channel(switch_core_session_t *session,
- switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session,
+ switch_memory_pool_t **pool,
+ switch_originate_flag_t flags)
{
const char *profile;
@@ -334,7 +338,7 @@
}
outbound_profile->destination_number = switch_core_sprintf(outbound_profile->pool, "%s/%s", profile, outbound_profile->destination_number);
- return switch_core_session_outgoing_channel(session, "sofia", outbound_profile, new_session, pool);
+ return switch_core_session_outgoing_channel(session, "sofia", outbound_profile, new_session, pool, SOF_NONE);
}
@@ -343,17 +347,21 @@
/* fake chan_iax2 */
switch_endpoint_interface_t *iax2_endpoint_interface;
static switch_call_cause_t iax2_outgoing_channel(switch_core_session_t *session,
- switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session,
+ switch_memory_pool_t **pool,
+ switch_originate_flag_t flags);
switch_io_routines_t iax2_io_routines = {
/*.outgoing_channel */ iax2_outgoing_channel
};
static switch_call_cause_t iax2_outgoing_channel(switch_core_session_t *session,
- switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session,
+ switch_memory_pool_t **pool,
+ switch_originate_flag_t flags)
{
- return switch_core_session_outgoing_channel(session, "iax", outbound_profile, new_session, pool);
+ return switch_core_session_outgoing_channel(session, "iax", outbound_profile, new_session, pool, SOF_NONE);
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c Thu Dec 20 16:42:00 2007
@@ -148,7 +148,7 @@
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
@@ -778,7 +778,7 @@
*/
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Thu Dec 20 16:42:00 2007
@@ -206,7 +206,7 @@
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
@@ -1616,7 +1616,7 @@
*/
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(dingaling_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c Thu Dec 20 16:42:00 2007
@@ -421,7 +421,7 @@
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
@@ -789,7 +789,7 @@
*/
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(iax_endpoint_interface, pool)) != 0) {
private_t *tech_pvt;
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Thu Dec 20 16:42:00 2007
@@ -145,7 +145,7 @@
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
@@ -741,7 +741,7 @@
*/
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(portaudio_endpoint_interface, pool)) != 0) {
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Thu Dec 20 16:42:00 2007
@@ -56,7 +56,7 @@
static switch_status_t sofia_on_transmit(switch_core_session_t *session);
static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session,
- switch_memory_pool_t **pool);
+ switch_memory_pool_t **pool, switch_originate_flag_t flags);
static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t sofia_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t sofia_read_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
@@ -1490,7 +1490,7 @@
static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session,
- switch_memory_pool_t **pool)
+ switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
switch_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
switch_core_session_t *nsession;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Thu Dec 20 16:42:00 2007
@@ -1827,7 +1827,8 @@
switch_channel_set_variable(channel, SOFIA_REPLACES_HEADER, rep);
if (switch_ivr_originate(a_session,
- &tsession, &cause, exten, timeout, &noop_state_handler, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
+ &tsession, &cause, exten, timeout, &noop_state_handler, NULL, NULL, NULL, SOF_NONE)
+ != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel! [%s]\n", exten);
nua_notify(tech_pvt->nh, NUTAG_NEWSUB(1), SIPTAG_CONTENT_TYPE_STR("message/sipfrag"),
NUTAG_SUBSTATE(nua_substate_terminated),
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Thu Dec 20 16:42:00 2007
@@ -467,7 +467,7 @@
static switch_status_t wanpipe_on_loopback(switch_core_session_t *session);
static switch_status_t wanpipe_on_transmit(switch_core_session_t *session);
static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags);
static switch_status_t wanpipe_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t wanpipe_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
@@ -1003,7 +1003,7 @@
};
static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
char *bchan = NULL;
char name[128] = "";
Modified: freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c Thu Dec 20 16:42:00 2007
@@ -175,7 +175,7 @@
static switch_status_t woomera_on_transmit(switch_core_session_t *session);
static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool);
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags);
static switch_status_t woomera_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t woomera_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t woomera_kill_channel(switch_core_session_t *session, int sig);
@@ -482,7 +482,7 @@
*/
static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(woomera_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Thu Dec 20 16:42:00 2007
@@ -2709,7 +2709,8 @@
caller_profile = switch_caller_profile_new(pool,username, dialplan, cid_name, cid_num, network_addr,
ani, aniii, rdnis, modname, context, dest);
- if (switch_ivr_originate(session, &peer_session, &jss->cause, dest, to ? atoi(to) : 60, NULL, NULL, NULL, caller_profile) != SWITCH_STATUS_SUCCESS) {
+ if (switch_ivr_originate(session, &peer_session, &jss->cause, dest, to ? atoi(to) : 60, NULL, NULL, NULL, caller_profile, SOF_NONE)
+ != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot Create Outgoing Channel! [%s]\n", dest);
goto done;
}
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Thu Dec 20 16:42:00 2007
@@ -434,6 +434,34 @@
return SWITCH_STATUS_FALSE;
}
+
+SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_partner(switch_channel_t *channel, const char *varname, const char *value)
+{
+ const char *uuid;
+ switch_assert(channel != NULL);
+
+ if (!switch_strlen_zero(varname)) {
+ if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
+ switch_core_session_t *session;
+ switch_mutex_lock(channel->profile_mutex);
+ if ((session = switch_core_session_locate(uuid))) {
+ switch_channel_t *tchannel = switch_core_session_get_channel(session);
+ switch_mutex_lock(tchannel->profile_mutex);
+ switch_event_del_header(tchannel->variables, varname);
+ if (value) {
+ switch_event_add_header(tchannel->variables, SWITCH_STACK_BOTTOM, varname, "%s", value);
+ }
+ switch_mutex_unlock(tchannel->profile_mutex);
+ switch_core_session_rwunlock(session);
+ }
+ switch_mutex_unlock(channel->profile_mutex);
+ return SWITCH_STATUS_SUCCESS;
+ }
+ }
+
+ return SWITCH_STATUS_FALSE;
+}
+
SWITCH_DECLARE(int) switch_channel_test_flag(switch_channel_t *channel, switch_channel_flag_t flags)
{
switch_assert(channel != NULL);
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Thu Dec 20 16:42:00 2007
@@ -176,7 +176,9 @@
SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
char *endpoint_name,
switch_caller_profile_t *caller_profile,
- switch_core_session_t **new_session, switch_memory_pool_t **pool)
+ switch_core_session_t **new_session,
+ switch_memory_pool_t **pool,
+ switch_originate_flag_t flags)
{
switch_io_event_hook_outgoing_channel_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
@@ -215,13 +217,13 @@
}
}
- if ((cause = endpoint_interface->io_routines->outgoing_channel(session, outgoing_profile, new_session, pool)) != SWITCH_CAUSE_SUCCESS) {
+ if ((cause = endpoint_interface->io_routines->outgoing_channel(session, outgoing_profile, new_session, pool, flags)) != SWITCH_CAUSE_SUCCESS) {
return cause;
}
if (session) {
for (ptr = session->event_hooks.outgoing_channel; ptr; ptr = ptr->next) {
- if ((status = ptr->outgoing_channel(session, caller_profile, *new_session)) != SWITCH_STATUS_SUCCESS) {
+ if ((status = ptr->outgoing_channel(session, caller_profile, *new_session, flags)) != SWITCH_STATUS_SUCCESS) {
break;
}
}
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Thu Dec 20 16:42:00 2007
@@ -341,7 +341,8 @@
NULL,
NULL,
NULL,
- &caller_profile) != SWITCH_STATUS_SUCCESS) {
+ &caller_profile,
+ SOF_NONE) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Error Creating Outgoing Channel! [%s]\n", dest);
goto failed;
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Thu Dec 20 16:42:00 2007
@@ -240,8 +240,12 @@
const char *bridgeto,
uint32_t timelimit_sec,
const switch_state_handler_table_t *table,
- const char *cid_name_override, const char *cid_num_override, switch_caller_profile_t *caller_profile_override)
+ const char *cid_name_override,
+ const char *cid_num_override,
+ switch_caller_profile_t *caller_profile_override,
+ switch_originate_flag_t flags)
{
+ switch_originate_flag_t myflags = SOF_NONE;
char *pipe_names[MAX_PEERS] = { 0 };
char *data = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS;
@@ -392,7 +396,16 @@
if (caller_channel) { /* ringback is only useful when there is an originator */
- ringback_data = switch_channel_get_variable(caller_channel, "ringback");
+ ringback_data = NULL;
+
+ if (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA)) {
+ ringback_data = switch_channel_get_variable(caller_channel, "transfer_ringback");
+ }
+
+ if (!ringback_data) {
+ ringback_data = switch_channel_get_variable(caller_channel, "ringback");
+ }
+
switch_channel_set_variable(caller_channel, "originate_disposition", "failure");
}
@@ -454,6 +467,11 @@
switch_assert(loop_data);
or_argc = switch_separate_string(loop_data, '|', pipe_names, (sizeof(pipe_names) / sizeof(pipe_names[0])));
+ if ((flags & SOF_NOBLOCK) && or_argc > 1) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Only calling the first element in the list in this mode.\n");
+ or_argc = 1;
+ }
+
if (caller_channel && or_argc > 1 && !ringback_data) {
switch_channel_ring_ready(caller_channel);
sent_ring = 1;
@@ -486,6 +504,11 @@
and_argc = switch_separate_string(pipe_names[r], ',', peer_names, (sizeof(peer_names) / sizeof(peer_names[0])));
+ if ((flags & SOF_NOBLOCK) && and_argc > 1) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Only calling the first elemnent in the list in this mode.\n");
+ and_argc = 1;
+ }
+
if (caller_channel && !sent_ring && and_argc > 1 && !ringback_data) {
switch_channel_ring_ready(caller_channel);
sent_ring = 1;
@@ -566,8 +589,11 @@
peer_channels[i] = NULL;
peer_sessions[i] = NULL;
new_session = NULL;
-
- if ((reason = switch_core_session_outgoing_channel(session, chan_type, new_profile, &new_session, &pool)) != SWITCH_CAUSE_SUCCESS) {
+
+ if (and_argc > 1 || or_argc > 1) {
+ myflags |= SOF_FORKED_DIAL;
+ }
+ if ((reason = switch_core_session_outgoing_channel(session, chan_type, new_profile, &new_session, &pool, myflags)) != SWITCH_CAUSE_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel! cause: %s\n", switch_channel_cause2str(reason));
if (pool) {
switch_core_destroy_memory_pool(&pool);
@@ -623,12 +649,25 @@
switch_channel_add_state_handler(peer_channels[i], table);
}
+
+ if ((flags & SOF_NOBLOCK) && peer_sessions[i]) {
+ status = SWITCH_STATUS_SUCCESS;
+ *bleg = peer_sessions[i];
+ *cause = SWITCH_CAUSE_SUCCESS;
+ goto outer_for;
+ }
+
+
if (switch_core_session_running(peer_sessions[i])) {
- switch_channel_set_state(peer_channels[i], CS_RING);
+ if (!(flags & SOF_NOBLOCK)) {
+ switch_channel_set_state(peer_channels[i], CS_RING);
+ }
} else {
switch_core_session_thread_launch(peer_sessions[i]);
}
- }
+
+
+ }
time(&start);
@@ -704,7 +743,7 @@
if (switch_is_file_path(ringback_data)) {
char *ext;
- if ((ext = strrchr(ringback_data, '.'))) {
+ if (strrchr(ringback_data, '.') || strstr(ringback_data, SWITCH_URL_SEPARATOR)) {
switch_core_session_set_read_codec(session, &write_codec);
ext++;
} else {
Modified: freeswitch/trunk/src/switch_swig.c
==============================================================================
--- freeswitch/trunk/src/switch_swig.c (original)
+++ freeswitch/trunk/src/switch_swig.c Thu Dec 20 16:42:00 2007
@@ -240,7 +240,7 @@
timelimit = atoi(var);
}
- if (switch_ivr_originate(session, &peer_session, &cause, bridgeto, timelimit, NULL, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
+ if (switch_ivr_originate(session, &peer_session, &cause, bridgeto, timelimit, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
switch_channel_hangup(caller_channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
return;
1
0
[commit] r6920 - freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr
by Freeswitch SVN 20 Dec '07
by Freeswitch SVN 20 Dec '07
20 Dec '07
Author: cparker
Date: Thu Dec 20 15:33:27 2007
New Revision: 6920
Modified:
freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c
Log:
Add void * cast for char * arguments so we don't fail -Werror
Modified: freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c Thu Dec 20 15:33:27 2007
@@ -183,7 +183,7 @@
if(profile) {
if(profile->caller_id_number) {
- if (rc_avpair_add(rad_config, &send, PW_FS_SRC, profile->caller_id_number, -1, PW_FS_PEC) == NULL) {
+ if (rc_avpair_add(rad_config, &send, PW_FS_SRC, (void *)profile->caller_id_number, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-Src: %s\n", profile->caller_id_number);
rc_destroy(rad_config);
@@ -191,7 +191,7 @@
}
}
if(profile->caller_id_name) {
- if (rc_avpair_add(rad_config, &send, PW_FS_CLID, profile->caller_id_name, -1, PW_FS_PEC) == NULL) {
+ if (rc_avpair_add(rad_config, &send, PW_FS_CLID, (void *)profile->caller_id_name, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-CLID: %s\n", profile->caller_id_name);
rc_destroy(rad_config);
@@ -199,7 +199,7 @@
}
}
if(profile->destination_number) {
- if (rc_avpair_add(rad_config, &send, PW_FS_DST, profile->destination_number, -1, PW_FS_PEC) == NULL) {
+ if (rc_avpair_add(rad_config, &send, PW_FS_DST, (void *)profile->destination_number, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-Dst: %s\n", profile->destination_number);
rc_destroy(rad_config);
@@ -207,7 +207,7 @@
}
}
if(profile->dialplan) {
- if (rc_avpair_add(rad_config, &send, PW_FS_DIALPLAN, profile->dialplan, -1, PW_FS_PEC) == NULL) {
+ if (rc_avpair_add(rad_config, &send, PW_FS_DIALPLAN, (void *)profile->dialplan, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-Dialplan: %s\n", profile->dialplan);
rc_destroy(rad_config);
@@ -216,7 +216,7 @@
}
if(profile->caller_extension && profile->caller_extension->last_application->application_name) {
if (rc_avpair_add(rad_config, &send, PW_FS_LASTAPP,
- profile->caller_extension->last_application->application_name, -1, PW_FS_PEC) == NULL) {
+ (void *)profile->caller_extension->last_application->application_name, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-Lastapp: %s\n", profile->source);
rc_destroy(rad_config);
@@ -331,7 +331,7 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Finished calculating billable time\n");
if(profile->caller_id_number) {
- if (rc_avpair_add(rad_config, &send, PW_FS_SRC, profile->caller_id_number, -1, PW_FS_PEC) == NULL) {
+ if (rc_avpair_add(rad_config, &send, PW_FS_SRC, (void *)profile->caller_id_number, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-Src: %s\n", profile->caller_id_number);
rc_destroy(rad_config);
@@ -339,7 +339,7 @@
}
}
if(profile->caller_id_name) {
- if (rc_avpair_add(rad_config, &send, PW_FS_CLID, profile->caller_id_name, -1, PW_FS_PEC) == NULL) {
+ if (rc_avpair_add(rad_config, &send, PW_FS_CLID, (void *)profile->caller_id_name, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-CLID: %s\n", profile->caller_id_name);
rc_destroy(rad_config);
@@ -347,7 +347,7 @@
}
}
if(profile->destination_number) {
- if (rc_avpair_add(rad_config, &send, PW_FS_DST, profile->destination_number, -1, PW_FS_PEC) == NULL) {
+ if (rc_avpair_add(rad_config, &send, PW_FS_DST, (void *)profile->destination_number, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-Dst: %s\n", profile->destination_number);
rc_destroy(rad_config);
@@ -355,7 +355,7 @@
}
}
if(profile->dialplan) {
- if (rc_avpair_add(rad_config, &send, PW_FS_DIALPLAN, profile->dialplan, -1, PW_FS_PEC) == NULL) {
+ if (rc_avpair_add(rad_config, &send, PW_FS_DIALPLAN, (void *)profile->dialplan, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-Dialplan: %s\n", profile->dialplan);
rc_destroy(rad_config);
@@ -364,7 +364,7 @@
}
if(profile->caller_extension && profile->caller_extension->last_application->application_name) {
if (rc_avpair_add(rad_config, &send, PW_FS_LASTAPP,
- profile->caller_extension->last_application->application_name, -1, PW_FS_PEC) == NULL) {
+ (void *)profile->caller_extension->last_application->application_name, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"failed adding Freeswitch-Lastapp: %s\n", profile->source);
rc_destroy(rad_config);
1
0
Author: anthm
Date: Thu Dec 20 15:26:00 2007
New Revision: 6919
Modified:
freeswitch/trunk/src/switch_console.c
Log:
fix FSCORE-75
Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c (original)
+++ freeswitch/trunk/src/switch_console.c Thu Dec 20 15:26:00 2007
@@ -246,6 +246,7 @@
free(cmd);
}
}
+ switch_yield(1000);
}
switch_core_destroy_memory_pool(&pool);
1
0
20 Dec '07
Author: anthm
Date: Thu Dec 20 15:20:38 2007
New Revision: 6918
Modified:
freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
Log:
fix MODAPP-58
Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c Thu Dec 20 15:20:38 2007
@@ -547,7 +547,7 @@
} else {
if ((db = switch_core_db_open_file(profile->dbname))) {
switch_core_db_test_reactive(db, "select count(message_len) from voicemail_data", "drop table voicemail_data", vm_sql);
- switch_core_db_test_reactive(db, "select count(user) from voicemail_prefs", "drop table voicemail_data", vm_pref_sql);
+ switch_core_db_test_reactive(db, "select count(user) from voicemail_prefs", "drop table voicemail_prefs", vm_pref_sql);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open SQL Database!\n");
continue;
1
0
[commit] r6917 - in freeswitch/trunk/src: . include mod/event_handlers/mod_cdr_csv
by Freeswitch SVN 20 Dec '07
by Freeswitch SVN 20 Dec '07
20 Dec '07
Author: anthm
Date: Thu Dec 20 13:04:07 2007
New Revision: 6917
Modified:
freeswitch/trunk/src/include/switch_channel.h
freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
freeswitch/trunk/src/switch_channel.c
Log:
more cdr stuff
Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h (original)
+++ freeswitch/trunk/src/include/switch_channel.h Thu Dec 20 13:04:07 2007
@@ -464,6 +464,7 @@
*/
SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel, const char *in);
SWITCH_DECLARE(char *) switch_channel_build_param_string(switch_channel_t *channel, switch_caller_profile_t *caller_profile, const char *prefix);
+SWITCH_DECLARE(switch_status_t) switch_channel_set_timestamps(switch_channel_t *channel);
/** @} */
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c Thu Dec 20 13:04:07 2007
@@ -158,16 +158,8 @@
{
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_status_t status = SWITCH_STATUS_SUCCESS;
- const char *log_dir = NULL, *accountcode = NULL, *cid_buf = NULL, *a_template_str = NULL, *g_template_str = NULL;
+ const char *log_dir = NULL, *accountcode = NULL, *a_template_str = NULL, *g_template_str = NULL;
char *log_line, *path = NULL;
- switch_caller_profile_t *caller_profile, *ocp;
-
- switch_app_log_t *app_log, *ap;
- char *last_app = NULL, *last_arg = NULL;
- char start[80] = "", answer[80] = "", end[80] = "", tmp[80] = "", profile_start[80] = "";
- int32_t duration = 0, billsec = 0, mduration = 0, billmsec = 0;
- switch_time_t uduration = 0, billusec = 0;
- time_t tt_created = 0, tt_answered = 0, tt_hungup = 0, mtt_created = 0, mtt_answered = 0, mtt_hungup = 0, tt_prof_created, mtt_prof_created;
if (switch_channel_get_originator_caller_profile(channel)) {
return SWITCH_STATUS_SUCCESS;
@@ -182,106 +174,6 @@
return SWITCH_STATUS_FALSE;
}
- caller_profile = switch_channel_get_caller_profile(channel);
- ocp = switch_channel_get_originatee_caller_profile(channel);
-
- if (!switch_strlen_zero(caller_profile->caller_id_name)) {
- cid_buf = switch_core_session_sprintf(session, "\"%s\" <%s>", caller_profile->caller_id_name,
- switch_str_nil(caller_profile->caller_id_number));
- } else {
- cid_buf = caller_profile->caller_id_number;
- }
-
- if ((app_log = switch_core_session_get_app_log(session))) {
- for (ap = app_log; ap && ap->next; ap = ap->next);
- last_app = ap->app;
- last_arg = ap->arg;
- }
-
- if (caller_profile->times) {
- switch_time_exp_t tm;
- switch_size_t retsize;
- const char *fmt = "%Y-%m-%d %T";
-
- switch_time_exp_lt(&tm, caller_profile->times->created);
- switch_strftime(start, &retsize, sizeof(start), fmt, &tm);
- switch_channel_set_variable(channel, "start_stamp", start);
-
- switch_time_exp_lt(&tm, caller_profile->times->profile_created);
- switch_strftime(profile_start, &retsize, sizeof(profile_start), fmt, &tm);
- switch_channel_set_variable(channel, "profile_start_stamp", profile_start);
-
- switch_time_exp_lt(&tm, caller_profile->times->answered);
- switch_strftime(answer, &retsize, sizeof(answer), fmt, &tm);
- switch_channel_set_variable(channel, "answer_stamp", answer);
-
- switch_time_exp_lt(&tm, caller_profile->times->hungup);
- switch_strftime(end, &retsize, sizeof(end), fmt, &tm);
- switch_channel_set_variable(channel, "end_stamp", end);
-
- tt_created = (time_t) (caller_profile->times->created / 1000000);
- mtt_created = (time_t) (caller_profile->times->created / 1000);
- tt_prof_created = (time_t) (caller_profile->times->profile_created / 1000000);
- mtt_prof_created = (time_t) (caller_profile->times->profile_created / 1000);
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_created);
- switch_channel_set_variable(channel, "start_epoch", tmp);
- switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->created);
- switch_channel_set_variable(channel, "start_uepoch", tmp);
-
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_prof_created);
- switch_channel_set_variable(channel, "profile_start_epoch", tmp);
- switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->profile_created);
- switch_channel_set_variable(channel, "profile_start_uepoch", tmp);
-
- tt_answered = (time_t) (caller_profile->times->answered / 1000000);
- mtt_answered = (time_t) (caller_profile->times->answered / 1000);
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_answered);
- switch_channel_set_variable(channel, "answer_epoch", tmp);
- switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->answered);
- switch_channel_set_variable(channel, "answer_uepoch", tmp);
-
-
- tt_hungup = (time_t) (caller_profile->times->hungup / 1000000);
- mtt_hungup = (time_t) (caller_profile->times->hungup / 1000);
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_hungup);
- switch_channel_set_variable(channel, "end_epoch", tmp);
- switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->hungup);
- switch_channel_set_variable(channel, "end_uepoch", tmp);
-
- uduration = caller_profile->times->hungup - caller_profile->times->created;
- duration = (int32_t)(tt_hungup - tt_created);
- mduration = (int32_t)(mtt_hungup - mtt_created);
-
- if (caller_profile->times->answered) {
- billsec = (int32_t)(tt_hungup - tt_answered);
- billmsec = (int32_t)(mtt_hungup - mtt_answered);
- billusec = caller_profile->times->hungup - caller_profile->times->answered;
- }
- }
-
-
- switch_channel_set_variable(channel, "last_app", last_app);
- switch_channel_set_variable(channel, "last_arg", last_arg);
- switch_channel_set_variable(channel, "caller_id", cid_buf);
-
- switch_snprintf(tmp, sizeof(tmp), "%d", duration);
- switch_channel_set_variable(channel, "duration", tmp);
-
- switch_snprintf(tmp, sizeof(tmp), "%d", billsec);
- switch_channel_set_variable(channel, "billsec", tmp);
-
- switch_snprintf(tmp, sizeof(tmp), "%d", mduration);
- switch_channel_set_variable(channel, "mduration", tmp);
-
- switch_snprintf(tmp, sizeof(tmp), "%d", billmsec);
- switch_channel_set_variable(channel, "billmsec", tmp);
-
- switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, uduration);
- switch_channel_set_variable(channel, "uduration", tmp);
-
- switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, billusec);
- switch_channel_set_variable(channel, "billusec", tmp);
-
if (globals.debug) {
switch_event_t *event;
if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Thu Dec 20 13:04:07 2007
@@ -964,6 +964,8 @@
caller_profile->times->answered = channel->caller_profile->times->answered;
caller_profile->times->created = channel->caller_profile->times->created;
caller_profile->times->hungup = channel->caller_profile->times->hungup;
+ } else {
+ caller_profile->times->created = switch_time_now();
}
caller_profile->next = channel->caller_profile;
@@ -1160,6 +1162,7 @@
if (channel->state < CS_HANGUP) {
switch_event_t *event;
switch_channel_state_t last_state = channel->state;
+
channel->state = CS_HANGUP;
channel->hangup_cause = hangup_cause;
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_NOTICE, "Hangup %s [%s] [%s]\n",
@@ -1175,6 +1178,8 @@
switch_core_session_kill_channel(channel->session, SWITCH_SIG_KILL);
switch_core_session_signal_state_change(channel->session);
+
+ switch_channel_set_timestamps(channel);
}
switch_mutex_unlock(channel->flag_mutex);
@@ -1719,6 +1724,136 @@
return stream.data;
}
+SWITCH_DECLARE(switch_status_t) switch_channel_set_timestamps(switch_channel_t *channel)
+{
+ switch_status_t status = SWITCH_STATUS_SUCCESS;
+ const char *cid_buf = NULL;
+ switch_caller_profile_t *caller_profile, *ocp;
+ switch_app_log_t *app_log, *ap;
+ char *last_app = NULL, *last_arg = NULL;
+ char start[80] = "", answer[80] = "", end[80] = "", tmp[80] = "", profile_start[80] = "";
+ int32_t duration = 0, legbillsec = 0, billsec = 0, mduration = 0, billmsec = 0, legbillmsec = 0;
+ switch_time_t uduration = 0, legbillusec = 0, billusec = 0;
+ time_t tt_created = 0, tt_answered = 0, tt_hungup = 0, mtt_created = 0, mtt_answered = 0, mtt_hungup = 0, tt_prof_created, mtt_prof_created;
+
+
+ caller_profile = switch_channel_get_caller_profile(channel);
+ if (!(ocp = switch_channel_get_originatee_caller_profile(channel))) {
+ ocp = switch_channel_get_originator_caller_profile(channel);
+ }
+
+ if (!switch_strlen_zero(caller_profile->caller_id_name)) {
+ cid_buf = switch_core_session_sprintf(channel->session, "\"%s\" <%s>", caller_profile->caller_id_name,
+ switch_str_nil(caller_profile->caller_id_number));
+ } else {
+ cid_buf = caller_profile->caller_id_number;
+ }
+
+ if ((app_log = switch_core_session_get_app_log(channel->session))) {
+ for (ap = app_log; ap && ap->next; ap = ap->next);
+ last_app = ap->app;
+ last_arg = ap->arg;
+ }
+
+ if (caller_profile->times) {
+ switch_time_exp_t tm;
+ switch_size_t retsize;
+ const char *fmt = "%Y-%m-%d %T";
+
+ switch_time_exp_lt(&tm, caller_profile->times->created);
+ switch_strftime(start, &retsize, sizeof(start), fmt, &tm);
+ switch_channel_set_variable(channel, "start_stamp", start);
+
+ switch_time_exp_lt(&tm, caller_profile->times->profile_created);
+ switch_strftime(profile_start, &retsize, sizeof(profile_start), fmt, &tm);
+ switch_channel_set_variable(channel, "profile_start_stamp", profile_start);
+
+ switch_time_exp_lt(&tm, caller_profile->times->answered);
+ switch_strftime(answer, &retsize, sizeof(answer), fmt, &tm);
+ switch_channel_set_variable(channel, "answer_stamp", answer);
+
+ switch_time_exp_lt(&tm, caller_profile->times->hungup);
+ switch_strftime(end, &retsize, sizeof(end), fmt, &tm);
+ switch_channel_set_variable(channel, "end_stamp", end);
+
+ tt_created = (time_t) (caller_profile->times->created / 1000000);
+ mtt_created = (time_t) (caller_profile->times->created / 1000);
+ tt_prof_created = (time_t) (caller_profile->times->profile_created / 1000000);
+ mtt_prof_created = (time_t) (caller_profile->times->profile_created / 1000);
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_created);
+ switch_channel_set_variable(channel, "start_epoch", tmp);
+ switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->created);
+ switch_channel_set_variable(channel, "start_uepoch", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_prof_created);
+ switch_channel_set_variable(channel, "profile_start_epoch", tmp);
+ switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->profile_created);
+ switch_channel_set_variable(channel, "profile_start_uepoch", tmp);
+
+ tt_answered = (time_t) (caller_profile->times->answered / 1000000);
+ mtt_answered = (time_t) (caller_profile->times->answered / 1000);
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_answered);
+ switch_channel_set_variable(channel, "answer_epoch", tmp);
+ switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->answered);
+ switch_channel_set_variable(channel, "answer_uepoch", tmp);
+
+
+ tt_hungup = (time_t) (caller_profile->times->hungup / 1000000);
+ mtt_hungup = (time_t) (caller_profile->times->hungup / 1000);
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_hungup);
+ switch_channel_set_variable(channel, "end_epoch", tmp);
+ switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->hungup);
+ switch_channel_set_variable(channel, "end_uepoch", tmp);
+
+ uduration = caller_profile->times->hungup - caller_profile->times->created;
+ duration = (int32_t)(tt_hungup - tt_created);
+ mduration = (int32_t)(mtt_hungup - mtt_created);
+
+ if (caller_profile->times->answered) {
+ billsec = (int32_t)(tt_hungup - tt_answered);
+ billmsec = (int32_t)(mtt_hungup - mtt_answered);
+ billusec = caller_profile->times->hungup - caller_profile->times->answered;
+
+ legbillsec = (int32_t)(tt_hungup - tt_prof_created);
+ legbillmsec = (int32_t)(mtt_hungup - mtt_prof_created);
+ legbillusec = caller_profile->times->hungup - caller_profile->times->profile_created;
+ }
+ }
+
+
+ switch_channel_set_variable(channel, "last_app", last_app);
+ switch_channel_set_variable(channel, "last_arg", last_arg);
+ switch_channel_set_variable(channel, "caller_id", cid_buf);
+
+ switch_snprintf(tmp, sizeof(tmp), "%d", duration);
+ switch_channel_set_variable(channel, "duration", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%d", billsec);
+ switch_channel_set_variable(channel, "billsec", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%d", legbillsec);
+ switch_channel_set_variable(channel, "flow_billsec", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%d", mduration);
+ switch_channel_set_variable(channel, "mduration", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%d", billmsec);
+ switch_channel_set_variable(channel, "billmsec", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%d", legbillmsec);
+ switch_channel_set_variable(channel, "flow_billmsec", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, uduration);
+ switch_channel_set_variable(channel, "uduration", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, billusec);
+ switch_channel_set_variable(channel, "billusec", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, legbillusec);
+ switch_channel_set_variable(channel, "flow_billusec", tmp);
+
+ return status;
+}
/* For Emacs:
* Local Variables:
1
0
[commit] r6916 - in freeswitch/trunk/src: . include mod/event_handlers/mod_cdr_csv
by Freeswitch SVN 20 Dec '07
by Freeswitch SVN 20 Dec '07
20 Dec '07
Author: anthm
Date: Thu Dec 20 12:27:11 2007
New Revision: 6916
Modified:
freeswitch/trunk/src/include/switch_channel.h
freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_ivr.c
Log:
cdr update
Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h (original)
+++ freeswitch/trunk/src/include/switch_channel.h Thu Dec 20 12:27:11 2007
@@ -41,6 +41,7 @@
#include <switch.h>
SWITCH_BEGIN_EXTERN_C struct switch_channel_timetable {
+ switch_time_t profile_created;
switch_time_t created;
switch_time_t answered;
switch_time_t hungup;
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c Thu Dec 20 12:27:11 2007
@@ -164,10 +164,10 @@
switch_app_log_t *app_log, *ap;
char *last_app = NULL, *last_arg = NULL;
- char start[80] = "", answer[80] = "", end[80] = "", tmp[80] = "";
+ char start[80] = "", answer[80] = "", end[80] = "", tmp[80] = "", profile_start[80] = "";
int32_t duration = 0, billsec = 0, mduration = 0, billmsec = 0;
switch_time_t uduration = 0, billusec = 0;
- time_t tt_created = 0, tt_answered = 0, tt_hungup = 0, mtt_created = 0, mtt_answered = 0, mtt_hungup = 0;
+ time_t tt_created = 0, tt_answered = 0, tt_hungup = 0, mtt_created = 0, mtt_answered = 0, mtt_hungup = 0, tt_prof_created, mtt_prof_created;
if (switch_channel_get_originator_caller_profile(channel)) {
return SWITCH_STATUS_SUCCESS;
@@ -207,6 +207,10 @@
switch_strftime(start, &retsize, sizeof(start), fmt, &tm);
switch_channel_set_variable(channel, "start_stamp", start);
+ switch_time_exp_lt(&tm, caller_profile->times->profile_created);
+ switch_strftime(profile_start, &retsize, sizeof(profile_start), fmt, &tm);
+ switch_channel_set_variable(channel, "profile_start_stamp", profile_start);
+
switch_time_exp_lt(&tm, caller_profile->times->answered);
switch_strftime(answer, &retsize, sizeof(answer), fmt, &tm);
switch_channel_set_variable(channel, "answer_stamp", answer);
@@ -217,10 +221,17 @@
tt_created = (time_t) (caller_profile->times->created / 1000000);
mtt_created = (time_t) (caller_profile->times->created / 1000);
+ tt_prof_created = (time_t) (caller_profile->times->profile_created / 1000000);
+ mtt_prof_created = (time_t) (caller_profile->times->profile_created / 1000);
switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_created);
switch_channel_set_variable(channel, "start_epoch", tmp);
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->created);
switch_channel_set_variable(channel, "start_uepoch", tmp);
+
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_prof_created);
+ switch_channel_set_variable(channel, "profile_start_epoch", tmp);
+ switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->profile_created);
+ switch_channel_set_variable(channel, "profile_start_uepoch", tmp);
tt_answered = (time_t) (caller_profile->times->answered / 1000000);
mtt_answered = (time_t) (caller_profile->times->answered / 1000);
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Thu Dec 20 12:27:11 2007
@@ -957,11 +957,13 @@
}
caller_profile->times = (switch_channel_timetable_t *) switch_core_session_alloc(channel->session, sizeof(*caller_profile->times));
- caller_profile->times->created = switch_time_now();
+ caller_profile->times->profile_created = switch_time_now();
if (channel->caller_profile && channel->caller_profile->times) {
- channel->caller_profile->times->transferred = caller_profile->times->created;
+ channel->caller_profile->times->transferred = caller_profile->times->profile_created;
caller_profile->times->answered = channel->caller_profile->times->answered;
+ caller_profile->times->created = channel->caller_profile->times->created;
+ caller_profile->times->hungup = channel->caller_profile->times->hungup;
}
caller_profile->next = channel->caller_profile;
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Thu Dec 20 12:27:11 2007
@@ -1460,6 +1460,12 @@
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->created);
switch_xml_set_txt_d(time_tag, tmp);
+ if (!(time_tag = switch_xml_add_child_d(x_times, "profile_created_time", t_off++))) {
+ goto error;
+ }
+ switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->profile_created);
+ switch_xml_set_txt_d(time_tag, tmp);
+
if (!(time_tag = switch_xml_add_child_d(x_times, "answered_time", t_off++))) {
goto error;
}
1
0
20 Dec '07
Author: trixter
Date: Thu Dec 20 12:02:26 2007
New Revision: 6915
Added:
freeswitch/trunk/scripts/contrib/trixter/xml-cdr/testcdr.php
freeswitch/trunk/scripts/contrib/trixter/xml-cdr/testcdr.xml
Modified:
freeswitch/trunk/scripts/contrib/trixter/xml-cdr/README
Log:
added a cli/web test program
Modified: freeswitch/trunk/scripts/contrib/trixter/xml-cdr/README
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/xml-cdr/README (original)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-cdr/README Thu Dec 20 12:02:26 2007
@@ -24,3 +24,18 @@
<param name="logDir" value="/usr/local/freeswitch/log"/>
</settings>
+
+
+
+TO TEST
+there is an example XML_CDR record testcdr.xml which you can parse
+
+Web method:
+cp testcdr.php Parse_XML_CDR.php testcdr.xml /path/to/htdocs
+goto http://host/testcdr.php
+
+CLI method:
+php testcdr.php
+
+The XML record is quite long and has many transfers, but this should
+let you know how the array is formed so you can reference elements
Added: freeswitch/trunk/scripts/contrib/trixter/xml-cdr/testcdr.php
==============================================================================
--- (empty file)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-cdr/testcdr.php Thu Dec 20 12:02:26 2007
@@ -0,0 +1,27 @@
+<?php // -*- mode:c; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil; -*-
+include_once('Parse_XML_CDR.php');
+Header("Content-type: text/plain");
+
+function read_file($filename)
+{
+ if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) {
+ $contents = '';
+ while (!feof($fd)) {
+ $contents .= fread($fd, 8192);
+ }
+ fclose($fd);
+ return $contents;
+ } else {
+ return false;
+ }
+}
+
+$xmlraw=read_file("testcdr.xml");
+if($xmlraw !== false) {
+ $xml = new Parse_CDR_XML($xmlraw);
+ $cdr=$xml->ReturnArray();
+ print_r($cdr);
+ } else {
+ echo "Unable to read file";
+ }
+?>
Added: freeswitch/trunk/scripts/contrib/trixter/xml-cdr/testcdr.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-cdr/testcdr.xml Thu Dec 20 12:02:26 2007
@@ -0,0 +1,1528 @@
+<?xml version="1.0"?>
+<cdr>
+ <variables>
+ <sip_authorized>true</sip_authorized>
+ <sip_mailbox>1006</sip_mailbox>
+ <sip_auth_username>1006</sip_auth_username>
+ <sip_auth_realm>10.0.1.250</sip_auth_realm>
+ <mailbox>1006</mailbox>
+ <accountcode>1006</accountcode>
+ <user_context>default</user_context>
+ <effective_caller_id_name>Extension%201006</effective_caller_id_name>
+ <effective_caller_id_number>1006</effective_caller_id_number>
+ <sip_from_user>1006</sip_from_user>
+ <sip_from_port>5060</sip_from_port>
+ <sip_from_uri>1006%4010.0.1.250%3A5060</sip_from_uri>
+ <sip_from_host>10.0.1.250</sip_from_host>
+ <sip_from_user_stripped>1006</sip_from_user_stripped>
+ <sofia_profile_name>default</sofia_profile_name>
+ <sip_req_user>1009</sip_req_user>
+ <sip_req_port>5060</sip_req_port>
+ <sip_req_uri>1009%4010.0.1.250%3A5060</sip_req_uri>
+ <sip_req_host>10.0.1.250</sip_req_host>
+ <sip_to_user>1009</sip_to_user>
+ <sip_to_port>5060</sip_to_port>
+ <sip_to_uri>1009%4010.0.1.250%3A5060</sip_to_uri>
+ <sip_to_host>10.0.1.250</sip_to_host>
+ <sip_contact_user>1006</sip_contact_user>
+ <sip_contact_port>5060</sip_contact_port>
+ <sip_contact_uri>1006%4010.0.1.240%3A5060</sip_contact_uri>
+ <sip_contact_host>10.0.1.240</sip_contact_host>
+ <channel_name>sofia/default/1006%4010.0.1.250%3A5060</channel_name>
+ <sip_call_id>1f9e6333-e0128840-f539ae8d%4010.0.1.240</sip_call_id>
+ <sip_via_host>10.0.1.240</sip_via_host>
+ <sip_via_port>5060</sip_via_port>
+ <sip_via_rport>34699</sip_via_rport>
+ <max_forwards>70</max_forwards>
+ <presence_id>1006%4010.0.1.250</presence_id>
+ <switch_r_sdp>v%3D0%0D%0Ao%3D-%201198125579%201198125579%20IN%20IP4%2010.0.1.240%0D%0As%3DPolycom%20IP%20Phone%0D%0Ac%3DIN%20IP4%2010.0.1.240%0D%0At%3D0%200%0D%0Aa%3Dsendrecv%0D%0Am%3Daudio%202236%20RTP/AVP%209%200%208%2018%20101%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A8%20PCMA/8000%0D%0Aa%3Drtpmap%3A18%20G729/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0A</switch_r_sdp>
+ <remote_media_ip>10.0.1.240</remote_media_ip>
+ <remote_media_port>2236</remote_media_port>
+ <read_codec>G722</read_codec>
+ <read_rate>16000</read_rate>
+ <write_codec>G722</write_codec>
+ <write_rate>16000</write_rate>
+ <local_media_ip>10.0.1.250</local_media_ip>
+ <local_media_port>2236</local_media_port>
+ <endpoint_disposition>ANSWER</endpoint_disposition>
+ <fifo_target>7fa22ce4-9487-4501-965e-7e062792f6c3</fifo_target>
+ <fifo_status>DONE</fifo_status>
+ <fifo_timestamp>2007-12-20%2007%3A20%3A20</fifo_timestamp>
+ <use_profile>nat</use_profile>
+ <numbering_plan>US</numbering_plan>
+ <default_gateway>asterlink.com</default_gateway>
+ <default_area_code>918</default_area_code>
+ <user_name>default</user_name>
+ <domain_name>10.0.1.250</domain_name>
+ <dialed_ext>1002</dialed_ext>
+ <call_timeout>130</call_timeout>
+ <hangup_after_bridge>true</hangup_after_bridge>
+ <left_hanging_extension>5900</left_hanging_extension>
+ <continue_on_fail>true</continue_on_fail>
+ <dialed_user>1002</dialed_user>
+ <dialed_domain>10.0.1.250</dialed_domain>
+ <switch_m_sdp>v%3D0%0D%0Ao%3D1002%208000%208000%20IN%20IP4%2010.0.1.5%0D%0As%3DSIP%20Call%0D%0Ac%3DIN%20IP4%2010.0.1.5%0D%0At%3D0%200%0D%0Am%3Daudio%205004%20RTP/AVP%200%20101%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-11%0D%0Aa%3Dptime%3A20%0D%0A</switch_m_sdp>
+ <originate_disposition>SUCCESS</originate_disposition>
+ <bridge_channel>sofia/default/1002</bridge_channel>
+ <bridge_uuid>cf150cd3-af80-49b1-90c9-da7484e9b033</bridge_uuid>
+ <signal_bond>cf150cd3-af80-49b1-90c9-da7484e9b033</signal_bond>
+ <hangup_cause>NORMAL_CLEARING</hangup_cause>
+ <start_stamp>2007-12-20%2007%3A21%3A28</start_stamp>
+ <answer_stamp>2007-12-20%2007%3A19%3A34</answer_stamp>
+ <end_stamp>2007-12-20%2007%3A21%3A32</end_stamp>
+ <start_epoch>1198156888</start_epoch>
+ <start_uepoch>1198156888447769</start_uepoch>
+ <answer_epoch>1198156774</answer_epoch>
+ <answer_uepoch>1198156774875311</answer_uepoch>
+ <end_epoch>1198156892</end_epoch>
+ <end_uepoch>1198156892250109</end_uepoch>
+ <last_app>bridge</last_app>
+ <last_arg>USER/1002%4010.0.1.250</last_arg>
+ <caller_id>%22Brian%20West%22%20%3C1006%3E</caller_id>
+ <duration>4</duration>
+ <billsec>118</billsec>
+ <mduration>3803</mduration>
+ <billmsec>117375</billmsec>
+ <uduration>3802340</uduration>
+ <billusec>117374798</billusec>
+ </variables>
+ <app_log>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1009"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1009/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1009/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1009(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1002"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1002/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1002/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1002(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1009"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1009/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1009/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1009(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1002"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1002/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1002/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1002(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1009"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1009/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1009/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1009(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1002"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1002/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1002/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1002(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1009"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1009/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1009/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1009(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1002"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1002/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1002/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1002(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/5900"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="fifo" app_data="5900(a)10.0.1.250 in undef local_stream://moh"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1002"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1002/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1002/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1002(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1009"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1009/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1009/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1009(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1002"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1002/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1002/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1002(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1009"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1009/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1009/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1009(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1002"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1002/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1002/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1002(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1009"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1009/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1009/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1009(a)10.0.1.250"></application>
+ <application app_name="playback" app_data="local_stream://moh"></application>
+ <application app_name="set" app_data="use_profile=nat"></application>
+ <application app_name="set_user" app_data="default(a)10.0.1.250"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/1006/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="db" app_data="insert/last_dial/1006/1002"></application>
+ <application app_name="db" app_data="insert/last_dial/global/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/1002/1006"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/1002/f1d9f5e9-1ccd-4df7-876e-adf6e3602361"></application>
+ <application app_name="bridge" app_data="USER/1002(a)10.0.1.250"></application>
+ </app_log>
+ <callflow dialplan="XML">
+ <extension name="global" number="1002" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1002 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1002</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>cf150cd3-af80-49b1-90c9-da7484e9b033</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>cf150cd3-af80-49b1-90c9-da7484e9b033</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156888447769</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>1198156892250109</hangup_time>
+ <transfer_time>0</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1009" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1009 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1009</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>4b8d3f9d-0bbd-48b3-b0e0-3a8eb9ead4d7</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>4b8d3f9d-0bbd-48b3-b0e0-3a8eb9ead4d7</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156885001861</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156888447769</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1002" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1002 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1002</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>c68e2ba8-12b8-417f-a919-4caa5437bd9a</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>c68e2ba8-12b8-417f-a919-4caa5437bd9a</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156880578019</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156885001861</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1009" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1009 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1009</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>073c1939-561c-466a-b652-a39ca2aae77a</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>073c1939-561c-466a-b652-a39ca2aae77a</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156876612260</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156880578019</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1002" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1002 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1002</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>2a3db176-a105-4a44-92f2-6e3ac7048d5b</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>2a3db176-a105-4a44-92f2-6e3ac7048d5b</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156839911708</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156876612260</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1009" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1009 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1009</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>a36354f8-4804-4f76-805b-fa0a0ca8903e</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>a36354f8-4804-4f76-805b-fa0a0ca8903e</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156833485893</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156839911708</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1002" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1002 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1002</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>d01dbfc2-d692-48b8-bb10-8b62127f43cd</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>d01dbfc2-d692-48b8-bb10-8b62127f43cd</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156820268791</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156833485893</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="5900">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="fifo" app_data="5900(a)10.0.1.250 in undef local_stream://moh"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>5900</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originator>
+ <originator_caller_profile>
+ <username>1009</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1009</caller_id_number>
+ <network_addr>10.0.1.28</network_addr>
+ <rdnis></rdnis>
+ <destination_number>**park+5900</destination_number>
+ <uuid>7fa22ce4-9487-4501-965e-7e062792f6c3</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009@10.0.1.250:5060</chan_name>
+ </originator_caller_profile>
+ </originator>
+ </caller_profile>
+ <times>
+ <created_time>1198156812978484</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156820268791</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1002" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1002 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1002</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>22b5e34f-d334-40fe-b7e7-9ca54b2a7160</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>22b5e34f-d334-40fe-b7e7-9ca54b2a7160</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156806464364</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156812978484</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1009" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1009 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1009</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>6070e39b-71a4-4872-a851-a8c9ac45488d</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>6070e39b-71a4-4872-a851-a8c9ac45488d</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156801337500</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156806464364</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1002" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1002 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1002</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>a95fdc9d-1f64-4962-acb8-a26507c9d224</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>a95fdc9d-1f64-4962-acb8-a26507c9d224</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156797434745</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156801337500</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1009" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1009 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1009</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>a5dfe2cc-7754-4a82-a645-231a15decb3f</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>a5dfe2cc-7754-4a82-a645-231a15decb3f</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156792878476</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156797434745</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1002" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1002 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1002</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>fec1ae9e-546c-4cc5-b22a-55dc997a0e35</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>fec1ae9e-546c-4cc5-b22a-55dc997a0e35</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156788685547</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156792878476</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1009" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1009 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1009</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>4aa48010-4595-461c-936a-179f9fb4d1f3</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>4aa48010-4595-461c-936a-179f9fb4d1f3</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156784428990</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156788685547</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1002" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1002"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1002 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1002</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>545f4ba0-5978-4b41-892f-aca78f174a91</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1002</destination_number>
+ <uuid>545f4ba0-5978-4b41-892f-aca78f174a91</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1002</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156778376001</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156784428990</transfer_time>
+ </times>
+ </callflow>
+ <callflow dialplan="XML">
+ <extension name="global" number="1009" current_app="answer">
+ <application app_name="set" app_data="use_profile=${cond(${is_lan_addr(10.0.1.250)} == yes ? nat : default)}"></application>
+ <application app_name="set_user" app_data="default@${domain}"></application>
+ <application app_name="info" app_data=""></application>
+ <application app_name="db" app_data="insert/spymap/${caller_id_number}/${uuid}"></application>
+ <application app_name="db" app_data="insert/last_dial/${caller_id_number}/${destination_number}"></application>
+ <application app_name="db" app_data="insert/last_dial/global/${uuid}"></application>
+ <application app_name="set" app_data="dialed_ext=1009"></application>
+ <application app_name="ring_ready" app_data=""></application>
+ <application app_name="set" app_data="call_timeout=130"></application>
+ <application app_name="set" app_data="hangup_after_bridge=true"></application>
+ <application app_name="set" app_data="left_hanging_extension=5900"></application>
+ <application app_name="set" app_data="continue_on_fail=true"></application>
+ <application app_name="db" app_data="insert/call_return/${dialed_ext}/${caller_id_number}"></application>
+ <application app_name="db" app_data="insert/last_dial_ext/${dialed_ext}/${uuid}"></application>
+ <application app_name="bridge" app_data="USER/${dialed_ext}(a)10.0.1.250"></application>
+ <application last_executed="true" app_name="answer" app_data=""></application>
+ <application app_name="sleep" app_data="1000"></application>
+ <application app_name="voicemail" app_data="default 10.0.1.250 ${dialed_ext}"></application>
+ <application app_name="transfer" app_data="1009 enum"></application>
+ </extension>
+ <caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Brian West</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>1009</destination_number>
+ <uuid>f1d9f5e9-1ccd-4df7-876e-adf6e3602361</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1006@10.0.1.250:5060</chan_name>
+ <originatee>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>efb71d06-c38c-4af9-a4bd-c5a23b501689</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ <originatee_caller_profile>
+ <username>1006</username>
+ <dialplan>XML</dialplan>
+ <caller_id_name>Extension 1006</caller_id_name>
+ <ani></ani>
+ <aniii></aniii>
+ <caller_id_number>1006</caller_id_number>
+ <network_addr>10.0.1.240</network_addr>
+ <rdnis></rdnis>
+ <destination_number>10.0.1.250/1009</destination_number>
+ <uuid>efb71d06-c38c-4af9-a4bd-c5a23b501689</uuid>
+ <source>mod_sofia</source>
+ <context>default</context>
+ <chan_name>sofia/default/1009</chan_name>
+ </originatee_caller_profile>
+ </originatee>
+ </caller_profile>
+ <times>
+ <created_time>1198156772841382</created_time>
+ <answered_time>1198156774875311</answered_time>
+ <hangup_time>0</hangup_time>
+ <transfer_time>1198156778376001</transfer_time>
+ </times>
+ </callflow>
+</cdr>
1
0
20 Dec '07
Author: trixter
Date: Thu Dec 20 11:49:46 2007
New Revision: 6914
Modified:
freeswitch/trunk/scripts/contrib/trixter/xml-cdr/Parse_XML_CDR.php
Log:
bug fix for multiple caller profiles
Modified: freeswitch/trunk/scripts/contrib/trixter/xml-cdr/Parse_XML_CDR.php
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/xml-cdr/Parse_XML_CDR.php (original)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-cdr/Parse_XML_CDR.php Thu Dec 20 11:49:46 2007
@@ -65,7 +65,7 @@
}
break;
case "callflow":
- $this->_CDR[$name]=array();
+ if(!is_array($this->_CDR[$name])) { $this->_CDR[$name]=array(); }
$this->currentTag = $name;
foreach ($attrs as $key => $value) {
$this->_CDR[$this->currentTag][$this->_callflowcnt][$key]=$value;
1
0