[commit] r6649 - in freeswitch/branches/stkn/sofia-exp/trunk: conf/directory/default docs/phrase libs/sofia-sip/libsofia-sip-ua/sresolv libs/sofia-sip/libsofia-sip-ua/su/sofia-sip libs/sofia-sip/libsofia-sip-ua/tport libs/sofia-sip/win32 libs/sofia-sip/win32/sofia-sip libs/udns scripts src/mod/applications/mod_dptools src/mod/endpoints/mod_sofia
Author: stkn Date: Tue Dec 11 12:10:43 2007 New Revision: 6649 Added: freeswitch/branches/stkn/sofia-exp/trunk/scripts/sipsetup - copied unchanged from r6648, /freeswitch/trunk/scripts/sipsetup Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1000.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1001.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1002.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1003.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1004.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1005.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1006.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1007.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1008.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1009.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1010.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1011.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1012.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1013.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1014.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1015.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1016.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1017.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1018.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1019.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/brian.xml freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/sipphone.com.noload freeswitch/branches/stkn/sofia-exp/trunk/docs/phrase/phrase_en.xml freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/win32/config.h.in freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h freeswitch/branches/stkn/sofia-exp/trunk/libs/udns/udns_resolver.c freeswitch/branches/stkn/sofia-exp/trunk/src/mod/applications/mod_dptools/mod_dptools.c freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/sofia.c Log: Merge changes from trunk Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1000.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1000.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1000.xml Tue Dec 11 12:10:43 2007 @@ -8,7 +8,7 @@ <param name="dial-string" value="sofia/${use_profile}/888@conference.freeswitch.org"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1001.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1001.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1001.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1002.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1002.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1002.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1003.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1003.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1003.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1004.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1004.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1004.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1005.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1005.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1005.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1006.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1006.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1006.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1007.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1007.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1007.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1008.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1008.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1008.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1009.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1009.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1009.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1010.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1010.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1010.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1011.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1011.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1011.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1012.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1012.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1012.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1013.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1013.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1013.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1014.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1014.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1014.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1015.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1015.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1015.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1016.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1016.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1016.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1017.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1017.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1017.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1018.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1018.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1018.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1019.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1019.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/1019.xml Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <param name="password" value="1234"/> </params> <variables> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> </variables> </user> </include> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/brian.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/brian.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/brian.xml Tue Dec 11 12:10:43 2007 @@ -49,7 +49,7 @@ </params> <variables> <!--all variables here will be set on all inbound calls that originate from this user --> - <variable name="inbound_context" value="default"/> + <variable name="user_context" value="default"/> <!-- limit the max number of outgoing calls for this user --> <!--<variable name="max_calls" value="2"/>--> Modified: freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/sipphone.com.noload ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/sipphone.com.noload (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/conf/directory/default/sipphone.com.noload Tue Dec 11 12:10:43 2007 @@ -4,7 +4,7 @@ <user id="%SPUSERNAME%"> <gateways> <gateway name="proxy01.sipphone.com"> - <param name="username" value="%SPUERNAME%"/> + <param name="username" value="%SPUSERNAME%"/> <param name="password" value="%SPPASSWORD%"/> <param name="from-domain" value="proxy01.sipphone.com"/> <param name="caller-id-in-from" value="true"/> Modified: freeswitch/branches/stkn/sofia-exp/trunk/docs/phrase/phrase_en.xml ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/docs/phrase/phrase_en.xml (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/docs/phrase/phrase_en.xml Tue Dec 11 12:10:43 2007 @@ -212,5 +212,21 @@ <prompt phrase="in folder inbox" filename="vm-in_folder.wav"/> <prompt phrase="to return the call now" filename="vm-return_call.wav"/> </voicemail> + <conference> + <prompt phrase="'TONE'" filename="ack.wav" type="tone"/> + <prompt phrase="'TONE'" filename="nack.wav" type="tone"/> + <prompt phrase="The conference is muted." filename="mute.wav"/> + <prompt phrase="The conference is unmuted." filename="unmuted.wav"/> + <prompt phrase="You are currently the only person in this conference." filename="alone.wav"/> + <prompt phrase="'NONE'" filename="perpetual.wav" type="music"/> + <prompt phrase="'NONE'" filename="enter.wav" type="tone"/> + <prompt phrase="'NONE'" filename="exit.wav" type="tone"/> + <prompt phrase="You have been kicked from this conference." filename="kicked.wav"/> + <prompt phrase="This conference is locked." filename="locked.wav"/> + <prompt phrase="The conference is now locked." filename="is-locked.wav"/> + <prompt phrase="The conference is now unlocked." filename="is-unlocked.wav"/> + <prompt phrase="Please enter the conference pin number." filename="pin.wav"/> + <prompt phrase="Invalid pin number, try again." filename="bad-pin.wav"/> + </conference> </en> </language> Modified: freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c Tue Dec 11 12:10:43 2007 @@ -141,7 +141,7 @@ return closesocket(s); } -#if !defined(IPPROTO_IPV6) +#if !defined(IPPROTO_IPV6) && (_WIN32_WINNT < 0x0600) #if HAVE_SIN6 #include <tpipv6.h> #else Modified: freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h Tue Dec 11 12:10:43 2007 @@ -67,7 +67,7 @@ # include <winsock2.h> # include <ws2tcpip.h> # if SU_HAVE_IN6 -# if defined(IPPROTO_IPV6) +# if defined(IPPROTO_IPV6) || (_WIN32_WINNT >= 0x0600) /* case 1: IPv6 defined in winsock2.h/ws2tcpip.h */ # else /* case 2: try to use "IPv6 Tech Preview" */ Modified: freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h Tue Dec 11 12:10:43 2007 @@ -67,6 +67,12 @@ #define MSG_NOSIGNAL (0) #endif +#if (_WIN32_WINNT >= 0x0600) +#ifndef HAVE_MSG_TRUNC +#define HAVE_MSG_TRUNC 1 +#endif +#endif + #if !HAVE_MSG_TRUNC #define MSG_TRUNC (0) #endif Modified: freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c Tue Dec 11 12:10:43 2007 @@ -196,7 +196,7 @@ n = su_sendto(tp->tp_socket, "TEST", 4, 0, - (void *)ai->ai_addr, ai->ai_addrlen); + (void *)ai->ai_addr, (socklen_t)ai->ai_addrlen); if (n != 4) return; Modified: freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/win32/config.h.in ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/win32/config.h.in (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/win32/config.h.in Tue Dec 11 12:10:43 2007 @@ -457,7 +457,13 @@ #define strncasecmp _strnicmp #define snprintf _snprintf + +#ifndef _MSC_VER +#define vsnprintf _vsnprintf +#endif +#if _MSC_VER < 1500 #define vsnprintf _vsnprintf +#endif #define srandom(x) srand((x)) #define random() rand() Modified: freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h Tue Dec 11 12:10:43 2007 @@ -104,7 +104,12 @@ #define snprintf _snprintf #endif #ifndef vsnprintf -#define vsnprintf _vsnprintf +#ifndef _MSC_VER +#define vsnprintf _vsnprintf +#endif +#if _MSC_VER < 1500 +#define vsnprintf _vsnprintf +#endif #endif #define srandom(x) srand((x)) Modified: freeswitch/branches/stkn/sofia-exp/trunk/libs/udns/udns_resolver.c ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/libs/udns/udns_resolver.c (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/libs/udns/udns_resolver.c Tue Dec 11 12:10:43 2007 @@ -44,6 +44,7 @@ # include <iphlpapi.h> /* for dns server addresses etc */ # undef HAVE_POLL #else +#define udns_inet_pton inet_pton # include <sys/types.h> # include <sys/socket.h> # include <netinet/in.h> Modified: freeswitch/branches/stkn/sofia-exp/trunk/src/mod/applications/mod_dptools/mod_dptools.c ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/src/mod/applications/mod_dptools/mod_dptools.c Tue Dec 11 12:10:43 2007 @@ -1441,11 +1441,12 @@ switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session, switch_memory_pool_t **pool) { - switch_xml_t x_domain, xml = NULL, x_user, x_param, x_params; + 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; unsigned int timelimit = 60; + switch_channel_t *new_channel = NULL; user = switch_core_session_strdup(session, outbound_profile->destination_number); @@ -1460,6 +1461,19 @@ goto done; } + if ((x_params = switch_xml_child(x_domain, "params"))) { + for (x_param = switch_xml_child(x_params, "param"); x_param; x_param = x_param->next) { + const char *var = switch_xml_attr(x_param, "name"); + const char *val = switch_xml_attr(x_param, "value"); + + if (!strcasecmp(var, "dial-string")) { + dest = val; + break; + } + + } + } + if ((x_params = switch_xml_child(x_user, "params"))) { for (x_param = switch_xml_child(x_params, "param"); x_param; x_param = x_param->next) { const char *var = switch_xml_attr(x_param, "name"); @@ -1486,13 +1500,14 @@ } 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) { const char *context; switch_caller_profile_t *cp; - switch_channel_t *new_channel = switch_core_session_get_channel(*new_session); + + new_channel = switch_core_session_get_channel(*new_session); - if ((context = switch_channel_get_variable(new_channel, "inbound_context"))) { + if ((context = switch_channel_get_variable(new_channel, "user_context"))) { if ((cp = switch_channel_get_caller_profile(new_channel))) { cp->context = switch_core_strdup(cp->pool, context); } @@ -1506,6 +1521,25 @@ } } + if (new_channel && xml) { + if ((x_params = switch_xml_child(x_domain, "variables"))) { + for (x_param = switch_xml_child(x_params, "variable"); x_param; x_param = x_param->next) { + const char *var = switch_xml_attr(x_param, "name"); + const char *val = switch_xml_attr(x_param, "value"); + switch_channel_set_variable(new_channel, var, val); + } + } + + if ((x_params = switch_xml_child(x_user, "variables"))) { + for (x_param = switch_xml_child(x_params, "variable"); x_param; x_param = x_param->next) { + const char *var = switch_xml_attr(x_param, "name"); + const char *val = switch_xml_attr(x_param, "value"); + switch_channel_set_variable(new_channel, var, val); + } + } + + } + if (xml) { switch_xml_free(xml); } Modified: freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/sofia.c ============================================================================== --- freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/sofia.c (original) +++ freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/sofia.c Tue Dec 11 12:10:43 2007 @@ -2094,7 +2094,7 @@ } if (!context) { - context = switch_channel_get_variable(channel, "inbound_context"); + context = switch_channel_get_variable(channel, "user_context"); } if (!context) {
participants (1)
-
Freeswitch SVN