mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
Merge remote branch 'origin/master' into FS-3432
This commit is contained in:
@@ -1466,6 +1466,8 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
|
||||
switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "ignore_early_media", "true");
|
||||
switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "origination_uuid", "%s", agent_uuid_str);
|
||||
|
||||
switch_channel_process_export(member_channel, NULL, ovars, "cc_export_vars");
|
||||
|
||||
t_agent_called = local_epoch_time_now(NULL);
|
||||
dialstr = switch_mprintf("%s", h->originate_string);
|
||||
status = switch_ivr_originate(NULL, &agent_session, &cause, dialstr, 60, NULL, cid_name ? cid_name : h->member_cid_name, h->member_cid_number, NULL, ovars, SOF_NONE, NULL);
|
||||
@@ -1534,7 +1536,7 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
|
||||
/* Wait for the real channel to be fully bridged */
|
||||
switch_channel_wait_for_flag(other_loopback_channel, CF_BRIDGED, SWITCH_TRUE, 5000, member_channel);
|
||||
|
||||
real_uuid = switch_channel_get_variable(other_loopback_channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
real_uuid = switch_channel_get_partner_uuid(other_loopback_channel);
|
||||
switch_channel_set_variable(other_loopback_channel, "cc_member_pre_answer_uuid", NULL);
|
||||
|
||||
/* Switch the agent session */
|
||||
|
||||
@@ -3439,7 +3439,7 @@ SWITCH_STANDARD_API(break_function)
|
||||
channel = switch_core_session_get_channel(psession);
|
||||
|
||||
if (both) {
|
||||
const char *quuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *quuid = switch_channel_get_partner_uuid(channel);
|
||||
if (quuid && (qsession = switch_core_session_locate(quuid))) {
|
||||
qchannel = switch_core_session_get_channel(qsession);
|
||||
}
|
||||
|
||||
@@ -48,9 +48,23 @@ typedef struct conference_cdr_node_s {
|
||||
char *record_path;
|
||||
switch_time_t join_time;
|
||||
switch_time_t leave_time;
|
||||
uint32_t flags;
|
||||
struct conference_cdr_node_s *next;
|
||||
} conference_cdr_node_t;
|
||||
|
||||
typedef enum {
|
||||
CDRR_LOCKED = 1,
|
||||
CDRR_PIN,
|
||||
CDRR_MAXMEMBERS
|
||||
} cdr_reject_reason_t;
|
||||
|
||||
typedef struct conference_cdr_reject_s {
|
||||
switch_caller_profile_t *cp;
|
||||
switch_time_t reject_time;
|
||||
cdr_reject_reason_t reason;
|
||||
struct conference_cdr_reject_s *next;
|
||||
} conference_cdr_reject_t;
|
||||
|
||||
|
||||
|
||||
typedef enum {
|
||||
@@ -175,7 +189,8 @@ typedef enum {
|
||||
CFLAG_EXIT_SOUND = (1 << 12),
|
||||
CFLAG_ENTER_SOUND = (1 << 13),
|
||||
CFLAG_VIDEO_BRIDGE = (1 << 14),
|
||||
CFLAG_AUDIO_ALWAYS = (1 << 15)
|
||||
CFLAG_AUDIO_ALWAYS = (1 << 15),
|
||||
CFLAG_ENDCONF_FORCED = (1 << 16)
|
||||
} conf_flag_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -332,6 +347,7 @@ typedef struct conference_obj {
|
||||
uint32_t originating;
|
||||
switch_call_cause_t cancel_cause;
|
||||
conference_cdr_node_t *cdr_nodes;
|
||||
conference_cdr_reject_t *cdr_rejected;
|
||||
switch_time_t start_time;
|
||||
switch_time_t end_time;
|
||||
char *log_dir;
|
||||
@@ -505,6 +521,7 @@ static switch_status_t conference_add_event_member_data(conference_member_t *mem
|
||||
static void conference_cdr_del(conference_member_t *member)
|
||||
{
|
||||
member->cdr_node->leave_time = switch_epoch_time_now(NULL);
|
||||
member->cdr_node->flags = member->flags;
|
||||
}
|
||||
|
||||
static void conference_cdr_add(conference_member_t *member)
|
||||
@@ -533,10 +550,30 @@ static void conference_cdr_add(conference_member_t *member)
|
||||
member->cdr_node->cp = switch_caller_profile_dup(member->conference->pool, cp);
|
||||
}
|
||||
|
||||
static void conference_cdr_rejected(conference_obj_t *conference, switch_channel_t *channel, cdr_reject_reason_t reason)
|
||||
{
|
||||
conference_cdr_reject_t *rp;
|
||||
switch_caller_profile_t *cp;
|
||||
|
||||
rp = switch_core_alloc(conference->pool, sizeof(*rp));
|
||||
|
||||
rp->next = conference->cdr_rejected;
|
||||
conference->cdr_rejected = rp;
|
||||
rp->reason = reason;
|
||||
rp->reject_time = switch_epoch_time_now(NULL);
|
||||
|
||||
if (!(cp = switch_channel_get_caller_profile(channel))) {
|
||||
return;
|
||||
}
|
||||
|
||||
rp->cp = switch_caller_profile_dup(conference->pool, cp);
|
||||
}
|
||||
|
||||
static void conference_cdr_render(conference_obj_t *conference)
|
||||
{
|
||||
switch_xml_t cdr, x_ptr, x_member, x_members, x_conference, x_cp;
|
||||
switch_xml_t cdr, x_ptr, x_member, x_members, x_conference, x_cp, x_flags, x_tag, x_rejected, x_attempt;
|
||||
conference_cdr_node_t *np;
|
||||
conference_cdr_reject_t *rp;
|
||||
int cdr_off = 0, conf_off = 0;
|
||||
char str[512];
|
||||
char *path, *xml_text;
|
||||
@@ -544,7 +581,7 @@ static void conference_cdr_render(conference_obj_t *conference)
|
||||
|
||||
if (zstr(conference->log_dir)) return;
|
||||
|
||||
if (!conference->cdr_nodes) return;
|
||||
if (!conference->cdr_nodes && !conference->cdr_rejected) return;
|
||||
|
||||
if (!(cdr = switch_xml_new("cdr"))) {
|
||||
abort();
|
||||
@@ -583,18 +620,20 @@ static void conference_cdr_render(conference_obj_t *conference)
|
||||
if (!(x_ptr = switch_xml_add_child_d(x_conference, "end_time", conf_off++))) {
|
||||
abort();
|
||||
}
|
||||
switch_xml_set_attr_d(x_ptr, "endconf_forced", switch_test_flag(conference, CFLAG_ENDCONF_FORCED) ? "true" : "false");
|
||||
switch_xml_set_attr_d(x_ptr, "type", "UNIX-epoch");
|
||||
switch_snprintf(str, sizeof(str), "%ld", (long)conference->end_time);
|
||||
switch_xml_set_txt_d(x_ptr, str);
|
||||
|
||||
|
||||
|
||||
if (!(x_members = switch_xml_add_child_d(x_conference, "members", conf_off++))) {
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
for (np = conference->cdr_nodes; np; np = np->next) {
|
||||
int member_off = 0;
|
||||
int flag_off = 0;
|
||||
|
||||
|
||||
if (!(x_member = switch_xml_add_child_d(x_members, "member", conf_off++))) {
|
||||
@@ -619,6 +658,18 @@ static void conference_cdr_render(conference_obj_t *conference)
|
||||
switch_xml_set_txt_d(x_ptr, str);
|
||||
|
||||
if (np->cp) {
|
||||
x_flags = switch_xml_add_child_d(x_member, "flags", member_off++);
|
||||
switch_assert(x_flags);
|
||||
|
||||
x_tag = switch_xml_add_child_d(x_flags, "is_moderator", flag_off++);
|
||||
switch_xml_set_txt_d(x_tag, switch_test_flag(np, MFLAG_MOD) ? "true" : "false");
|
||||
|
||||
x_tag = switch_xml_add_child_d(x_flags, "end_conference", flag_off++);
|
||||
switch_xml_set_txt_d(x_tag, switch_test_flag(np, MFLAG_ENDCONF) ? "true" : "false");
|
||||
|
||||
x_tag = switch_xml_add_child_d(x_flags, "was_kicked", flag_off++);
|
||||
switch_xml_set_txt_d(x_tag, switch_test_flag(np, MFLAG_KICKED) ? "true" : "false");
|
||||
|
||||
if (!(x_cp = switch_xml_add_child_d(x_member, "caller_profile", member_off++))) {
|
||||
abort();
|
||||
}
|
||||
@@ -631,8 +682,47 @@ static void conference_cdr_render(conference_obj_t *conference)
|
||||
}
|
||||
switch_xml_set_txt_d(x_ptr, np->record_path);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!(x_rejected = switch_xml_add_child_d(x_conference, "rejected", conf_off++))) {
|
||||
abort();
|
||||
}
|
||||
|
||||
for (rp = conference->cdr_rejected; rp; rp = rp->next) {
|
||||
int attempt_off = 0;
|
||||
int tag_off = 0;
|
||||
|
||||
if (!(x_attempt = switch_xml_add_child_d(x_rejected, "attempt", attempt_off++))) {
|
||||
abort();
|
||||
}
|
||||
|
||||
if (!(x_ptr = switch_xml_add_child_d(x_attempt, "reason", tag_off++))) {
|
||||
abort();
|
||||
}
|
||||
if (rp->reason == CDRR_LOCKED) {
|
||||
switch_xml_set_txt_d(x_ptr, "conference_locked");
|
||||
} else if (rp->reason == CDRR_MAXMEMBERS) {
|
||||
switch_xml_set_txt_d(x_ptr, "max_members_reached");
|
||||
} else if (rp->reason == CDRR_PIN) {
|
||||
switch_xml_set_txt_d(x_ptr, "invalid_pin");
|
||||
}
|
||||
|
||||
if (!(x_ptr = switch_xml_add_child_d(x_attempt, "reject_time", tag_off++))) {
|
||||
abort();
|
||||
}
|
||||
switch_xml_set_attr_d(x_ptr, "type", "UNIX-epoch");
|
||||
switch_snprintf(str, sizeof(str), "%ld", (long) rp->reject_time);
|
||||
switch_xml_set_txt_d(x_ptr, str);
|
||||
|
||||
if (rp->cp) {
|
||||
if (!(x_cp = switch_xml_add_child_d(x_attempt, "caller_profile", attempt_off++))) {
|
||||
abort();
|
||||
}
|
||||
switch_ivr_set_xml_profile_data(x_cp, rp->cp, 0);
|
||||
}
|
||||
}
|
||||
|
||||
xml_text = switch_xml_toxml(cdr, SWITCH_TRUE);
|
||||
|
||||
@@ -1343,7 +1433,14 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
|
||||
want_refresh = 0;
|
||||
|
||||
for (imember = conference->members; imember; imember = imember->next) {
|
||||
switch_channel_t *ichannel = switch_core_session_get_channel(imember->session);
|
||||
switch_core_session_t *isession = imember->session;
|
||||
switch_channel_t *ichannel;
|
||||
|
||||
if (!isession || !switch_core_session_read_lock(isession)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ichannel = switch_core_session_get_channel(imember->session);
|
||||
|
||||
if (switch_channel_test_flag(ichannel, CF_VIDEO_REFRESH_REQ)) {
|
||||
want_refresh++;
|
||||
@@ -1354,6 +1451,8 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
|
||||
has_vid++;
|
||||
switch_core_session_write_video_frame(imember->session, vid_frame, SWITCH_IO_FLAG_NONE, 0);
|
||||
}
|
||||
|
||||
switch_core_session_rwunlock(isession);
|
||||
}
|
||||
|
||||
if (want_refresh) {
|
||||
@@ -1835,7 +1934,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
|
||||
switch_epoch_time_now(NULL) - conference->endconf_time > conference->endconf_grace_time) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Conference %s: endconf grace time exceeded (%u)\n",
|
||||
conference->name, conference->endconf_grace_time);
|
||||
switch_set_flag(conference, CFLAG_DESTRUCT);
|
||||
switch_set_flag(conference, CFLAG_DESTRUCT | CFLAG_ENDCONF_FORCED);
|
||||
}
|
||||
|
||||
switch_mutex_unlock(conference->mutex);
|
||||
@@ -4595,6 +4694,7 @@ static void conference_xlist(conference_obj_t *conference, switch_xml_t x_confer
|
||||
|
||||
x_member = switch_xml_add_child_d(x_members, "member", moff++);
|
||||
switch_assert(x_member);
|
||||
switch_xml_set_attr_d(x_member, "type", "caller");
|
||||
|
||||
switch_snprintf(i, sizeof(i), "%d", member->id);
|
||||
|
||||
@@ -6616,6 +6716,7 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
}
|
||||
|
||||
if (!pin_valid) {
|
||||
conference_cdr_rejected(conference, channel, CDRR_PIN);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@@ -6627,6 +6728,7 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
/* don't allow more callers if the conference is locked, unless we invited them */
|
||||
if (switch_test_flag(conference, CFLAG_LOCKED) && enforce_security) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Conference %s is locked.\n", conf_name);
|
||||
conference_cdr_rejected(conference, channel, CDRR_LOCKED);
|
||||
if (conference->locked_sound) {
|
||||
/* Answer the channel */
|
||||
switch_channel_answer(channel);
|
||||
@@ -6641,6 +6743,7 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
*/
|
||||
if ((conference->max_members > 0) && (conference->count >= conference->max_members)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Conference %s is full.\n", conf_name);
|
||||
conference_cdr_rejected(conference, channel, CDRR_MAXMEMBERS);
|
||||
if (conference->maxmember_sound) {
|
||||
/* Answer the channel */
|
||||
switch_channel_answer(channel);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* Bret McDanel <trixter AT 0xdecafbad dot com>
|
||||
* Luke Dashjr <luke@openmethods.com> (OpenMethods, LLC)
|
||||
* Cesar Cepeda <cesar@auronix.com>
|
||||
* Chris Rienzo <chris@rienzo.net>
|
||||
* Christopher M. Rienzo <chris@rienzo.com>
|
||||
*
|
||||
* mod_dptools.c -- Raw Audio File Streaming Application Module
|
||||
*
|
||||
@@ -974,7 +974,7 @@ SWITCH_STANDARD_APP(transfer_function)
|
||||
if (bleg || both) {
|
||||
const char *uuid;
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid(channel))) {
|
||||
switch_core_session_t *b_session;
|
||||
if ((b_session = switch_core_session_locate(uuid))) {
|
||||
switch_ivr_session_transfer(b_session, argv[1], argv[2], argv[3]);
|
||||
@@ -2149,7 +2149,7 @@ SWITCH_STANDARD_APP(att_xfer_function)
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
|
||||
if ((bond = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
|
||||
if ((bond = switch_channel_get_partner_uuid(channel))) {
|
||||
bond = switch_core_session_strdup(session, bond);
|
||||
}
|
||||
|
||||
@@ -3570,13 +3570,8 @@ SWITCH_STANDARD_APP(pickup_function)
|
||||
caller_profile->callee_id_number = num;
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CALL_UPDATE) == SWITCH_STATUS_SUCCESS) {
|
||||
const char *uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *uuid = switch_channel_get_partner_uuid(channel);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Direction", "RECV");
|
||||
|
||||
if (!uuid) {
|
||||
uuid = switch_channel_get_variable(channel, "originate_signal_bond");
|
||||
}
|
||||
|
||||
|
||||
if (uuid) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridged-To", uuid);
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_fax
|
||||
|
||||
TIFF_DIR=$(switch_srcdir)/libs/tiff-3.8.2
|
||||
TIFF_BUILDDIR=$(switch_builddir)/libs/tiff-3.8.2
|
||||
TIFF_LA=$(TIFF_BUILDDIR)/libtiff/libtiff.la
|
||||
|
||||
SPANDSP_DIR=$(switch_srcdir)/libs/spandsp
|
||||
SPANDSP_BUILDDIR=$(switch_builddir)/libs/spandsp
|
||||
SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
|
||||
|
||||
mod_LTLIBRARIES = mod_fax.la
|
||||
mod_fax_la_SOURCES = mod_fax.c udptl.c
|
||||
mod_fax_la_CFLAGS = $(AM_CFLAGS) -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I.
|
||||
mod_fax_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TIFF_LA)
|
||||
mod_fax_la_LDFLAGS = -avoid-version -module -no-undefined -shared -ljpeg
|
||||
|
||||
$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
|
||||
cd $(SPANDSP_BUILDDIR) && $(MAKE) -j1
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
|
||||
cd $(TIFF_BUILDDIR) && $(MAKE) -j1
|
||||
$(TOUCH_TARGET)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,563 +0,0 @@
|
||||
//#define UDPTL_DEBUG
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2009, Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* udptl.c -- UDPTL handling for T.38
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "udptl.h"
|
||||
|
||||
#define FALSE 0
|
||||
#define TRUE (!FALSE)
|
||||
|
||||
static int decode_length(const uint8_t *buf, int limit, int *len, int *pvalue)
|
||||
{
|
||||
if (*len >= limit)
|
||||
return -1;
|
||||
if ((buf[*len] & 0x80) == 0) {
|
||||
*pvalue = buf[(*len)++];
|
||||
return 0;
|
||||
}
|
||||
if ((buf[*len] & 0x40) == 0) {
|
||||
if (*len >= limit - 1)
|
||||
return -1;
|
||||
*pvalue = (buf[(*len)++] & 0x3F) << 8;
|
||||
*pvalue |= buf[(*len)++];
|
||||
return 0;
|
||||
}
|
||||
*pvalue = (buf[(*len)++] & 0x3F) << 14;
|
||||
/* Indicate we have a fragment */
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int decode_open_type(const uint8_t *buf, int limit, int *len, const uint8_t ** p_object, int *p_num_octets)
|
||||
{
|
||||
int octet_cnt;
|
||||
int octet_idx;
|
||||
int stat;
|
||||
int i;
|
||||
const uint8_t **pbuf;
|
||||
|
||||
for (octet_idx = 0, *p_num_octets = 0;; octet_idx += octet_cnt) {
|
||||
if ((stat = decode_length(buf, limit, len, &octet_cnt)) < 0)
|
||||
return -1;
|
||||
if (octet_cnt > 0) {
|
||||
*p_num_octets += octet_cnt;
|
||||
|
||||
pbuf = &p_object[octet_idx];
|
||||
i = 0;
|
||||
/* Make sure the buffer contains at least the number of bits requested */
|
||||
if ((*len + octet_cnt) > limit)
|
||||
return -1;
|
||||
|
||||
*pbuf = &buf[*len];
|
||||
*len += octet_cnt;
|
||||
}
|
||||
if (stat == 0)
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int encode_length(uint8_t *buf, int *len, int value)
|
||||
{
|
||||
int multiplier;
|
||||
|
||||
if (value < 0x80) {
|
||||
/* 1 octet */
|
||||
buf[(*len)++] = value;
|
||||
return value;
|
||||
}
|
||||
if (value < 0x4000) {
|
||||
/* 2 octets */
|
||||
/* Set the first bit of the first octet */
|
||||
buf[(*len)++] = ((0x8000 | value) >> 8) & 0xFF;
|
||||
buf[(*len)++] = value & 0xFF;
|
||||
return value;
|
||||
}
|
||||
/* Fragmentation */
|
||||
multiplier = (value < 0x10000) ? (value >> 14) : 4;
|
||||
/* Set the first 2 bits of the octet */
|
||||
buf[(*len)++] = 0xC0 | multiplier;
|
||||
return multiplier << 14;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int encode_open_type(uint8_t *buf, int *len, const uint8_t *data, int num_octets)
|
||||
{
|
||||
int enclen;
|
||||
int octet_idx;
|
||||
uint8_t zero_byte;
|
||||
|
||||
/* If open type is of zero length, add a single zero byte (10.1) */
|
||||
if (num_octets == 0) {
|
||||
zero_byte = 0;
|
||||
data = &zero_byte;
|
||||
num_octets = 1;
|
||||
}
|
||||
/* Encode the open type */
|
||||
for (octet_idx = 0;; num_octets -= enclen, octet_idx += enclen) {
|
||||
if ((enclen = encode_length(buf, len, num_octets)) < 0)
|
||||
return -1;
|
||||
if (enclen > 0) {
|
||||
memcpy(&buf[*len], &data[octet_idx], enclen);
|
||||
*len += enclen;
|
||||
}
|
||||
if (enclen >= num_octets)
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len)
|
||||
{
|
||||
int stat;
|
||||
int stat2;
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
int l;
|
||||
int m;
|
||||
int x;
|
||||
int limit;
|
||||
int which;
|
||||
int ptr;
|
||||
int count;
|
||||
int total_count;
|
||||
int seq_no;
|
||||
const uint8_t *msg;
|
||||
const uint8_t *data;
|
||||
int msg_len;
|
||||
int repaired[16];
|
||||
const uint8_t *bufs[16];
|
||||
int lengths[16];
|
||||
int span;
|
||||
int entries;
|
||||
|
||||
ptr = 0;
|
||||
/* Decode seq_number */
|
||||
if (ptr + 2 > len)
|
||||
return -1;
|
||||
seq_no = (buf[0] << 8) | buf[1];
|
||||
ptr += 2;
|
||||
/* Break out the primary packet */
|
||||
if ((stat = decode_open_type(buf, len, &ptr, &msg, &msg_len)) != 0)
|
||||
return -1;
|
||||
/* Decode error_recovery */
|
||||
if (ptr + 1 > len)
|
||||
return -1;
|
||||
/* Our buffers cannot tolerate overlength packets */
|
||||
if (msg_len > LOCAL_FAX_MAX_DATAGRAM)
|
||||
return -1;
|
||||
/* Update any missed slots in the buffer */
|
||||
for (i = s->rx_seq_no; seq_no > i; i++) {
|
||||
x = i & UDPTL_BUF_MASK;
|
||||
s->rx[x].buf_len = -1;
|
||||
s->rx[x].fec_len[0] = 0;
|
||||
s->rx[x].fec_span = 0;
|
||||
s->rx[x].fec_entries = 0;
|
||||
}
|
||||
/* Save the new packet. Pure redundancy mode won't use this, but some systems will switch
|
||||
into FEC mode after sending some redundant packets. */
|
||||
x = seq_no & UDPTL_BUF_MASK;
|
||||
memcpy(s->rx[x].buf, msg, msg_len);
|
||||
s->rx[x].buf_len = msg_len;
|
||||
s->rx[x].fec_len[0] = 0;
|
||||
s->rx[x].fec_span = 0;
|
||||
s->rx[x].fec_entries = 0;
|
||||
if ((buf[ptr++] & 0x80) == 0) {
|
||||
/* Secondary packet mode for error recovery */
|
||||
/* We might have the packet we want, but we need to check through
|
||||
the redundant stuff, and verify the integrity of the UDPTL.
|
||||
This greatly reduces our chances of accepting garbage. */
|
||||
total_count = 0;
|
||||
do {
|
||||
if ((stat2 = decode_length(buf, len, &ptr, &count)) < 0)
|
||||
return -1;
|
||||
for (i = 0; i < count; i++) {
|
||||
if ((stat = decode_open_type(buf, len, &ptr, &bufs[total_count + i], &lengths[total_count + i])) != 0)
|
||||
return -1;
|
||||
}
|
||||
total_count += count;
|
||||
}
|
||||
while (stat2 > 0);
|
||||
/* We should now be exactly at the end of the packet. If not, this is a fault. */
|
||||
if (ptr != len)
|
||||
return -1;
|
||||
if (seq_no > s->rx_seq_no) {
|
||||
/* We received a later packet than we expected, so we need to check if we can fill in the gap from the
|
||||
secondary packets. */
|
||||
/* Step through in reverse order, so we go oldest to newest */
|
||||
for (i = total_count; i > 0; i--) {
|
||||
if (seq_no - i >= s->rx_seq_no) {
|
||||
/* This one wasn't seen before */
|
||||
/* Decode the secondary packet */
|
||||
#if defined(UDPTL_DEBUG)
|
||||
fprintf(stderr, "Secondary %d, len %d\n", seq_no - i, lengths[i - 1]);
|
||||
#endif
|
||||
/* Save the new packet. Redundancy mode won't use this, but some systems will switch into
|
||||
FEC mode after sending some redundant packets, and this may then be important. */
|
||||
x = (seq_no - i) & UDPTL_BUF_MASK;
|
||||
memcpy(s->rx[x].buf, bufs[i - 1], lengths[i - 1]);
|
||||
s->rx[x].buf_len = lengths[i - 1];
|
||||
s->rx[x].fec_len[0] = 0;
|
||||
s->rx[x].fec_span = 0;
|
||||
s->rx[x].fec_entries = 0;
|
||||
if (s->rx_packet_handler(s->user_data, bufs[i - 1], lengths[i - 1], seq_no - i) < 0)
|
||||
fprintf(stderr, "Bad IFP\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* FEC mode for error recovery */
|
||||
|
||||
/* Decode the FEC packets */
|
||||
/* The span is defined as an unconstrained integer, but will never be more
|
||||
than a small value. */
|
||||
if (ptr + 2 > len)
|
||||
return -1;
|
||||
if (buf[ptr++] != 1)
|
||||
return -1;
|
||||
span = buf[ptr++];
|
||||
|
||||
x = seq_no & UDPTL_BUF_MASK;
|
||||
|
||||
s->rx[x].fec_span = span;
|
||||
|
||||
memset(repaired, 0, sizeof(repaired));
|
||||
repaired[x] = TRUE;
|
||||
|
||||
/* The number of entries is defined as a length, but will only ever be a small
|
||||
value. Treat it as such. */
|
||||
if (ptr + 1 > len)
|
||||
return -1;
|
||||
entries = buf[ptr++];
|
||||
s->rx[x].fec_entries = entries;
|
||||
|
||||
/* Decode the elements */
|
||||
for (i = 0; i < entries; i++) {
|
||||
if ((stat = decode_open_type(buf, len, &ptr, &data, &s->rx[x].fec_len[i])) != 0)
|
||||
return -1;
|
||||
if (s->rx[x].fec_len[i] > LOCAL_FAX_MAX_DATAGRAM)
|
||||
return -1;
|
||||
|
||||
/* Save the new FEC data */
|
||||
memcpy(s->rx[x].fec[i], data, s->rx[x].fec_len[i]);
|
||||
#if 0
|
||||
fprintf(stderr, "FEC: ");
|
||||
for (j = 0; j < s->rx[x].fec_len[i]; j++)
|
||||
fprintf(stderr, "%02X ", data[j]);
|
||||
fprintf(stderr, "\n");
|
||||
#endif
|
||||
}
|
||||
/* We should now be exactly at the end of the packet. If not, this is a fault. */
|
||||
if (ptr != len)
|
||||
return -1;
|
||||
/* See if we can reconstruct anything which is missing */
|
||||
/* TODO: this does not comprehensively hunt back and repair everything that is possible */
|
||||
for (l = x; l != ((x - (16 - span * entries)) & UDPTL_BUF_MASK); l = (l - 1) & UDPTL_BUF_MASK) {
|
||||
if (s->rx[l].fec_len[0] <= 0)
|
||||
continue;
|
||||
for (m = 0; m < s->rx[l].fec_entries; m++) {
|
||||
limit = (l + m) & UDPTL_BUF_MASK;
|
||||
for (which = -1, k = (limit - s->rx[l].fec_span * s->rx[l].fec_entries) & UDPTL_BUF_MASK; k != limit;
|
||||
k = (k + s->rx[l].fec_entries) & UDPTL_BUF_MASK) {
|
||||
if (s->rx[k].buf_len <= 0)
|
||||
which = (which == -1) ? k : -2;
|
||||
}
|
||||
if (which >= 0) {
|
||||
/* Repairable */
|
||||
for (j = 0; j < s->rx[l].fec_len[m]; j++) {
|
||||
s->rx[which].buf[j] = s->rx[l].fec[m][j];
|
||||
for (k = (limit - s->rx[l].fec_span * s->rx[l].fec_entries) & UDPTL_BUF_MASK; k != limit;
|
||||
k = (k + s->rx[l].fec_entries) & UDPTL_BUF_MASK)
|
||||
s->rx[which].buf[j] ^= (s->rx[k].buf_len > j) ? s->rx[k].buf[j] : 0;
|
||||
}
|
||||
s->rx[which].buf_len = s->rx[l].fec_len[m];
|
||||
repaired[which] = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Now play any new packets forwards in time */
|
||||
for (l = (x + 1) & UDPTL_BUF_MASK, j = seq_no - UDPTL_BUF_MASK; l != x; l = (l + 1) & UDPTL_BUF_MASK, j++) {
|
||||
if (repaired[l]) {
|
||||
#if defined(UDPTL_DEBUG)
|
||||
fprintf(stderr, "Fixed packet %d, len %d\n", j, l);
|
||||
#endif
|
||||
if (s->rx_packet_handler(s->user_data, s->rx[l].buf, s->rx[l].buf_len, j) < 0)
|
||||
fprintf(stderr, "Bad IFP\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
/* If packets are received out of sequence, we may have already processed this packet from the error
|
||||
recovery information in a packet already received. */
|
||||
if (seq_no >= s->rx_seq_no) {
|
||||
/* Decode the primary packet */
|
||||
#if defined(UDPTL_DEBUG)
|
||||
fprintf(stderr, "Primary packet %d, len %d\n", seq_no, msg_len);
|
||||
#endif
|
||||
if (s->rx_packet_handler(s->user_data, msg, msg_len, seq_no) < 0)
|
||||
fprintf(stderr, "Bad IFP\n");
|
||||
}
|
||||
|
||||
s->rx_seq_no = (seq_no + 1) & 0xFFFF;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int udptl_build_packet(udptl_state_t *s, uint8_t buf[], const uint8_t msg[], int msg_len)
|
||||
{
|
||||
uint8_t fec[LOCAL_FAX_MAX_DATAGRAM];
|
||||
int i;
|
||||
int j;
|
||||
int seq;
|
||||
int entry;
|
||||
int entries;
|
||||
int span;
|
||||
int m;
|
||||
int len;
|
||||
int limit;
|
||||
int high_tide;
|
||||
|
||||
/* UDPTL cannot cope with zero length messages, and our buffering for redundancy limits their
|
||||
maximum length. */
|
||||
if (msg_len < 1 || msg_len > LOCAL_FAX_MAX_DATAGRAM)
|
||||
return -1;
|
||||
seq = s->tx_seq_no & 0xFFFF;
|
||||
|
||||
/* Map the sequence number to an entry in the circular buffer */
|
||||
entry = seq & UDPTL_BUF_MASK;
|
||||
|
||||
/* We save the message in a circular buffer, for generating FEC or
|
||||
redundancy sets later on. */
|
||||
s->tx[entry].buf_len = msg_len;
|
||||
memcpy(s->tx[entry].buf, msg, msg_len);
|
||||
|
||||
/* Build the UDPTL packet */
|
||||
|
||||
len = 0;
|
||||
/* Encode the sequence number */
|
||||
buf[len++] = (seq >> 8) & 0xFF;
|
||||
buf[len++] = seq & 0xFF;
|
||||
|
||||
/* Encode the primary packet */
|
||||
if (encode_open_type(buf, &len, msg, msg_len) < 0)
|
||||
return -1;
|
||||
|
||||
/* Encode the appropriate type of error recovery information */
|
||||
switch (s->error_correction_scheme) {
|
||||
case UDPTL_ERROR_CORRECTION_NONE:
|
||||
/* Encode the error recovery type */
|
||||
buf[len++] = 0x00;
|
||||
/* The number of entries will always be zero, so it is pointless allowing
|
||||
for the fragmented case here. */
|
||||
if (encode_length(buf, &len, 0) < 0)
|
||||
return -1;
|
||||
break;
|
||||
case UDPTL_ERROR_CORRECTION_REDUNDANCY:
|
||||
/* Encode the error recovery type */
|
||||
buf[len++] = 0x00;
|
||||
if (s->tx_seq_no > s->error_correction_entries)
|
||||
entries = s->error_correction_entries;
|
||||
else
|
||||
entries = s->tx_seq_no;
|
||||
/* The number of entries will always be small, so it is pointless allowing
|
||||
for the fragmented case here. */
|
||||
if (encode_length(buf, &len, entries) < 0)
|
||||
return -1;
|
||||
/* Encode the elements */
|
||||
for (i = 0; i < entries; i++) {
|
||||
j = (entry - i - 1) & UDPTL_BUF_MASK;
|
||||
if (encode_open_type(buf, &len, s->tx[j].buf, s->tx[j].buf_len) < 0)
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case UDPTL_ERROR_CORRECTION_FEC:
|
||||
span = s->error_correction_span;
|
||||
entries = s->error_correction_entries;
|
||||
if (seq < s->error_correction_span * s->error_correction_entries) {
|
||||
/* In the initial stages, wind up the FEC smoothly */
|
||||
entries = seq / s->error_correction_span;
|
||||
if (seq < s->error_correction_span)
|
||||
span = 0;
|
||||
}
|
||||
/* Encode the error recovery type */
|
||||
buf[len++] = 0x80;
|
||||
/* Span is defined as an inconstrained integer, which it dumb. It will only
|
||||
ever be a small value. Treat it as such. */
|
||||
buf[len++] = 1;
|
||||
buf[len++] = span;
|
||||
/* The number of entries is defined as a length, but will only ever be a small
|
||||
value. Treat it as such. */
|
||||
buf[len++] = entries;
|
||||
for (m = 0; m < entries; m++) {
|
||||
/* Make an XOR'ed entry the maximum length */
|
||||
limit = (entry + m) & UDPTL_BUF_MASK;
|
||||
high_tide = 0;
|
||||
for (i = (limit - span * entries) & UDPTL_BUF_MASK; i != limit; i = (i + entries) & UDPTL_BUF_MASK) {
|
||||
if (high_tide < s->tx[i].buf_len) {
|
||||
for (j = 0; j < high_tide; j++)
|
||||
fec[j] ^= s->tx[i].buf[j];
|
||||
for (; j < s->tx[i].buf_len; j++)
|
||||
fec[j] = s->tx[i].buf[j];
|
||||
high_tide = s->tx[i].buf_len;
|
||||
} else {
|
||||
for (j = 0; j < s->tx[i].buf_len; j++)
|
||||
fec[j] ^= s->tx[i].buf[j];
|
||||
}
|
||||
}
|
||||
if (encode_open_type(buf, &len, fec, high_tide) < 0)
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (s->verbose)
|
||||
fprintf(stderr, "\n");
|
||||
s->tx_seq_no++;
|
||||
return len;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int udptl_set_error_correction(udptl_state_t *s, int ec_scheme, int span, int entries)
|
||||
{
|
||||
switch (ec_scheme) {
|
||||
case UDPTL_ERROR_CORRECTION_FEC:
|
||||
case UDPTL_ERROR_CORRECTION_REDUNDANCY:
|
||||
case UDPTL_ERROR_CORRECTION_NONE:
|
||||
s->error_correction_scheme = ec_scheme;
|
||||
break;
|
||||
case -1:
|
||||
/* Just don't change the scheme */
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
if (span >= 0)
|
||||
s->error_correction_span = span;
|
||||
if (entries >= 0)
|
||||
s->error_correction_entries = entries;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int udptl_get_error_correction(udptl_state_t *s, int *ec_scheme, int *span, int *entries)
|
||||
{
|
||||
if (ec_scheme)
|
||||
*ec_scheme = s->error_correction_scheme;
|
||||
if (span)
|
||||
*span = s->error_correction_span;
|
||||
if (entries)
|
||||
*entries = s->error_correction_entries;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int udptl_set_local_max_datagram(udptl_state_t *s, int max_datagram)
|
||||
{
|
||||
s->local_max_datagram_size = max_datagram;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int udptl_get_local_max_datagram(udptl_state_t *s)
|
||||
{
|
||||
return s->local_max_datagram_size;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int udptl_set_far_max_datagram(udptl_state_t *s, int max_datagram)
|
||||
{
|
||||
s->far_max_datagram_size = max_datagram;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int udptl_get_far_max_datagram(udptl_state_t *s)
|
||||
{
|
||||
return s->far_max_datagram_size;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
udptl_state_t *udptl_init(udptl_state_t *s, int ec_scheme, int span, int entries, udptl_rx_packet_handler_t rx_packet_handler, void *user_data)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (rx_packet_handler == NULL)
|
||||
return NULL;
|
||||
|
||||
if (s == NULL) {
|
||||
if ((s = (udptl_state_t *) malloc(sizeof(*s))) == NULL)
|
||||
return NULL;
|
||||
}
|
||||
memset(s, 0, sizeof(*s));
|
||||
|
||||
s->error_correction_scheme = ec_scheme;
|
||||
s->error_correction_span = span;
|
||||
s->error_correction_entries = entries;
|
||||
|
||||
s->far_max_datagram_size = LOCAL_FAX_MAX_DATAGRAM;
|
||||
s->local_max_datagram_size = LOCAL_FAX_MAX_DATAGRAM;
|
||||
|
||||
memset(&s->rx, 0, sizeof(s->rx));
|
||||
memset(&s->tx, 0, sizeof(s->tx));
|
||||
for (i = 0; i <= UDPTL_BUF_MASK; i++) {
|
||||
s->rx[i].buf_len = -1;
|
||||
s->tx[i].buf_len = -1;
|
||||
}
|
||||
|
||||
s->rx_packet_handler = rx_packet_handler;
|
||||
s->user_data = user_data;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int udptl_release(udptl_state_t *s)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
||||
@@ -1,153 +0,0 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2009, Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* udptl.h -- UDPTL handling for T.38
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(FREESWITCH_UDPTL_H)
|
||||
#define FREESWITCH_UDPTL_H
|
||||
|
||||
#define LOCAL_FAX_MAX_DATAGRAM 400
|
||||
#define LOCAL_FAX_MAX_FEC_PACKETS 5
|
||||
|
||||
#define UDPTL_BUF_MASK 15
|
||||
|
||||
typedef int (udptl_rx_packet_handler_t) (void *user_data, const uint8_t msg[], int len, int seq_no);
|
||||
|
||||
typedef struct {
|
||||
int buf_len;
|
||||
uint8_t buf[LOCAL_FAX_MAX_DATAGRAM];
|
||||
} udptl_fec_tx_buffer_t;
|
||||
|
||||
typedef struct {
|
||||
int buf_len;
|
||||
uint8_t buf[LOCAL_FAX_MAX_DATAGRAM];
|
||||
int fec_len[LOCAL_FAX_MAX_FEC_PACKETS];
|
||||
uint8_t fec[LOCAL_FAX_MAX_FEC_PACKETS][LOCAL_FAX_MAX_DATAGRAM];
|
||||
int fec_span;
|
||||
int fec_entries;
|
||||
} udptl_fec_rx_buffer_t;
|
||||
|
||||
struct udptl_state_s {
|
||||
udptl_rx_packet_handler_t *rx_packet_handler;
|
||||
void *user_data;
|
||||
|
||||
/*! This option indicates the error correction scheme used in transmitted UDPTL
|
||||
packets. */
|
||||
int error_correction_scheme;
|
||||
|
||||
/*! This option indicates the number of error correction entries transmitted in
|
||||
UDPTL packets. */
|
||||
int error_correction_entries;
|
||||
|
||||
/*! This option indicates the span of the error correction entries in transmitted
|
||||
UDPTL packets (FEC only). */
|
||||
int error_correction_span;
|
||||
|
||||
/*! This option indicates the maximum size of a datagram that can be accepted by
|
||||
the remote device. */
|
||||
int far_max_datagram_size;
|
||||
|
||||
/*! This option indicates the maximum size of a datagram that we are prepared to
|
||||
accept. */
|
||||
int local_max_datagram_size;
|
||||
|
||||
int verbose;
|
||||
|
||||
int tx_seq_no;
|
||||
int rx_seq_no;
|
||||
int rx_expected_seq_no;
|
||||
|
||||
udptl_fec_tx_buffer_t tx[UDPTL_BUF_MASK + 1];
|
||||
udptl_fec_rx_buffer_t rx[UDPTL_BUF_MASK + 1];
|
||||
};
|
||||
|
||||
enum {
|
||||
UDPTL_ERROR_CORRECTION_NONE,
|
||||
UDPTL_ERROR_CORRECTION_FEC,
|
||||
UDPTL_ERROR_CORRECTION_REDUNDANCY
|
||||
};
|
||||
|
||||
typedef struct udptl_state_s udptl_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*! \brief Process an arriving UDPTL packet.
|
||||
\param s The UDPTL context.
|
||||
\param buf The UDPTL packet buffer.
|
||||
\param len The length of the packet.
|
||||
\return 0 for OK. */
|
||||
int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len);
|
||||
|
||||
/*! \brief Construct a UDPTL packet, ready for transmission.
|
||||
\param s The UDPTL context.
|
||||
\param buf The UDPTL packet buffer.
|
||||
\param msg The primary packet.
|
||||
\param len The length of the primary packet.
|
||||
\return The length of the constructed UDPTL packet. */
|
||||
int udptl_build_packet(udptl_state_t *s, uint8_t buf[], const uint8_t msg[], int msg_len);
|
||||
|
||||
/*! \brief Change the error correction settings of a UDPTL context.
|
||||
\param s The UDPTL context.
|
||||
\param ec_scheme One of the optional error correction schemes.
|
||||
\param span The packet span over which error correction should be applied.
|
||||
\param entries The number of error correction entries to include in packets.
|
||||
\return 0 for OK. */
|
||||
int udptl_set_error_correction(udptl_state_t *s, int ec_scheme, int span, int entries);
|
||||
|
||||
/*! \brief Check the error correction settings of a UDPTL context.
|
||||
\param s The UDPTL context.
|
||||
\param ec_scheme One of the optional error correction schemes.
|
||||
\param span The packet span over which error correction is being applied.
|
||||
\param entries The number of error correction being included in packets.
|
||||
\return 0 for OK. */
|
||||
int udptl_get_error_correction(udptl_state_t *s, int *ec_scheme, int *span, int *entries);
|
||||
|
||||
int udptl_set_local_max_datagram(udptl_state_t *s, int max_datagram);
|
||||
|
||||
int udptl_get_local_max_datagram(udptl_state_t *s);
|
||||
|
||||
int udptl_set_far_max_datagram(udptl_state_t *s, int max_datagram);
|
||||
|
||||
int udptl_get_far_max_datagram(udptl_state_t *s);
|
||||
|
||||
/*! \brief Initialise a UDPTL context.
|
||||
\param s The UDPTL context.
|
||||
\param ec_scheme One of the optional error correction schemes.
|
||||
\param span The packet span over which error correction should be applied.
|
||||
\param entries The number of error correction entries to include in packets.
|
||||
\param rx_packet_handler The callback function, used to report arriving IFP packets.
|
||||
\param user_data An opaque pointer supplied to rx_packet_handler.
|
||||
\return A pointer to the UDPTL context, or NULL if there was a problem. */
|
||||
udptl_state_t *udptl_init(udptl_state_t *s, int ec_scheme, int span, int entries, udptl_rx_packet_handler_t rx_packet_handler, void *user_data);
|
||||
|
||||
/*! \brief Release a UDPTL context.
|
||||
\param s The UDPTL context.
|
||||
\return 0 for OK. */
|
||||
int udptl_release(udptl_state_t *s);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
||||
@@ -23,7 +23,9 @@
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Chris Rienzo <chris@rienzo.net>
|
||||
* Christopher M. Rienzo <chris@rienzo.com>
|
||||
*
|
||||
* Maintainer: Christopher M. Rienzo <chris@rienzo.com>
|
||||
*
|
||||
* mod_http_cache.c -- HTTP GET with caching
|
||||
* -- designed for downloading audio files from a webserver for playback
|
||||
|
||||
@@ -287,7 +287,7 @@ static void transfer_call(switch_core_session_t *session, char *destination)
|
||||
switch_separate_string(mydup, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
|
||||
|
||||
/* Find the uuid of our B leg. If it exists, transfer it first */
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid(channel))) {
|
||||
switch_core_session_t *b_session;
|
||||
|
||||
/* Get info on the B leg */
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <WinSock2.h>
|
||||
#define snprintf _snprintf
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
@@ -39,6 +44,7 @@
|
||||
#include <netdb.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
@@ -550,6 +556,7 @@ REDIS credis_connect(const char *host, int port, int timeout)
|
||||
int fd, yes = 1;
|
||||
struct sockaddr_in sa;
|
||||
REDIS rhnd;
|
||||
int valid = 0;
|
||||
|
||||
if ((rhnd = cr_new()) == NULL)
|
||||
return NULL;
|
||||
@@ -566,7 +573,16 @@ REDIS credis_connect(const char *host, int port, int timeout)
|
||||
|
||||
sa.sin_family = AF_INET;
|
||||
sa.sin_port = htons(port);
|
||||
if (inet_aton(host, &sa.sin_addr) == 0) {
|
||||
#ifdef WIN32
|
||||
sa.sin_addr.S_un.S_addr = inet_addr(host);
|
||||
if (sa.sin_addr.S_un.S_addr != 0) {
|
||||
valid = 1;
|
||||
}
|
||||
#else
|
||||
valid = inet_aton(host, &sa.sin_addr);
|
||||
#endif
|
||||
|
||||
if (valid == 0) {
|
||||
struct hostent *he = gethostbyname(host);
|
||||
if (he == NULL)
|
||||
goto error;
|
||||
|
||||
+14
-18
@@ -2,9 +2,9 @@
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="mod_fax"
|
||||
ProjectGUID="{7877EFC8-4807-484B-B573-D7B7FD058FAA}"
|
||||
RootNamespace="mod_fax"
|
||||
Name="mod_redis"
|
||||
ProjectGUID="{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}"
|
||||
RootNamespace="mod_redis"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
@@ -23,7 +23,7 @@
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
|
||||
CharacterSet="0"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
@@ -42,7 +42,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
<Tool
|
||||
@@ -56,7 +55,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
@@ -84,9 +82,11 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
|
||||
CharacterSet="0"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
@@ -106,7 +106,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
<Tool
|
||||
@@ -120,7 +119,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
@@ -152,7 +150,7 @@
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
|
||||
CharacterSet="0"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
@@ -171,7 +169,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
<Tool
|
||||
@@ -185,7 +182,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
@@ -213,9 +209,11 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
|
||||
CharacterSet="0"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
@@ -235,7 +233,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
<Tool
|
||||
@@ -249,7 +246,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
@@ -282,15 +278,15 @@
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath=".\mod_fax.c"
|
||||
RelativePath=".\mod_redis.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\udptl.c"
|
||||
RelativePath=".\credis.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\udptl.h"
|
||||
RelativePath=".\credis.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>mod_redis</ProjectName>
|
||||
<ProjectGuid>{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}</ProjectGuid>
|
||||
<RootNamespace>mod_redis</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\module_release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\module_debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\module_release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\w32\module_debug.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile />
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile />
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile />
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile />
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="mod_redis.c" />
|
||||
<ClCompile Include="credis.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2010.vcxproj">
|
||||
<Project>{202d7a4e-760d-4d0e-afa1-d7459ced30ff}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="credis.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -29,7 +29,7 @@
|
||||
* Brian West <brian@freeswitch.org>
|
||||
* Steve Underwood <steveu@coppice.org>
|
||||
* Antonio Gallo <agx@linux.it>
|
||||
* Christopher M. Rienzo <chris@rienzo.net>
|
||||
* Christopher M. Rienzo <chris@rienzo.com>
|
||||
* mod_spandsp.c -- Module implementing spandsp fax, dsp, and codec functionality
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Steve Underwood <steveu@coppice.org>
|
||||
* Antonio Gallo <agx@linux.it>
|
||||
* Christopher M. Rienzo <chris@rienzo.net>
|
||||
* Christopher M. Rienzo <chris@rienzo.com>
|
||||
* mod_spandsp_dsp.c -- dsp applications provided by SpanDSP
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -618,7 +618,7 @@ SWITCH_STANDARD_APP(valet_parking_function)
|
||||
char tmp[512] = "";
|
||||
switch_snprintf(tmp, sizeof(tmp), "%s:%s", lot_name, ext);
|
||||
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid(channel))) {
|
||||
switch_core_session_t *b_session;
|
||||
|
||||
if ((b_session = switch_core_session_locate(uuid))) {
|
||||
|
||||
@@ -3489,7 +3489,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
|
||||
|
||||
switch_safe_free(file_path);
|
||||
|
||||
if (switch_channel_ready(channel)) {
|
||||
if (switch_channel_ready(channel) && vm_enabled) {
|
||||
status = switch_ivr_phrase_macro(session, VM_GOODBYE_MACRO, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -4895,6 +4895,8 @@ SWITCH_STANDARD_API(vm_fsdb_pref_greeting_set_function)
|
||||
profile->name, SWITCH_PATH_SEPARATOR, domain, SWITCH_PATH_SEPARATOR, id);
|
||||
char *final_file_path = switch_core_sprintf(pool, "%s%sgreeting_%d.%s", dir_path, SWITCH_PATH_SEPARATOR, slot, profile->file_ext);
|
||||
|
||||
switch_dir_make_recursive(dir_path, SWITCH_DEFAULT_DIR_PERMS, pool);
|
||||
|
||||
if (file_path) {
|
||||
if (switch_file_exists(file_path, pool) != SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "-ERR Filename doesn't exist\n");
|
||||
@@ -4989,6 +4991,8 @@ SWITCH_STANDARD_API(vm_fsdb_pref_recname_set_function)
|
||||
profile->name, SWITCH_PATH_SEPARATOR, domain, SWITCH_PATH_SEPARATOR, id);
|
||||
char *final_file_path = switch_core_sprintf(pool, "%s%srecorded_name.%s", dir_path, SWITCH_PATH_SEPARATOR, profile->file_ext);
|
||||
|
||||
switch_dir_make_recursive(dir_path, SWITCH_DEFAULT_DIR_PERMS, pool);
|
||||
|
||||
if (switch_file_exists(file_path, pool) != SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "-ERR Filename doesn't exist\n");
|
||||
profile_rwunlock(profile);
|
||||
@@ -4996,6 +5000,7 @@ SWITCH_STANDARD_API(vm_fsdb_pref_recname_set_function)
|
||||
}
|
||||
|
||||
switch_file_rename(file_path, final_file_path, pool);
|
||||
|
||||
if (atoi(res) == 0) {
|
||||
sql = switch_mprintf("INSERT INTO voicemail_prefs (username, domain, name_path) VALUES('%q', '%q', '%q')", id, domain, final_file_path);
|
||||
} else {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* The Original Code is FreeSWITCH mod_unimrcp
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Christopher M. Rienzo <chris@rienzo.net>
|
||||
* Christopher M. Rienzo <chris@rienzo.com>
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
@@ -25,9 +25,11 @@
|
||||
* Contributor(s):
|
||||
*
|
||||
* Brian West <brian@freeswitch.org>
|
||||
* Christopher M. Rienzo <chris@rienzo.net>
|
||||
* Christopher M. Rienzo <chris@rienzo.com>
|
||||
* Luke Dashjr <luke@openmethods.com> (OpenMethods, LLC)
|
||||
*
|
||||
* Maintainer: Christopher M. Rienzo <chris@rienzo.com>
|
||||
*
|
||||
* mod_unimrcp.c -- UniMRCP module (MRCP client)
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Chris Rienzo <chris@rienzo.net>
|
||||
* Christopher M. Rienzo <chris@rienzo.com>
|
||||
*
|
||||
*
|
||||
* mod_speex.c -- Speex Codec Module
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
//#define SAMPLES_PER_FRAME SAMPLERATE_GSMOPEN/50
|
||||
|
||||
#ifndef GSMOPEN_SVN_VERSION
|
||||
#define GSMOPEN_SVN_VERSION SWITCH_VERSION_REVISION
|
||||
#define GSMOPEN_SVN_VERSION SWITCH_VERSION_FULL
|
||||
#endif /* GSMOPEN_SVN_VERSION */
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2012, Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
@@ -23,17 +23,15 @@
|
||||
*
|
||||
* This module (mod_gsmopen) has been contributed by:
|
||||
*
|
||||
* Giovanni Maruzzelli (gmaruzz@gmail.com)
|
||||
* Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* Maintainer: Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* Further Contributors:
|
||||
*
|
||||
*
|
||||
*
|
||||
* mod_gsmopen.c -- GSM compatible Endpoint Module
|
||||
* mod_gsmopen.cpp -- GSM Modem compatible Endpoint Module
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#define __STDC_LIMIT_MACROS
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -115,7 +113,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef GSMOPEN_SVN_VERSION
|
||||
#define GSMOPEN_SVN_VERSION SWITCH_VERSION_REVISION
|
||||
#define GSMOPEN_SVN_VERSION SWITCH_VERSION_FULL
|
||||
#endif /* GSMOPEN_SVN_VERSION */
|
||||
|
||||
#include "ctb-0.16/ctb.h"
|
||||
|
||||
@@ -1,3 +1,39 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* This module (mod_gsmopen) has been contributed by:
|
||||
*
|
||||
* Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* Maintainer: Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* gsmopen_protocol.cpp -- Low Level Interface for mod_gamopen
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "gsmopen.h"
|
||||
#ifdef WIN32
|
||||
#include "win_iconv.c"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2012, Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
@@ -23,14 +23,11 @@
|
||||
*
|
||||
* This module (mod_gsmopen) has been contributed by:
|
||||
*
|
||||
* Giovanni Maruzzelli (gmaruzz@gmail.com)
|
||||
* Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* Maintainer: Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* Further Contributors:
|
||||
*
|
||||
*
|
||||
*
|
||||
* mod_gsmopen.c -- GSM compatible Endpoint Module
|
||||
* mod_gsmopen.cpp -- GSM Modem compatible Endpoint Module
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1334,11 +1334,11 @@ void FSH323Connection::OnModeChanged(const H245_ModeDescription & newMode)
|
||||
else
|
||||
t38_options->T38FaxUdpEC = "t38UDPRedundancy";
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"T38FaxUdpEC:%s\n",t38_options->T38FaxUdpEC);
|
||||
const char *uuid = switch_channel_get_variable(m_fsChannel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *uuid = switch_channel_get_partner_uuid(m_fsChannel);
|
||||
if (uuid != NULL) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"uuid:%s\n",uuid);
|
||||
|
||||
switch_core_session_t *session = switch_core_session_locate(switch_channel_get_variable(m_fsChannel, SWITCH_SIGNAL_BOND_VARIABLE));
|
||||
switch_core_session_t *session = switch_core_session_locate(switch_channel_get_partner_uuid(m_fsChannel));
|
||||
if (session) {
|
||||
switch_channel_t * channel = switch_core_session_get_channel(session);
|
||||
if (channel) {
|
||||
@@ -2229,7 +2229,7 @@ PBoolean FSH323_ExternalRTPChannel::Start()
|
||||
switch_channel_mark_pre_answered(m_fsChannel);
|
||||
|
||||
if (m_capability->GetMainType() == H323Capability::e_Data && m_conn->m_rxChannel && m_conn->m_txChannel) {
|
||||
const char *uuid = switch_channel_get_variable(m_fsChannel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *uuid = switch_channel_get_partner_uuid(m_fsChannel);
|
||||
if (uuid != NULL){
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"------------------------->switch_rtp_udptl_mode\n");
|
||||
switch_rtp_udptl_mode(tech_pvt->rtp_session);
|
||||
|
||||
@@ -599,7 +599,7 @@ struct Transfer<T, false>
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
switch_core_session_t *peer_session = switch_core_session_locate(switch_channel_get_variable(chan,SWITCH_SIGNAL_BOND_VARIABLE));
|
||||
switch_core_session_t *peer_session = switch_core_session_locate(switch_channel_get_partner_uuid(chan));
|
||||
|
||||
if(!peer_session)
|
||||
{
|
||||
@@ -662,7 +662,7 @@ struct Transfer<T, false>
|
||||
switch_channel_t * peer = switch_core_session_get_channel(peer_session);
|
||||
|
||||
/* put the channel in hold */
|
||||
//switch_core_session_t *session = switch_core_session_locate(switch_channel_get_variable(chan,SWITCH_SIGNAL_BOND_VARIABLE));
|
||||
//switch_core_session_t *session = switch_core_session_locate(switch_channel_get_partner_uuid(chan));
|
||||
//switch_channel_t *chan_core = switch_core_session_get_channel(session);
|
||||
|
||||
const char *stream;
|
||||
@@ -709,7 +709,7 @@ struct Transfer<T, false>
|
||||
switch_core_session_rwunlock(pvt->session());
|
||||
switch_core_session_rwunlock(peer_session);
|
||||
|
||||
//switch_ivr_unhold_uuid(switch_channel_get_variable(chan,SWITCH_SIGNAL_BOND_VARIABLE));
|
||||
//switch_ivr_unhold_uuid(switch_channel_get_partner_uuid(chan));
|
||||
}
|
||||
catch (ScopedLockFailed & err)
|
||||
{
|
||||
|
||||
@@ -659,13 +659,13 @@ static switch_status_t find_non_loopback_bridge(switch_core_session_t *session,
|
||||
*br_session = NULL;
|
||||
*br_uuid = NULL;
|
||||
|
||||
a_uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
a_uuid = switch_channel_get_partner_uuid(channel);
|
||||
|
||||
while (a_uuid && (sp = switch_core_session_locate(a_uuid))) {
|
||||
if (switch_core_session_check_interface(sp, loopback_endpoint_interface)) {
|
||||
private_t *tech_pvt = switch_core_session_get_private(sp);
|
||||
|
||||
a_uuid = switch_channel_get_variable(tech_pvt->other_channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
a_uuid = switch_channel_get_partner_uuid(tech_pvt->other_channel);
|
||||
switch_core_session_rwunlock(sp);
|
||||
sp = NULL;
|
||||
} else {
|
||||
@@ -919,7 +919,7 @@ static switch_status_t loopback_bowout_on_execute_state_handler(switch_core_sess
|
||||
/* Wait for b_channel to be fully bridged */
|
||||
switch_channel_wait_for_flag(b_channel, CF_BRIDGED, SWITCH_TRUE, 5000, NULL);
|
||||
|
||||
uuid = switch_channel_get_variable(b_channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
uuid = switch_channel_get_partner_uuid(b_channel);
|
||||
|
||||
if (uuid && (other_session = switch_core_session_locate(uuid))) {
|
||||
switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
|
||||
|
||||
@@ -539,7 +539,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_transfer)
|
||||
}
|
||||
|
||||
if ((tech_pvt = rtmp_locate_private(rsession, uuid))) {
|
||||
const char *other_uuid = switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *other_uuid = switch_channel_get_partner_uuid(tech_pvt->channel);
|
||||
switch_core_session_t *session;
|
||||
|
||||
if (!zstr(other_uuid) && (session = switch_core_session_locate(other_uuid))) {
|
||||
@@ -570,8 +570,8 @@ RTMP_INVOKE_FUNCTION(rtmp_i_join)
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if ((other_uuid[0] = switch_channel_get_variable(tech_pvt[0]->channel, SWITCH_SIGNAL_BOND_VARIABLE)) &&
|
||||
(other_uuid[1] = switch_channel_get_variable(tech_pvt[1]->channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
|
||||
if ((other_uuid[0] = switch_channel_get_partner_uuid(tech_pvt[0]->channel)) &&
|
||||
(other_uuid[1] = switch_channel_get_partner_uuid(tech_pvt[1]->channel))) {
|
||||
|
||||
#ifndef RTMP_DONT_HOLD
|
||||
if (switch_test_flag(tech_pvt[0], TFLAG_DETACHED)) {
|
||||
@@ -725,8 +725,8 @@ RTMP_INVOKE_FUNCTION(rtmp_i_three_way)
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (!(other_uuid[0] = switch_channel_get_variable(tech_pvt[0]->channel, SWITCH_SIGNAL_BOND_VARIABLE)) ||
|
||||
!(other_uuid[1] = switch_channel_get_variable(tech_pvt[1]->channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
|
||||
if (!(other_uuid[0] = switch_channel_get_partner_uuid(tech_pvt[0]->channel)) ||
|
||||
!(other_uuid[1] = switch_channel_get_partner_uuid(tech_pvt[1]->channel))) {
|
||||
return SWITCH_STATUS_FALSE; /* Both calls aren't bridged */
|
||||
}
|
||||
|
||||
|
||||
@@ -1926,10 +1926,10 @@ static switch_status_t load_skinny_config(void)
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Connected ODBC DSN: %s\n", profile->odbc_dsn);
|
||||
switch_odbc_handle_exec(profile->master_odbc, devices_sql, NULL, NULL);
|
||||
switch_odbc_handle_exec(profile->master_odbc, lines_sql, NULL, NULL);
|
||||
switch_odbc_handle_exec(profile->master_odbc, buttons_sql, NULL, NULL);
|
||||
switch_odbc_handle_exec(profile->master_odbc, active_lines_sql, NULL, NULL);
|
||||
switch_cache_db_test_reactive(skinny_get_db_handle(profile), "SELECT headset FROM skinny_devices", "DROP TABLE skinny_devices", devices_sql);
|
||||
switch_cache_db_test_reactive(skinny_get_db_handle(profile), "SELECT * FROM skinny_lines", "DROP TABLE skinny_lines", lines_sql);
|
||||
switch_cache_db_test_reactive(skinny_get_db_handle(profile), "SELECT * FROM skinny_buttons", "DROP TABLE skinny_buttons", buttons_sql);
|
||||
switch_cache_db_test_reactive(skinny_get_db_handle(profile), "SELECT * FROM skinny_active_lines", "DROP TABLE skinny_active_lines", active_lines_sql);
|
||||
} else {
|
||||
if ((db = switch_core_db_open_file(profile->dbname))) {
|
||||
switch_core_db_test_reactive(db, "SELECT headset FROM skinny_devices", "DROP TABLE skinny_devices", devices_sql);
|
||||
@@ -1943,11 +1943,6 @@ static switch_status_t load_skinny_config(void)
|
||||
switch_core_db_close(db);
|
||||
}
|
||||
|
||||
skinny_execute_sql_callback(profile, profile->sql_mutex, "DELETE FROM skinny_devices", NULL, NULL);
|
||||
skinny_execute_sql_callback(profile, profile->sql_mutex, "DELETE FROM skinny_lines", NULL, NULL);
|
||||
skinny_execute_sql_callback(profile, profile->sql_mutex, "DELETE FROM skinny_buttons", NULL, NULL);
|
||||
skinny_execute_sql_callback(profile, profile->sql_mutex, "DELETE FROM skinny_active_lines", NULL, NULL);
|
||||
|
||||
skinny_profile_respawn(profile, 0);
|
||||
|
||||
/* Register profile */
|
||||
|
||||
@@ -784,12 +784,12 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
channel = switch_core_session_get_channel(session);
|
||||
remote_uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
remote_uuid = switch_channel_get_partner_uuid(channel);
|
||||
|
||||
if (tech_pvt->transfer_from_call_id) {
|
||||
if((session2 = skinny_profile_find_session(listener->profile, listener, &line_instance, tech_pvt->transfer_from_call_id))) {
|
||||
switch_channel_t *channel2 = switch_core_session_get_channel(session2);
|
||||
const char *remote_uuid2 = switch_channel_get_variable(channel2, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *remote_uuid2 = switch_channel_get_partner_uuid(channel2);
|
||||
if (switch_ivr_uuid_bridge(remote_uuid, remote_uuid2) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
|
||||
switch_channel_hangup(channel2, SWITCH_CAUSE_NORMAL_CLEARING);
|
||||
@@ -1007,6 +1007,7 @@ switch_status_t skinny_handle_register(listener_t *listener, skinny_message_t *r
|
||||
const char *value = switch_xml_attr_soft(xbutton, "value");
|
||||
if(type == SKINNY_BUTTON_LINE) {
|
||||
const char *caller_name = switch_xml_attr_soft(xbutton, "caller-name");
|
||||
const char *reg_metadata = switch_xml_attr_soft(xbutton, "registration-metadata");
|
||||
uint32_t ring_on_idle = atoi(switch_xml_attr_soft(xbutton, "ring-on-idle"));
|
||||
uint32_t ring_on_active = atoi(switch_xml_attr_soft(xbutton, "ring-on-active"));
|
||||
uint32_t busy_trigger = atoi(switch_xml_attr_soft(xbutton, "busy-trigger"));
|
||||
@@ -1030,7 +1031,7 @@ switch_status_t skinny_handle_register(listener_t *listener, skinny_message_t *r
|
||||
switch_safe_free(sql);
|
||||
token = switch_mprintf("skinny/%q/%q/%q:%d", profile->name, value, request->data.reg.device_name, request->data.reg.instance);
|
||||
url = switch_mprintf("skinny/%q/%q", profile->name, value);
|
||||
switch_core_add_registration(value, profile->domain, token, url, 0, network_ip, network_port_c, "tcp");
|
||||
switch_core_add_registration(value, profile->domain, token, url, 0, network_ip, network_port_c, "tcp", reg_metadata);
|
||||
switch_safe_free(token);
|
||||
switch_safe_free(url);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2012, Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
@@ -21,19 +21,17 @@
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* This module (mod_skypopen) has been contributed by:
|
||||
*
|
||||
* Giovanni Maruzzelli (gmaruzz@gmail.com)
|
||||
*
|
||||
*
|
||||
* Further Contributors:
|
||||
* This module (mod_gsmopen) has been contributed by:
|
||||
*
|
||||
* Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* Maintainer: Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* mod_skypopen.c -- Skype compatible Endpoint Module
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "skypopen.h"
|
||||
#define SKYPE_CHAT_PROTO "skype"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2012, Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
@@ -21,18 +21,17 @@
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* This module (mod_skypopen) has been contributed by:
|
||||
* This module (mod_gsmopen) has been contributed by:
|
||||
*
|
||||
* Giovanni Maruzzelli (gmaruzz@gmail.com)
|
||||
*
|
||||
*
|
||||
* Further Contributors:
|
||||
* Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* Maintainer: Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* mod_skypopen.c -- Skype compatible Endpoint Module
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <switch.h>
|
||||
#include <switch_version.h>
|
||||
|
||||
@@ -86,7 +85,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef SKYPOPEN_SVN_VERSION
|
||||
#define SKYPOPEN_SVN_VERSION SWITCH_VERSION_REVISION
|
||||
#define SKYPOPEN_SVN_VERSION SWITCH_VERSION_FULL
|
||||
#endif /* SKYPOPEN_SVN_VERSION */
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -1,3 +1,37 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* This module (mod_gsmopen) has been contributed by:
|
||||
*
|
||||
* Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* Maintainer: Giovanni Maruzzelli <gmaruzz@gmail.com>
|
||||
*
|
||||
* skypopen_protocol.c -- Low Level Interface for mod_skypopen
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "skypopen.h"
|
||||
|
||||
#ifdef ASTERISK
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
<profile name="external">
|
||||
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
|
||||
<!-- This profile is only for outbound registrations to providers -->
|
||||
<gateways>
|
||||
<X-PRE-PROCESS cmd="include" data="external/*.xml"/>
|
||||
</gateways>
|
||||
|
||||
<aliases>
|
||||
<!--
|
||||
<alias name="outbound"/>
|
||||
<alias name="nat"/>
|
||||
-->
|
||||
</aliases>
|
||||
|
||||
<domains>
|
||||
<domain name="all" alias="false" parse="true"/>
|
||||
</domains>
|
||||
|
||||
<settings>
|
||||
<param name="debug" value="0"/>
|
||||
<!-- If you want FreeSWITCH to shutdown if this profile fails to load, uncomment the next line. -->
|
||||
<!-- <param name="shutdown-on-fail" value="true"/> -->
|
||||
<param name="sip-trace" value="no"/>
|
||||
<param name="sip-capture" value="no"/>
|
||||
<param name="rfc2833-pt" value="101"/>
|
||||
<!-- RFC 5626 : Send reg-id and sip.instance -->
|
||||
<!--<param name="enable-rfc-5626" value="true"/> -->
|
||||
<param name="sip-port" value="$${external_sip_port}"/>
|
||||
<param name="dialplan" value="XML"/>
|
||||
<param name="context" value="public"/>
|
||||
<param name="dtmf-duration" value="2000"/>
|
||||
<param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
|
||||
<param name="outbound-codec-prefs" value="$${outbound_codec_prefs}"/>
|
||||
<param name="hold-music" value="$${hold_music}"/>
|
||||
<param name="rtp-timer-name" value="soft"/>
|
||||
<!--<param name="enable-100rel" value="true"/>-->
|
||||
<!--<param name="disable-srv503" value="true"/>-->
|
||||
<!-- This could be set to "passive" -->
|
||||
<param name="local-network-acl" value="localnet.auto"/>
|
||||
<param name="manage-presence" value="false"/>
|
||||
|
||||
<!-- used to share presence info across sofia profiles
|
||||
manage-presence needs to be set to passive on this profile
|
||||
if you want it to behave as if it were the internal profile
|
||||
for presence.
|
||||
-->
|
||||
<!-- Name of the db to use for this profile -->
|
||||
<!--<param name="dbname" value="share_presence"/>-->
|
||||
<!--<param name="presence-hosts" value="$${domain}"/>-->
|
||||
<!--<param name="force-register-domain" value="$${domain}"/>-->
|
||||
<!--all inbound reg will stored in the db using this domain -->
|
||||
<!--<param name="force-register-db-domain" value="$${domain}"/>-->
|
||||
<!-- ************************************************* -->
|
||||
|
||||
<!--<param name="aggressive-nat-detection" value="true"/>-->
|
||||
<param name="inbound-codec-negotiation" value="generous"/>
|
||||
<param name="nonce-ttl" value="60"/>
|
||||
<param name="auth-calls" value="false"/>
|
||||
<!--
|
||||
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
|
||||
-->
|
||||
<param name="rtp-ip" value="$${local_ip_v4}"/>
|
||||
<param name="sip-ip" value="$${local_ip_v4}"/>
|
||||
<param name="ext-rtp-ip" value="auto-nat"/>
|
||||
<param name="ext-sip-ip" value="auto-nat"/>
|
||||
<param name="rtp-timeout-sec" value="300"/>
|
||||
<param name="rtp-hold-timeout-sec" value="1800"/>
|
||||
<!--<param name="enable-3pcc" value="true"/>-->
|
||||
|
||||
<!-- TLS: disabled by default, set to "true" to enable -->
|
||||
<param name="tls" value="$${external_ssl_enable}"/>
|
||||
<!-- Set to true to not bind on the normal sip-port but only on the TLS port -->
|
||||
<param name="tls-only" value="false"/>
|
||||
<!-- additional bind parameters for TLS -->
|
||||
<param name="tls-bind-params" value="transport=tls"/>
|
||||
<!-- Port to listen on for TLS requests. (5081 will be used if unspecified) -->
|
||||
<param name="tls-sip-port" value="$${external_tls_port}"/>
|
||||
<!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
|
||||
<param name="tls-cert-dir" value="$${external_ssl_dir}"/>
|
||||
<!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files -->
|
||||
<param name="tls-passphrase" value=""/>
|
||||
<!-- Verify the date on TLS certificates -->
|
||||
<param name="tls-verify-date" value="true"/>
|
||||
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
|
||||
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
|
||||
<param name="tls-verify-policy" value="none"/>
|
||||
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
|
||||
<param name="tls-verify-depth" value="2"/>
|
||||
<!-- If the tls-verify-policy is set to subjects_all or subjects_in this sets which subjects are allowed, multiple subjects can be split with a '|' pipe -->
|
||||
<param name="tls-verify-in-subjects" value=""/>
|
||||
<!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 -->
|
||||
<param name="tls-version" value="$${sip_tls_version}"/>
|
||||
|
||||
</settings>
|
||||
</profile>
|
||||
@@ -1,38 +0,0 @@
|
||||
<include>
|
||||
<!--<gateway name="asterlink.com">-->
|
||||
<!--/// account username *required* ///-->
|
||||
<!--<param name="username" value="cluecon"/>-->
|
||||
<!--/// auth realm: *optional* same as gateway name, if blank ///-->
|
||||
<!--<param name="realm" value="asterlink.com"/>-->
|
||||
<!--/// username to use in from: *optional* same as username, if blank ///-->
|
||||
<!--<param name="from-user" value="cluecon"/>-->
|
||||
<!--/// domain to use in from: *optional* same as realm, if blank ///-->
|
||||
<!--<param name="from-domain" value="asterlink.com"/>-->
|
||||
<!--/// account password *required* ///-->
|
||||
<!--<param name="password" value="2007"/>-->
|
||||
<!--/// extension for inbound calls: *optional* same as username, if blank ///-->
|
||||
<!--<param name="extension" value="cluecon"/>-->
|
||||
<!--/// proxy host: *optional* same as realm, if blank ///-->
|
||||
<!--<param name="proxy" value="asterlink.com"/>-->
|
||||
<!--/// send register to this proxy: *optional* same as proxy, if blank ///-->
|
||||
<!--<param name="register-proxy" value="mysbc.com"/>-->
|
||||
<!--/// expire in seconds: *optional* 3600, if blank ///-->
|
||||
<!--<param name="expire-seconds" value="60"/>-->
|
||||
<!--/// do not register ///-->
|
||||
<!--<param name="register" value="false"/>-->
|
||||
<!-- which transport to use for register -->
|
||||
<!--<param name="register-transport" value="udp"/>-->
|
||||
<!--How many seconds before a retry when a failure or timeout occurs -->
|
||||
<!--<param name="retry-seconds" value="30"/>-->
|
||||
<!--Use the callerid of an inbound call in the from field on outbound calls via this gateway -->
|
||||
<!--<param name="caller-id-in-from" value="false"/>-->
|
||||
<!--extra sip params to send in the contact-->
|
||||
<!--<param name="contact-params" value="tport=tcp"/>-->
|
||||
<!--send an options ping every x seconds, failure will unregister and/or mark it down-->
|
||||
<!--<param name="ping" value="25"/>-->
|
||||
<!--</gateway>-->
|
||||
<!--rfc5626 : Abilitazione rfc5626 ///-->
|
||||
<!--<param name="rfc-5626" value="true"/>-->
|
||||
<!--rfc5626 : extra sip params to send in the contact-->
|
||||
<!--<param name="reg-id" value="1"/>-->
|
||||
</include>
|
||||
@@ -1,130 +0,0 @@
|
||||
<profile name="internal-ipv6">
|
||||
<!--
|
||||
This is an example of a sofia profile setup to listen on IPv6.
|
||||
-->
|
||||
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
|
||||
<!--aliases are other names that will work as a valid profile name for this profile-->
|
||||
<settings>
|
||||
<!-- <param name="user-agent-string" value="FreeSWITCH Rocks!"/> -->
|
||||
<param name="debug" value="0"/>
|
||||
<param name="sip-trace" value="no"/>
|
||||
<param name="context" value="public"/>
|
||||
<param name="rfc2833-pt" value="101"/>
|
||||
<!-- port to bind to for sip traffic -->
|
||||
<param name="sip-port" value="$${internal_sip_port}"/>
|
||||
<param name="dialplan" value="XML"/>
|
||||
<param name="dtmf-duration" value="2000"/>
|
||||
<param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
|
||||
<param name="outbound-codec-prefs" value="$${global_codec_prefs}"/>
|
||||
<param name="use-rtp-timer" value="true"/>
|
||||
<param name="rtp-timer-name" value="soft"/>
|
||||
<!-- ip address to use for rtp -->
|
||||
<param name="rtp-ip" value="$${local_ip_v6}"/>
|
||||
<!-- ip address to bind to -->
|
||||
<param name="sip-ip" value="$${local_ip_v6}"/>
|
||||
<param name="hold-music" value="$${hold_music}"/>
|
||||
<!--<param name="enable-100rel" value="false"/>-->
|
||||
<!--<param name="disable-srv503" value="true"/>-->
|
||||
<param name="apply-inbound-acl" value="domains"/>
|
||||
<!--<param name="apply-register-acl" value="domains"/>-->
|
||||
<!--<param name="dtmf-type" value="info"/>-->
|
||||
<param name="record-template" value="$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
||||
<!--enable to use presence and mwi -->
|
||||
<param name="manage-presence" value="true"/>
|
||||
<!-- This setting is for AAL2 bitpacking on G726 -->
|
||||
<!-- <param name="bitpacking" value="aal2"/> -->
|
||||
<!--max number of open dialogs in proceeding -->
|
||||
<!--<param name="max-proceeding" value="1000"/>-->
|
||||
<!--session timers for all call to expire after the specified seconds -->
|
||||
<!--<param name="session-timeout" value="1800"/>-->
|
||||
<!--<param name="multiple-registrations" value="true"/>-->
|
||||
<!--set to 'greedy' if you want your codec list to take precedence -->
|
||||
<param name="inbound-codec-negotiation" value="generous"/>
|
||||
<!-- if you want to send any special bind params of your own -->
|
||||
<!--<param name="bind-params" value="transport=udp"/>-->
|
||||
<!--<param name="unregister-on-options-fail" value="true"/>-->
|
||||
|
||||
<!-- TLS: disabled by default, set to "true" to enable -->
|
||||
<param name="tls" value="$${internal_ssl_enable}"/>
|
||||
<!-- additional bind parameters for TLS -->
|
||||
<param name="tls-bind-params" value="transport=tls"/>
|
||||
<!-- Port to listen on for TLS requests. (5061 will be used if unspecified) -->
|
||||
<param name="tls-sip-port" value="$${internal_tls_port}"/>
|
||||
<!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
|
||||
<param name="tls-cert-dir" value="$${internal_ssl_dir}"/>
|
||||
<!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 -->
|
||||
<param name="tls-version" value="$${sip_tls_version}"/>
|
||||
|
||||
<!--If you don't want to pass through timestampes from 1 RTP call to another (on a per call basis with rtp_rewrite_timestamps chanvar)-->
|
||||
<!--<param name="rtp-rewrite-timestamps" value="true"/>-->
|
||||
<!--<param name="pass-rfc2833" value="true"/>-->
|
||||
<!--If you have ODBC support and a working dsn you can use it instead of SQLite-->
|
||||
<!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
|
||||
|
||||
<!--Uncomment to set all inbound calls to no media mode-->
|
||||
<!--<param name="inbound-bypass-media" value="true"/>-->
|
||||
|
||||
<!--Uncomment to set all inbound calls to proxy media mode-->
|
||||
<!--<param name="inbound-proxy-media" value="true"/>-->
|
||||
|
||||
<!--Uncomment to let calls hit the dialplan *before* you decide if the codec is ok-->
|
||||
<!--<param name="inbound-late-negotiation" value="true"/>-->
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
||||
<!-- accept any authentication without actually checking (not a good feature for most people) -->
|
||||
<!-- <param name="accept-blind-auth" value="true"/> -->
|
||||
|
||||
<!-- suppress CNG on this profile or per call with the 'suppress_cng' variable -->
|
||||
<!-- <param name="suppress-cng" value="true"/> -->
|
||||
|
||||
<!--TTL for nonce in sip auth-->
|
||||
<param name="nonce-ttl" value="60"/>
|
||||
<!--Uncomment if you want to force the outbound leg of a bridge to only offer the codec
|
||||
that the originator is using-->
|
||||
<!--<param name="disable-transcoding" value="true"/>-->
|
||||
<!-- Used for when phones respond to a challenged ACK with method INVITE in the hash -->
|
||||
<!--<param name="NDLB-broken-auth-hash" value="true"/>-->
|
||||
<!-- add a ;received="<ip>:<port>" to the contact when replying to register for nat handling -->
|
||||
<!--<param name="NDLB-received-in-nat-reg-contact" value="true"/>-->
|
||||
<param name="auth-calls" value="$${internal_auth_calls}"/>
|
||||
<!-- on authed calls, authenticate *all* the packets not just invite -->
|
||||
<param name="auth-all-packets" value="false"/>
|
||||
<!-- <param name="ext-rtp-ip" value="$${external_rtp_ip}"/> -->
|
||||
<!-- <param name="ext-sip-ip" value="$${external_sip_ip}"/> -->
|
||||
<!-- rtp inactivity timeout -->
|
||||
<param name="rtp-timeout-sec" value="300"/>
|
||||
<param name="rtp-hold-timeout-sec" value="1800"/>
|
||||
<!-- VAD choose one (out is a good choice); -->
|
||||
<!-- <param name="vad" value="in"/> -->
|
||||
<!-- <param name="vad" value="out"/> -->
|
||||
<!-- <param name="vad" value="both"/> -->
|
||||
<!--<param name="alias" value="sip:10.0.1.251:5555"/>-->
|
||||
<!--
|
||||
These are enabled to make the default config work better out of the box.
|
||||
If you need more than ONE domain you'll need to not use these options.
|
||||
|
||||
-->
|
||||
<!--all inbound reg will look in this domain for the users -->
|
||||
<param name="force-register-domain" value="$${domain}"/>
|
||||
<!--all inbound reg will stored in the db using this domain -->
|
||||
<param name="force-register-db-domain" value="$${domain}"/>
|
||||
<!-- disable register and transfer which may be undesirable in a public switch -->
|
||||
<!--<param name="disable-transfer" value="true"/>-->
|
||||
<!--<param name="disable-register" value="true"/>-->
|
||||
<!--<param name="enable-3pcc" value="true"/>-->
|
||||
<!-- use stun when specified (default is true) -->
|
||||
<!--<param name="stun-enabled" value="true"/>-->
|
||||
<!-- use stun when specified (default is true) -->
|
||||
<!-- set to true to have the profile determine stun is not useful and turn it off globally-->
|
||||
<!--<param name="stun-auto-disable" value="true"/>-->
|
||||
|
||||
<!-- the following can be used as workaround with bogus SRV/NAPTR records -->
|
||||
<!--<param name="disable-srv" value="false" />-->
|
||||
<!--<param name="disable-naptr" value="false" />-->
|
||||
|
||||
</settings>
|
||||
</profile>
|
||||
|
||||
@@ -1,385 +0,0 @@
|
||||
<profile name="internal">
|
||||
<!--
|
||||
This is a sofia sip profile/user agent. This will service exactly one ip and port.
|
||||
In FreeSWITCH you can run multiple sip user agents on their own ip and port.
|
||||
|
||||
When you hear someone say "sofia profile" this is what they are talking about.
|
||||
-->
|
||||
|
||||
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
|
||||
<!--aliases are other names that will work as a valid profile name for this profile-->
|
||||
<aliases>
|
||||
<!--
|
||||
<alias name="default"/>
|
||||
-->
|
||||
</aliases>
|
||||
<!-- Outbound Registrations -->
|
||||
<gateways>
|
||||
<X-PRE-PROCESS cmd="include" data="internal/*.xml"/>
|
||||
</gateways>
|
||||
|
||||
<domains>
|
||||
<!-- indicator to parse the directory for domains with parse="true" to get gateways-->
|
||||
<!--<domain name="$${domain}" parse="true"/>-->
|
||||
<!-- indicator to parse the directory for domains with parse="true" to get gateways and alias every domain to this profile -->
|
||||
<!--<domain name="all" alias="true" parse="true"/>-->
|
||||
<domain name="all" alias="true" parse="false"/>
|
||||
</domains>
|
||||
|
||||
<settings>
|
||||
<!--
|
||||
When calls are in no media this will bring them back to media
|
||||
when you press the hold button.
|
||||
-->
|
||||
<!--<param name="media-option" value="resume-media-on-hold"/> -->
|
||||
<!--
|
||||
This will allow a call after an attended transfer go back to
|
||||
bypass media after an attended transfer.
|
||||
-->
|
||||
<!--<param name="media-option" value="bypass-media-after-att-xfer"/>-->
|
||||
<!-- <param name="user-agent-string" value="FreeSWITCH Rocks!"/> -->
|
||||
<param name="debug" value="0"/>
|
||||
<!-- If you want FreeSWITCH to shutdown if this profile fails to load, uncomment the next line. -->
|
||||
<!-- <param name="shutdown-on-fail" value="true"/> -->
|
||||
<param name="sip-trace" value="no"/>
|
||||
<param name="sip-capture" value="no"/>
|
||||
|
||||
<!-- Use presence_map.conf.xml to convert extension regex to presence protos for routing -->
|
||||
<!-- <param name="presence-proto-lookup" value="true"/> -->
|
||||
|
||||
|
||||
<!-- Don't be picky about negotiated DTMF just always offer 2833 and accept both 2833 and INFO -->
|
||||
<!--<param name="liberal-dtmf" value="true"/>-->
|
||||
|
||||
|
||||
<!--
|
||||
Sometimes, in extremely rare edge cases, the Sofia SIP stack may stop
|
||||
responding. These options allow you to enable and control a watchdog
|
||||
on the Sofia SIP stack so that if it stops responding for the
|
||||
specified number of milliseconds, it will cause FreeSWITCH to crash
|
||||
immediately. This is useful if you run in an HA environment and
|
||||
need to ensure automated recovery from such a condition. Note that if
|
||||
your server is idle a lot, the watchdog may fire due to not receiving
|
||||
any SIP messages. Thus, if you expect your system to be idle, you
|
||||
should leave the watchdog disabled. It can be toggled on and off
|
||||
through the FreeSWITCH CLI either on an individual profile basis or
|
||||
globally for all profiles. So, if you run in an HA environment with a
|
||||
master and slave, you should use the CLI to make sure the watchdog is
|
||||
only enabled on the master.
|
||||
If such crash occurs, FreeSWITCH will dump core if allowed. The
|
||||
stacktrace will include function watchdog_triggered_abort().
|
||||
-->
|
||||
<param name="watchdog-enabled" value="no"/>
|
||||
<param name="watchdog-step-timeout" value="30000"/>
|
||||
<param name="watchdog-event-timeout" value="30000"/>
|
||||
|
||||
<param name="log-auth-failures" value="false"/>
|
||||
<param name="forward-unsolicited-mwi-notify" value="false"/>
|
||||
|
||||
<param name="context" value="public"/>
|
||||
<param name="rfc2833-pt" value="101"/>
|
||||
<!-- port to bind to for sip traffic -->
|
||||
<param name="sip-port" value="$${internal_sip_port}"/>
|
||||
<param name="dialplan" value="XML"/>
|
||||
<param name="dtmf-duration" value="2000"/>
|
||||
<param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
|
||||
<param name="outbound-codec-prefs" value="$${global_codec_prefs}"/>
|
||||
<param name="rtp-timer-name" value="soft"/>
|
||||
<!-- ip address to use for rtp, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
|
||||
<param name="rtp-ip" value="$${local_ip_v4}"/>
|
||||
<!-- ip address to bind to, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
|
||||
<param name="sip-ip" value="$${local_ip_v4}"/>
|
||||
<param name="hold-music" value="$${hold_music}"/>
|
||||
<param name="apply-nat-acl" value="nat.auto"/>
|
||||
|
||||
|
||||
<!-- (default true) set to false if you do not wish to have called party info in 1XX responses -->
|
||||
<!-- <param name="cid-in-1xx" value="false"/> -->
|
||||
|
||||
<!-- extended info parsing -->
|
||||
<!-- <param name="extended-info-parsing" value="true"/> -->
|
||||
|
||||
<!--<param name="aggressive-nat-detection" value="true"/>-->
|
||||
<!--
|
||||
There are known issues (asserts and segfaults) when 100rel is enabled.
|
||||
It is not recommended to enable 100rel at this time.
|
||||
-->
|
||||
<!--<param name="enable-100rel" value="true"/>-->
|
||||
|
||||
<!-- uncomment if you don't wish to try a next SRV destination on 503 response -->
|
||||
<!-- RFC3263 Section 4.3 -->
|
||||
<!--<param name="disable-srv503" value="true"/>-->
|
||||
|
||||
<!-- Enable Compact SIP headers. -->
|
||||
<!--<param name="enable-compact-headers" value="true"/>-->
|
||||
<!--
|
||||
enable/disable session timers
|
||||
-->
|
||||
<!--<param name="enable-timer" value="false"/>-->
|
||||
<!--<param name="minimum-session-expires" value="120"/>-->
|
||||
<param name="apply-inbound-acl" value="domains"/>
|
||||
<!--
|
||||
This defines your local network, by default we detect your local network
|
||||
and create this localnet.auto ACL for this.
|
||||
-->
|
||||
<param name="local-network-acl" value="localnet.auto"/>
|
||||
<!--<param name="apply-register-acl" value="domains"/>-->
|
||||
<!--<param name="dtmf-type" value="info"/>-->
|
||||
|
||||
|
||||
<!-- 'true' means every time 'first-only' means on the first register -->
|
||||
<!--<param name="send-message-query-on-register" value="true"/>-->
|
||||
|
||||
<!-- 'true' means every time 'first-only' means on the first register -->
|
||||
<!--<param name="send-presence-on-register" value="first-only"/> -->
|
||||
|
||||
|
||||
<!-- Caller-ID type (choose one, can be overridden by inbound call type and/or sip_cid_type channel variable -->
|
||||
<!-- Remote-Party-ID header -->
|
||||
<!--<param name="caller-id-type" value="rpid"/>-->
|
||||
|
||||
<!-- P-*-Identity family of headers -->
|
||||
<!--<param name="caller-id-type" value="pid"/>-->
|
||||
|
||||
<!-- neither one -->
|
||||
<!--<param name="caller-id-type" value="none"/>-->
|
||||
|
||||
|
||||
|
||||
<param name="record-path" value="$${recordings_dir}"/>
|
||||
<param name="record-template" value="${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
||||
<!--enable to use presence -->
|
||||
<param name="manage-presence" value="true"/>
|
||||
<!-- send a presence probe on each register to query devices to send presence instead of sending presence with less info -->
|
||||
<!--<param name="presence-probe-on-register" value="true"/>-->
|
||||
<!--<param name="manage-shared-appearance" value="true"/>-->
|
||||
<!-- used to share presence info across sofia profiles -->
|
||||
<!-- Name of the db to use for this profile -->
|
||||
<!--<param name="dbname" value="share_presence"/>-->
|
||||
<param name="presence-hosts" value="$${domain},$${local_ip_v4}"/>
|
||||
<param name="presence-privacy" value="$${presence_privacy}"/>
|
||||
<!-- ************************************************* -->
|
||||
|
||||
<!-- This setting is for AAL2 bitpacking on G726 -->
|
||||
<!-- <param name="bitpacking" value="aal2"/> -->
|
||||
<!--max number of open dialogs in proceeding -->
|
||||
<!--<param name="max-proceeding" value="1000"/>-->
|
||||
<!--session timers for all call to expire after the specified seconds -->
|
||||
<!--<param name="session-timeout" value="1800"/>-->
|
||||
<!-- Can be 'true' or 'contact' -->
|
||||
<!--<param name="multiple-registrations" value="contact"/>-->
|
||||
<!--set to 'greedy' if you want your codec list to take precedence -->
|
||||
<param name="inbound-codec-negotiation" value="generous"/>
|
||||
<!-- if you want to send any special bind params of your own -->
|
||||
<!--<param name="bind-params" value="transport=udp"/>-->
|
||||
<!--<param name="unregister-on-options-fail" value="true"/>-->
|
||||
|
||||
<!-- TLS: disabled by default, set to "true" to enable -->
|
||||
<param name="tls" value="$${internal_ssl_enable}"/>
|
||||
<!-- Set to true to not bind on the normal sip-port but only on the TLS port -->
|
||||
<param name="tls-only" value="false"/>
|
||||
<!-- additional bind parameters for TLS -->
|
||||
<param name="tls-bind-params" value="transport=tls"/>
|
||||
<!-- Port to listen on for TLS requests. (5061 will be used if unspecified) -->
|
||||
<param name="tls-sip-port" value="$${internal_tls_port}"/>
|
||||
<!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
|
||||
<param name="tls-cert-dir" value="$${internal_ssl_dir}"/>
|
||||
<!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files -->
|
||||
<param name="tls-passphrase" value=""/>
|
||||
<!-- Verify the date on TLS certificates -->
|
||||
<param name="tls-verify-date" value="true"/>
|
||||
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
|
||||
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
|
||||
<param name="tls-verify-policy" value="none"/>
|
||||
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
|
||||
<param name="tls-verify-depth" value="2"/>
|
||||
<!-- If the tls-verify-policy is set to subjects_all or subjects_in this sets which subjects are allowed, multiple subjects can be split with a '|' pipe -->
|
||||
<param name="tls-verify-in-subjects" value=""/>
|
||||
<!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 -->
|
||||
<param name="tls-version" value="$${sip_tls_version}"/>
|
||||
|
||||
<!-- turn on auto-flush during bridge (skip timer sleep when the socket already has data)
|
||||
(reduces delay on latent connections default true, must be disabled explicitly)-->
|
||||
<!--<param name="rtp-autoflush-during-bridge" value="false"/>-->
|
||||
|
||||
<!--If you don't want to pass through timestamps from 1 RTP call to another (on a per call basis with rtp_rewrite_timestamps chanvar)-->
|
||||
<!--<param name="rtp-rewrite-timestamps" value="true"/>-->
|
||||
<!--<param name="pass-rfc2833" value="true"/>-->
|
||||
<!--If you have ODBC support and a working dsn you can use it instead of SQLite-->
|
||||
<!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
|
||||
|
||||
<!--Uncomment to set all inbound calls to no media mode-->
|
||||
<!--<param name="inbound-bypass-media" value="true"/>-->
|
||||
|
||||
<!--Uncomment to set all inbound calls to proxy media mode-->
|
||||
<!--<param name="inbound-proxy-media" value="true"/>-->
|
||||
|
||||
<!--Uncomment to let calls hit the dialplan *before* you decide if the codec is ok-->
|
||||
<!--<param name="inbound-late-negotiation" value="true"/>-->
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
||||
<!-- accept any authentication without actually checking (not a good feature for most people) -->
|
||||
<!-- <param name="accept-blind-auth" value="true"/> -->
|
||||
|
||||
<!-- suppress CNG on this profile or per call with the 'suppress_cng' variable -->
|
||||
<!-- <param name="suppress-cng" value="true"/> -->
|
||||
|
||||
<!--TTL for nonce in sip auth-->
|
||||
<param name="nonce-ttl" value="60"/>
|
||||
<!--Uncomment if you want to force the outbound leg of a bridge to only offer the codec
|
||||
that the originator is using-->
|
||||
<!--<param name="disable-transcoding" value="true"/>-->
|
||||
<!-- Handle 302 Redirect in the dialplan -->
|
||||
<!--<param name="manual-redirect" value="true"/> -->
|
||||
<!-- Disable Transfer -->
|
||||
<!--<param name="disable-transfer" value="true"/> -->
|
||||
<!-- Disable Register -->
|
||||
<!--<param name="disable-register" value="true"/> -->
|
||||
<!-- Used for when phones respond to a challenged ACK with method INVITE in the hash -->
|
||||
<!--<param name="NDLB-broken-auth-hash" value="true"/>-->
|
||||
<!-- add a ;received="<ip>:<port>" to the contact when replying to register for nat handling -->
|
||||
<!--<param name="NDLB-received-in-nat-reg-contact" value="true"/>-->
|
||||
<param name="auth-calls" value="$${internal_auth_calls}"/>
|
||||
<!-- Force the user and auth-user to match. -->
|
||||
<param name="inbound-reg-force-matching-username" value="true"/>
|
||||
<!-- on authed calls, authenticate *all* the packets not just invite -->
|
||||
<param name="auth-all-packets" value="false"/>
|
||||
|
||||
<!-- external_sip_ip
|
||||
Used as the public IP address for SDP.
|
||||
Can be an one of:
|
||||
ip address - "12.34.56.78"
|
||||
a stun server lookup - "stun:stun.server.com"
|
||||
a DNS name - "host:host.server.com"
|
||||
auto - Use guessed ip.
|
||||
auto-nat - Use ip learned from NAT-PMP or UPNP
|
||||
-->
|
||||
<param name="ext-rtp-ip" value="auto-nat"/>
|
||||
<param name="ext-sip-ip" value="auto-nat"/>
|
||||
|
||||
<!-- rtp inactivity timeout -->
|
||||
<param name="rtp-timeout-sec" value="300"/>
|
||||
<param name="rtp-hold-timeout-sec" value="1800"/>
|
||||
<!-- VAD choose one (out is a good choice); -->
|
||||
<!-- <param name="vad" value="in"/> -->
|
||||
<!-- <param name="vad" value="out"/> -->
|
||||
<!-- <param name="vad" value="both"/> -->
|
||||
<!--<param name="alias" value="sip:10.0.1.251:5555"/>-->
|
||||
<!--
|
||||
These are enabled to make the default config work better out of the box.
|
||||
If you need more than ONE domain you'll need to not use these options.
|
||||
|
||||
-->
|
||||
<!--all inbound reg will look in this domain for the users -->
|
||||
<param name="force-register-domain" value="$${domain}"/>
|
||||
<!--force the domain in subscriptions to this value -->
|
||||
<param name="force-subscription-domain" value="$${domain}"/>
|
||||
<!--all inbound reg will stored in the db using this domain -->
|
||||
<param name="force-register-db-domain" value="$${domain}"/>
|
||||
|
||||
<!--<param name="delete-subs-on-register" value="false"/>-->
|
||||
|
||||
<!-- enable rtcp on every channel also can be done per leg basis with rtcp_audio_interval_msec variable set to passthru to pass it across a call-->
|
||||
<!--<param name="rtcp-audio-interval-msec" value="5000"/>-->
|
||||
<!--<param name="rtcp-video-interval-msec" value="5000"/>-->
|
||||
|
||||
<!--force suscription expires to a lower value than requested-->
|
||||
<!--<param name="force-subscription-expires" value="60"/>-->
|
||||
<!-- disable register and transfer which may be undesirable in a public switch -->
|
||||
<!--<param name="disable-transfer" value="true"/>-->
|
||||
<!--<param name="disable-register" value="true"/>-->
|
||||
|
||||
<!--
|
||||
enable-3pcc can be set to either 'true' or 'proxy', true accepts the call
|
||||
right away, proxy waits until the call has been answered then sends accepts
|
||||
-->
|
||||
<!--<param name="enable-3pcc" value="true"/>-->
|
||||
|
||||
<!-- use at your own risk or if you know what this does.-->
|
||||
<!--<param name="NDLB-force-rport" value="true"/>-->
|
||||
<!--
|
||||
Choose the realm challenge key. Default is auto_to if not set.
|
||||
|
||||
auto_from - uses the from field as the value for the sip realm.
|
||||
auto_to - uses the to field as the value for the sip realm.
|
||||
<anyvalue> - you can input any value to use for the sip realm.
|
||||
|
||||
If you want URL dialing to work you'll want to set this to auto_from.
|
||||
|
||||
If you use any other value besides auto_to or auto_from you'll loose
|
||||
the ability to do multiple domains.
|
||||
|
||||
Note: comment out to restore the behavior before 2008-09-29
|
||||
|
||||
-->
|
||||
<param name="challenge-realm" value="auto_from"/>
|
||||
<!--<param name="disable-rtp-auto-adjust" value="true"/>-->
|
||||
<!-- on inbound calls make the uuid of the session equal to the sip call id of that call -->
|
||||
<!--<param name="inbound-use-callid-as-uuid" value="true"/>-->
|
||||
<!-- on outbound calls set the callid to match the uuid of the session -->
|
||||
<!--<param name="outbound-use-uuid-as-callid" value="true"/>-->
|
||||
<!-- set to false disable this feature -->
|
||||
<!--<param name="rtp-autofix-timing" value="false"/>-->
|
||||
|
||||
<!-- set this param to false if your gateway for some reason hates X- headers that it is supposed to ignore-->
|
||||
<!--<param name="pass-callee-id" value="false"/>-->
|
||||
|
||||
<!-- clear clears them all or supply the name to add or the name prefixed with ~ to remove
|
||||
valid values:
|
||||
|
||||
clear
|
||||
CISCO_SKIP_MARK_BIT_2833
|
||||
SONUS_SEND_INVALID_TIMESTAMP_2833
|
||||
|
||||
-->
|
||||
<!--<param name="auto-rtp-bugs" data="clear"/>-->
|
||||
|
||||
<!-- the following can be used as workaround with bogus SRV/NAPTR records -->
|
||||
<!--<param name="disable-srv" value="false" />-->
|
||||
<!--<param name="disable-naptr" value="false" />-->
|
||||
|
||||
<!-- The following can be used to fine-tune timers within sofia's transport layer
|
||||
Those settings are for advanced users and can safely be left as-is -->
|
||||
|
||||
<!-- Initial retransmission interval (in milliseconds).
|
||||
Set the T1 retransmission interval used by the SIP transaction engine.
|
||||
The T1 is the initial duration used by request retransmission timers A and E (UDP) as well as response retransmission timer G. -->
|
||||
<!-- <param name="timer-T1" value="500" /> -->
|
||||
|
||||
<!-- Transaction timeout (defaults to T1 * 64).
|
||||
Set the T1x64 timeout value used by the SIP transaction engine.
|
||||
The T1x64 is duration used for timers B, F, H, and J (UDP) by the SIP transaction engine.
|
||||
The timeout value T1x64 can be adjusted separately from the initial retransmission interval T1. -->
|
||||
<!-- <param name="timer-T1X64" value="32000" /> -->
|
||||
|
||||
|
||||
<!-- Maximum retransmission interval (in milliseconds).
|
||||
Set the maximum retransmission interval used by the SIP transaction engine.
|
||||
The T2 is the maximum duration used for the timers E (UDP) and G by the SIP transaction engine.
|
||||
Note that the timer A is not capped by T2. Retransmission interval of INVITE requests grows exponentially
|
||||
until the timer B fires. -->
|
||||
<!-- <param name="timer-T2" value="4000" /> -->
|
||||
|
||||
<!--
|
||||
Transaction lifetime (in milliseconds).
|
||||
Set the lifetime for completed transactions used by the SIP transaction engine.
|
||||
A completed transaction is kept around for the duration of T4 in order to catch late responses.
|
||||
The T4 is the maximum duration for the messages to stay in the network and the duration of SIP timer K. -->
|
||||
<!-- <param name="timer-T4" value="4000" /> -->
|
||||
|
||||
<!-- Turn on a jitterbuffer for every call -->
|
||||
<!-- <param name="auto-jitterbuffer-msec" value="60"/> -->
|
||||
|
||||
|
||||
<!-- By default mod_sofia will ignore the codecs in the sdp for hold/unhold operations
|
||||
Set this to true if you want to actually parse the sdp and re-negotiate the codec during hold/unhold.
|
||||
It's probably not what you want so stick with the default unless you really need to change this.
|
||||
-->
|
||||
<!--<param name="renegotiate-codec-on-hold" value="true"/>-->
|
||||
|
||||
</settings>
|
||||
</profile>
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
<include>
|
||||
<!--<gateway name="asterlink.com">-->
|
||||
<!--/// account username *required* ///-->
|
||||
<!--<param name="username" value="cluecon"/>-->
|
||||
<!--/// auth realm: *optional* same as gateway name, if blank ///-->
|
||||
<!--<param name="realm" value="asterlink.com"/>-->
|
||||
<!--/// username to use in from: *optional* same as username, if blank ///-->
|
||||
<!--<param name="from-user" value="cluecon"/>-->
|
||||
<!--/// domain to use in from: *optional* same as realm, if blank ///-->
|
||||
<!--<param name="from-domain" value="asterlink.com"/>-->
|
||||
<!--/// account password *required* ///-->
|
||||
<!--<param name="password" value="2007"/>-->
|
||||
<!--/// extension for inbound calls: *optional* same as username, if blank ///-->
|
||||
<!--<param name="extension" value="cluecon"/>-->
|
||||
<!--/// proxy host: *optional* same as realm, if blank ///-->
|
||||
<!--<param name="proxy" value="asterlink.com"/>-->
|
||||
<!--/// send register to this proxy: *optional* same as proxy, if blank ///-->
|
||||
<!--<param name="register-proxy" value="mysbc.com"/>-->
|
||||
<!--/// expire in seconds: *optional* 3600, if blank ///-->
|
||||
<!--<param name="expire-seconds" value="60"/>-->
|
||||
<!--/// do not register ///-->
|
||||
<!--<param name="register" value="false"/>-->
|
||||
<!-- which transport to use for register -->
|
||||
<!--<param name="register-transport" value="udp"/>-->
|
||||
<!--How many seconds before a retry when a failure or timeout occurs -->
|
||||
<!--<param name="retry-seconds" value="30"/>-->
|
||||
<!--Use the callerid of an inbound call in the from field on outbound calls via this gateway -->
|
||||
<!--<param name="caller-id-in-from" value="false"/>-->
|
||||
<!--extra sip params to send in the contact-->
|
||||
<!--<param name="contact-params" value="tport=tcp"/>-->
|
||||
<!-- Put the extension in the contact -->
|
||||
<!--<param name="extension-in-contact" value="true"/>-->
|
||||
<!--send an options ping every x seconds, failure will unregister and/or mark it down-->
|
||||
<!--<param name="ping" value="25"/>-->
|
||||
<!--<param name="cid-type" value="rpid"/>-->
|
||||
<!--</gateway>-->
|
||||
</include>
|
||||
@@ -0,0 +1,477 @@
|
||||
<configuration name="sofia.conf" description="sofia endpoint">
|
||||
<global_settings>
|
||||
<param name="log-level" value="0"/>
|
||||
<param name="auto-restart" value="false"/>
|
||||
<param name="debug-presence" value="0"/>
|
||||
<!-- <param name="capture-server" value="udp:homer.example.com:5060"/> -->
|
||||
</global_settings>
|
||||
<profiles>
|
||||
<!--
|
||||
This is a sofia sip profile/user agent. This will service exactly one
|
||||
ip and port. In FreeSWITCH you can run multiple sip user agents on
|
||||
their own ip and port.
|
||||
-->
|
||||
<profile name="example">
|
||||
<gateways>
|
||||
<gateway name="example-gateway">
|
||||
<!-- account username (required) -->
|
||||
<param name="username" value="cluecon"/>
|
||||
<!-- auth realm (same as gateway name, if blank) -->
|
||||
<param name="realm" value="example.com"/>
|
||||
<!-- username to use in from (same as username, if blank) -->
|
||||
<param name="from-user" value="cluecon"/>
|
||||
<!-- domain to use in from (same as realm, if blank) /// -->
|
||||
<param name="from-domain" value="example.com"/>
|
||||
<!-- account password (required) -->
|
||||
<param name="password" value="xxxx"/>
|
||||
<!-- extension for inbound calls (same as username, if blank) -->
|
||||
<param name="extension" value="cluecon"/>
|
||||
<!-- proxy host (same as realm, if blank) -->
|
||||
<param name="proxy" value="example.com"/>
|
||||
<!-- send register to this proxy (same as proxy, if blank) -->
|
||||
<param name="register-proxy" value="example.com"/>
|
||||
<!-- expire in seconds (3600, if blank) -->
|
||||
<param name="expire-seconds" value="600"/>
|
||||
<!-- do not register -->
|
||||
<param name="register" value="false"/>
|
||||
<!-- which transport to use for register -->
|
||||
<param name="register-transport" value="tcp"/>
|
||||
<!-- how many seconds before a retry when a failure or timeout occurs
|
||||
-->
|
||||
<param name="retry-seconds" value="30"/>
|
||||
<!-- use the callerid of an inbound call in the from field on outbound
|
||||
calls via this gateway -->
|
||||
<param name="caller-id-in-from" value="false"/>
|
||||
<!-- extra sip params to send in the contact -->
|
||||
<param name="contact-params" value="tport=tcp"/>
|
||||
<!-- put the extension in the contact -->
|
||||
<param name="extension-in-contact" value="true"/>
|
||||
<!-- send an options ping every x seconds, failure will unregister
|
||||
and/or mark it down -->
|
||||
<param name="ping" value="25"/>
|
||||
<!-- callerid header mechanism -->
|
||||
<param name="cid-type" value="rpid"/>
|
||||
</gateway>
|
||||
</gateways>
|
||||
<aliases>
|
||||
<!-- aliases are other names that will work as a valid profile name for
|
||||
this profile -->
|
||||
<alias name="default"/>
|
||||
</aliases>
|
||||
<domains>
|
||||
<!-- indicator to parse the directory for domains with parse="true" to
|
||||
get gateways -->
|
||||
<!-- <domain name="$${domain}" parse="true"/> -->
|
||||
<!-- indicator to parse the directory for domains with parse="true" to
|
||||
get gateways and alias every domain to this profile -->
|
||||
<!-- <domain name="all" alias="true" parse="true"/> -->
|
||||
<domain name="all" alias="true" parse="false"/>
|
||||
</domains>
|
||||
<settings>
|
||||
<!-- When calls are in no media this will bring them back to media when
|
||||
you press the hold button. -->
|
||||
<!-- <param name="media-option" value="resume-media-on-hold"/> -->
|
||||
<!-- This will allow a call after an attended transfer go back to bypass
|
||||
media after an attended transfer. -->
|
||||
<!-- <param name="media-option" value="bypass-media-after-att-xfer"/> -->
|
||||
<!-- <param name="user-agent-string" value="FreeSWITCH Rocks!"/> -->
|
||||
<param name="debug" value="0"/>
|
||||
<!-- If you want FreeSWITCH to shutdown if this profile fails to load,
|
||||
uncomment the next line. -->
|
||||
<!-- <param name="shutdown-on-fail" value="true"/> -->
|
||||
<param name="sip-trace" value="no"/>
|
||||
<param name="sip-capture" value="no"/>
|
||||
|
||||
<!-- Use presence_map.conf.xml to convert extension regex to presence
|
||||
protos for routing -->
|
||||
<!-- <param name="presence-proto-lookup" value="true"/> -->
|
||||
|
||||
|
||||
<!-- Don't be picky about negotiated DTMF just always offer 2833 and
|
||||
accept both 2833 and INFO -->
|
||||
<!-- <param name="liberal-dtmf" value="true"/> -->
|
||||
|
||||
<!--
|
||||
Sometimes, in extremely rare edge cases, the Sofia SIP stack may
|
||||
stop responding. These options allow you to enable and control a
|
||||
watchdog on the Sofia SIP stack so that if it stops responding for
|
||||
the specified number of milliseconds, it will cause FreeSWITCH to
|
||||
crash immediately. This is useful if you run in an HA environment
|
||||
and need to ensure automated recovery from such a condition. Note
|
||||
that if your server is idle a lot, the watchdog may fire due to not
|
||||
receiving any SIP messages. Thus, if you expect your system to be
|
||||
idle, you should leave the watchdog disabled. It can be toggled on
|
||||
and off through the FreeSWITCH CLI either on an individual profile
|
||||
basis or globally for all profiles. So, if you run in an HA
|
||||
environment with a master and slave, you should use the CLI to make
|
||||
sure the watchdog is only enabled on the master.
|
||||
|
||||
If such crash occurs, FreeSWITCH will dump core if allowed. The
|
||||
stacktrace will include function watchdog_triggered_abort().
|
||||
-->
|
||||
<param name="watchdog-enabled" value="no"/>
|
||||
<param name="watchdog-step-timeout" value="30000"/>
|
||||
<param name="watchdog-event-timeout" value="30000"/>
|
||||
|
||||
<param name="log-auth-failures" value="false"/>
|
||||
<param name="forward-unsolicited-mwi-notify" value="false"/>
|
||||
|
||||
<param name="context" value="public"/>
|
||||
<param name="rfc2833-pt" value="101"/>
|
||||
<!-- port to bind to for sip traffic -->
|
||||
<param name="sip-port" value="$${internal_sip_port}"/>
|
||||
<param name="dialplan" value="XML"/>
|
||||
<param name="dtmf-duration" value="2000"/>
|
||||
<param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
|
||||
<param name="outbound-codec-prefs" value="$${global_codec_prefs}"/>
|
||||
<param name="rtp-timer-name" value="soft"/>
|
||||
<!-- ip address to use for rtp, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
|
||||
<param name="rtp-ip" value="$${local_ip_v4}"/>
|
||||
<!-- ip address to bind to, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
|
||||
<param name="sip-ip" value="$${local_ip_v4}"/>
|
||||
<param name="hold-music" value="$${hold_music}"/>
|
||||
<param name="apply-nat-acl" value="nat.auto"/>
|
||||
|
||||
<!-- (default true) set to false if you do not wish to have called party
|
||||
info in 1XX responses -->
|
||||
<!-- <param name="cid-in-1xx" value="false"/> -->
|
||||
|
||||
<!-- extended info parsing -->
|
||||
<!-- <param name="extended-info-parsing" value="true"/> -->
|
||||
|
||||
<!-- <param name="aggressive-nat-detection" value="true"/> -->
|
||||
<!-- There are known issues (asserts and segfaults) when 100rel is
|
||||
enabled. It is not recommended to enable 100rel at this time. -->
|
||||
<!-- <param name="enable-100rel" value="true"/> -->
|
||||
|
||||
<!-- uncomment if you don't wish to try a next SRV destination on 503
|
||||
response -->
|
||||
<!-- RFC3263 Section 4.3 -->
|
||||
<!-- <param name="disable-srv503" value="true"/> -->
|
||||
|
||||
<!-- Enable Compact SIP headers. -->
|
||||
<!-- <param name="enable-compact-headers" value="true"/> -->
|
||||
<!-- enable/disable session timers -->
|
||||
<!-- <param name="enable-timer" value="false"/> -->
|
||||
<!-- <param name="minimum-session-expires" value="120"/> -->
|
||||
<param name="apply-inbound-acl" value="domains"/>
|
||||
<!-- This defines your local network, by default we detect your local
|
||||
network and create this localnet.auto ACL for this. -->
|
||||
<param name="local-network-acl" value="localnet.auto"/>
|
||||
<!-- <param name="apply-register-acl" value="domains"/> -->
|
||||
<!-- <param name="dtmf-type" value="info"/> -->
|
||||
|
||||
<!-- 'true' means every time 'first-only' means on the first register -->
|
||||
<!-- <param name="send-message-query-on-register" value="true"/> -->
|
||||
|
||||
<!-- 'true' means every time 'first-only' means on the first register -->
|
||||
<!-- <param name="send-presence-on-register" value="first-only"/> -->
|
||||
|
||||
<!-- Caller-ID type (choose one, can be overridden by inbound call type
|
||||
and/or sip_cid_type channel variable -->
|
||||
<!-- Remote-Party-ID header -->
|
||||
<!-- <param name="caller-id-type" value="rpid"/> -->
|
||||
|
||||
<!-- P-*-Identity family of headers -->
|
||||
<!-- <param name="caller-id-type" value="pid"/> -->
|
||||
|
||||
<!-- neither one -->
|
||||
<!-- <param name="caller-id-type" value="none"/> -->
|
||||
|
||||
<param name="record-path" value="$${recordings_dir}"/>
|
||||
<param name="record-template" value="${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
|
||||
<!-- enable to use presence -->
|
||||
<param name="manage-presence" value="true"/>
|
||||
<!-- send a presence probe on each register to query devices to send
|
||||
presence instead of sending presence with less info -->
|
||||
<!-- <param name="presence-probe-on-register" value="true"/> -->
|
||||
<!-- <param name="manage-shared-appearance" value="true"/> -->
|
||||
<!-- used to share presence info across sofia profiles -->
|
||||
<!-- Name of the db to use for this profile -->
|
||||
<!-- <param name="dbname" value="share_presence"/> -->
|
||||
<param name="presence-hosts" value="$${domain},$${local_ip_v4}"/>
|
||||
<param name="presence-privacy" value="$${presence_privacy}"/>
|
||||
|
||||
<!-- This setting is for AAL2 bitpacking on G726 -->
|
||||
<!-- <param name="bitpacking" value="aal2"/> -->
|
||||
<!-- max number of open dialogs in proceeding -->
|
||||
<!-- <param name="max-proceeding" value="1000"/> -->
|
||||
<!-- session timers for all call to expire after the specified seconds -->
|
||||
<!-- <param name="session-timeout" value="1800"/> -->
|
||||
<!-- Can be 'true' or 'contact' -->
|
||||
<!-- <param name="multiple-registrations" value="contact"/> -->
|
||||
<!-- set to 'greedy' if you want your codec list to take precedence -->
|
||||
<param name="inbound-codec-negotiation" value="generous"/>
|
||||
<!-- if you want to send any special bind params of your own -->
|
||||
<!-- <param name="bind-params" value="transport=udp"/> -->
|
||||
<!-- <param name="unregister-on-options-fail" value="true"/> -->
|
||||
|
||||
<!-- TLS: disabled by default, set to "true" to enable -->
|
||||
<param name="tls" value="$${internal_ssl_enable}"/>
|
||||
<!-- Set to true to not bind on the normal sip-port but only on the TLS
|
||||
port -->
|
||||
<param name="tls-only" value="false"/>
|
||||
<!-- additional bind parameters for TLS -->
|
||||
<param name="tls-bind-params" value="transport=tls"/>
|
||||
<!-- Port to listen on for TLS requests. (5061 will be used if
|
||||
unspecified) -->
|
||||
<param name="tls-sip-port" value="$${internal_tls_port}"/>
|
||||
<!-- Location of the agent.pem and cafile.pem ssl certificates (needed
|
||||
for TLS server) -->
|
||||
<param name="tls-cert-dir" value="$${internal_ssl_dir}"/>
|
||||
<!-- Optionally set the passphrase password used by openSSL to
|
||||
encrypt/decrypt TLS private key files -->
|
||||
<param name="tls-passphrase" value=""/>
|
||||
<!-- Verify the date on TLS certificates -->
|
||||
<param name="tls-verify-date" value="true"/>
|
||||
<!-- TLS verify policy, when registering/inviting gateways with other
|
||||
servers (outbound) or handling inbound registration/invite requests
|
||||
how should we verify their certificate -->
|
||||
<!-- set to 'in' to only verify incoming connections, 'out' to only
|
||||
verify outgoing connections, 'all' to verify all connections, also
|
||||
'in_subjects', 'out_subjects' and 'all_subjects' for subject
|
||||
validation. Multiple policies can be split with a '|' pipe -->
|
||||
<param name="tls-verify-policy" value="none"/>
|
||||
<!-- Certificate max verify depth to use for validating peer TLS
|
||||
certificates when the verify policy is not none -->
|
||||
<param name="tls-verify-depth" value="2"/>
|
||||
<!-- If the tls-verify-policy is set to subjects_all or subjects_in this
|
||||
sets which subjects are allowed, multiple subjects can be split
|
||||
with a '|' pipe -->
|
||||
<param name="tls-verify-in-subjects" value=""/>
|
||||
<!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not
|
||||
work with TLSv1 -->
|
||||
<param name="tls-version" value="$${sip_tls_version}"/>
|
||||
<!-- TLS maximum session lifetime -->
|
||||
<!-- <param name="tls-timeout" value="300"/> -->
|
||||
|
||||
<!-- turn on auto-flush during bridge (skip timer sleep when the socket
|
||||
already has data) (reduces delay on latent connections default
|
||||
true, must be disabled explicitly) -->
|
||||
<!-- <param name="rtp-autoflush-during-bridge" value="false"/> -->
|
||||
|
||||
<!-- If you don't want to pass through timestamps from 1 RTP call to
|
||||
another (on a per call basis with rtp_rewrite_timestamps chanvar)
|
||||
-->
|
||||
<!-- <param name="rtp-rewrite-timestamps" value="true"/> -->
|
||||
<!-- <param name="pass-rfc2833" value="true"/> -->
|
||||
<!-- If you have ODBC support and a working dsn you can use it instead
|
||||
of SQLite -->
|
||||
<!-- <param name="odbc-dsn" value="dsn:user:pass"/> -->
|
||||
|
||||
<!-- Uncomment to set all inbound calls to no media mode -->
|
||||
<!-- <param name="inbound-bypass-media" value="true"/> -->
|
||||
|
||||
<!-- Uncomment to set all inbound calls to proxy media mode -->
|
||||
<!-- <param name="inbound-proxy-media" value="true"/> -->
|
||||
|
||||
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
|
||||
<!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
|
||||
<param name="inbound-zrtp-passthru" value="true"/>
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2
|
||||
lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
||||
<!-- accept any authentication without actually checking (not a good
|
||||
feature for most people) -->
|
||||
<!-- <param name="accept-blind-auth" value="true"/> -->
|
||||
|
||||
<!-- suppress CNG on this profile or per call with the 'suppress_cng'
|
||||
variable -->
|
||||
<!-- <param name="suppress-cng" value="true"/> -->
|
||||
|
||||
<!-- TTL for nonce in sip auth -->
|
||||
<param name="nonce-ttl" value="60"/>
|
||||
<!-- Uncomment if you want to force the outbound leg of a bridge to only
|
||||
offer the codec that the originator is using -->
|
||||
<!-- <param name="disable-transcoding" value="true"/> -->
|
||||
<!-- Handle 302 Redirect in the dialplan -->
|
||||
<!-- <param name="manual-redirect" value="true"/> -->
|
||||
<!-- Disable Transfer -->
|
||||
<!-- <param name="disable-transfer" value="true"/> -->
|
||||
<!-- Disable Register -->
|
||||
<!-- <param name="disable-register" value="true"/> -->
|
||||
<!-- Used for when phones respond to a challenged ACK with method INVITE
|
||||
in the hash -->
|
||||
<!-- <param name="NDLB-broken-auth-hash" value="true"/> -->
|
||||
<!-- add a ;received="<ip>:<port>" to the contact when replying to
|
||||
register for nat handling -->
|
||||
<!-- <param name="NDLB-received-in-nat-reg-contact" value="true"/> -->
|
||||
<param name="auth-calls" value="$${internal_auth_calls}"/>
|
||||
<!-- Force the user and auth-user to match. -->
|
||||
<param name="inbound-reg-force-matching-username" value="true"/>
|
||||
<!-- on authed calls, authenticate *all* the packets not just invite -->
|
||||
<param name="auth-all-packets" value="false"/>
|
||||
|
||||
<!-- external_sip_ip
|
||||
Used as the public IP address for SDP.
|
||||
Can be an one of:
|
||||
ip address - "12.34.56.78"
|
||||
a stun server lookup - "stun:stun.server.com"
|
||||
a DNS name - "host:host.server.com"
|
||||
auto - Use guessed ip.
|
||||
auto-nat - Use ip learned from NAT-PMP or UPNP
|
||||
-->
|
||||
<param name="ext-rtp-ip" value="auto-nat"/>
|
||||
<param name="ext-sip-ip" value="auto-nat"/>
|
||||
|
||||
<!-- rtp inactivity timeout -->
|
||||
<param name="rtp-timeout-sec" value="300"/>
|
||||
<param name="rtp-hold-timeout-sec" value="1800"/>
|
||||
<!-- VAD choose one (out is a good choice); -->
|
||||
<!-- <param name="vad" value="in"/> -->
|
||||
<!-- <param name="vad" value="out"/> -->
|
||||
<!-- <param name="vad" value="both"/> -->
|
||||
<!-- <param name="alias" value="sip:10.0.1.251:5555"/> -->
|
||||
<!--
|
||||
These are enabled to make the default config work better out of the
|
||||
box. If you need more than ONE domain you'll need to not use these
|
||||
options.
|
||||
-->
|
||||
<!-- all inbound reg will look in this domain for the users -->
|
||||
<param name="force-register-domain" value="$${domain}"/>
|
||||
<!-- force the domain in subscriptions to this value -->
|
||||
<param name="force-subscription-domain" value="$${domain}"/>
|
||||
<!-- all inbound reg will stored in the db using this domain -->
|
||||
<param name="force-register-db-domain" value="$${domain}"/>
|
||||
|
||||
<!-- <param name="delete-subs-on-register" value="false"/> -->
|
||||
|
||||
<!-- enable rtcp on every channel also can be done per leg basis with
|
||||
rtcp_audio_interval_msec variable set to passthru to pass it across
|
||||
a call -->
|
||||
<!-- <param name="rtcp-audio-interval-msec" value="5000"/> -->
|
||||
<!-- <param name="rtcp-video-interval-msec" value="5000"/> -->
|
||||
|
||||
<!-- force suscription expires to a lower value than requested -->
|
||||
<!-- <param name="force-subscription-expires" value="60"/> -->
|
||||
<!-- disable register and transfer which may be undesirable in a public
|
||||
switch -->
|
||||
<!-- <param name="disable-transfer" value="true"/> -->
|
||||
<!-- <param name="disable-register" value="true"/> -->
|
||||
|
||||
<!--
|
||||
enable-3pcc can be set to either 'true' or 'proxy', true accepts
|
||||
the call right away, proxy waits until the call has been answered
|
||||
then sends accepts
|
||||
-->
|
||||
<!-- <param name="enable-3pcc" value="true"/> -->
|
||||
|
||||
<!-- use at your own risk or if you know what this does. -->
|
||||
<!-- <param name="NDLB-force-rport" value="true"/> -->
|
||||
<!--
|
||||
Choose the realm challenge key. Default is auto_to if not set.
|
||||
|
||||
auto_from - uses the from field as the value for the sip realm.
|
||||
auto_to - uses the to field as the value for the sip realm.
|
||||
<anyvalue> - you can input any value to use for the sip realm.
|
||||
|
||||
If you want URL dialing to work you'll want to set this to auto_from.
|
||||
|
||||
If you use any other value besides auto_to or auto_from you'll loose
|
||||
the ability to do multiple domains.
|
||||
|
||||
Note: comment out to restore the behavior before 2008-09-29
|
||||
|
||||
-->
|
||||
<param name="challenge-realm" value="auto_from"/>
|
||||
<!-- <param name="disable-rtp-auto-adjust" value="true"/> -->
|
||||
<!-- on inbound calls make the uuid of the session equal to the sip call
|
||||
id of that call -->
|
||||
<!-- <param name="inbound-use-callid-as-uuid" value="true"/> -->
|
||||
<!-- on outbound calls set the callid to match the uuid of the session
|
||||
-->
|
||||
<!-- <param name="outbound-use-uuid-as-callid" value="true"/> -->
|
||||
<!-- set to false disable this feature -->
|
||||
<!-- <param name="rtp-autofix-timing" value="false"/> -->
|
||||
|
||||
<!-- set this param to false if your gateway for some reason hates X-
|
||||
headers that it is supposed to ignore -->
|
||||
<!-- <param name="pass-callee-id" value="false"/> -->
|
||||
|
||||
<!-- clear clears them all or supply the name to add or the name
|
||||
prefixed with ~ to remove valid values:
|
||||
|
||||
clear
|
||||
CISCO_SKIP_MARK_BIT_2833
|
||||
SONUS_SEND_INVALID_TIMESTAMP_2833
|
||||
|
||||
-->
|
||||
<!-- <param name="auto-rtp-bugs" data="clear"/> -->
|
||||
|
||||
<!-- the following can be used as workaround with bogus SRV/NAPTR
|
||||
records -->
|
||||
<!-- <param name="disable-srv" value="false" /> -->
|
||||
<!-- <param name="disable-naptr" value="false" /> -->
|
||||
|
||||
<!-- The following can be used to fine-tune timers within sofia's
|
||||
transport layer Those settings are for advanced users and can
|
||||
safely be left as-is -->
|
||||
|
||||
<!-- Initial retransmission interval (in milliseconds).
|
||||
|
||||
Set the T1 retransmission interval used by the SIP transaction
|
||||
engine.
|
||||
|
||||
The T1 is the initial duration used by request retransmission
|
||||
timers A and E (UDP) as well as response retransmission timer G.
|
||||
-->
|
||||
<!-- <param name="timer-T1" value="500" /> -->
|
||||
|
||||
<!-- Transaction timeout (defaults to T1 * 64).
|
||||
|
||||
Set the T1x64 timeout value used by the SIP transaction engine.
|
||||
|
||||
The T1x64 is duration used for timers B, F, H, and J (UDP) by the
|
||||
SIP transaction engine.
|
||||
|
||||
The timeout value T1x64 can be adjusted separately from the initial
|
||||
retransmission interval T1. -->
|
||||
<!-- <param name="timer-T1X64" value="32000" /> -->
|
||||
|
||||
|
||||
<!-- Maximum retransmission interval (in milliseconds).
|
||||
|
||||
Set the maximum retransmission interval used by the SIP transaction
|
||||
engine.
|
||||
|
||||
The T2 is the maximum duration used for the timers E (UDP) and G by
|
||||
the SIP transaction engine.
|
||||
|
||||
Note that the timer A is not capped by T2. Retransmission interval
|
||||
of INVITE requests grows exponentially until the timer B fires.
|
||||
-->
|
||||
<!-- <param name="timer-T2" value="4000" /> -->
|
||||
|
||||
<!--
|
||||
Transaction lifetime (in milliseconds).
|
||||
|
||||
Set the lifetime for completed transactions used by the SIP
|
||||
transaction engine.
|
||||
|
||||
A completed transaction is kept around for the duration of T4 in
|
||||
order to catch late responses.
|
||||
|
||||
The T4 is the maximum duration for the messages to stay in the
|
||||
network and the duration of SIP timer K. -->
|
||||
<!-- <param name="timer-T4" value="4000" /> -->
|
||||
|
||||
<!-- Turn on a jitterbuffer for every call -->
|
||||
<!-- <param name="auto-jitterbuffer-msec" value="60"/> -->
|
||||
|
||||
|
||||
<!-- By default mod_sofia will ignore the codecs in the sdp for
|
||||
hold/unhold operations Set this to true if you want to actually
|
||||
parse the sdp and re-negotiate the codec during hold/unhold. It's
|
||||
probably not what you want so stick with the default unless you
|
||||
really need to change this.
|
||||
-->
|
||||
<!-- <param name="renegotiate-codec-on-hold" value="true"/> -->
|
||||
</settings>
|
||||
</profile>
|
||||
</profiles>
|
||||
</configuration>
|
||||
@@ -172,7 +172,7 @@ static switch_status_t sofia_on_reset(switch_core_session_t *session)
|
||||
const char *uuid = switch_core_session_get_uuid(session);
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_BRIDGE_ORIGINATOR)) {
|
||||
const char *other_uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *other_uuid = switch_channel_get_partner_uuid(channel);
|
||||
int x = 0;
|
||||
|
||||
if (other_uuid) {
|
||||
@@ -1587,6 +1587,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
|
||||
case SWITCH_MESSAGE_INDICATE_BRIDGE:
|
||||
{
|
||||
|
||||
switch_channel_set_variable(channel, SOFIA_REPLACES_HEADER, NULL);
|
||||
sofia_glue_tech_track(tech_pvt->profile, session);
|
||||
|
||||
sofia_set_flag(tech_pvt, TFLAG_SIMPLIFY);
|
||||
@@ -1824,7 +1826,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
}
|
||||
sofia_glue_tech_set_local_sdp(tech_pvt, NULL, SWITCH_FALSE);
|
||||
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
|
||||
if ((uuid = switch_channel_get_partner_uuid(channel))
|
||||
&& (other_session = switch_core_session_locate(uuid))) {
|
||||
other_channel = switch_core_session_get_channel(other_session);
|
||||
ip = switch_channel_get_variable(other_channel, SWITCH_REMOTE_MEDIA_IP_VARIABLE);
|
||||
@@ -2061,7 +2063,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
const char *uuid;
|
||||
const char *call_id = NULL, *to_user = NULL, *to_host = NULL, *to_tag = NULL, *from_tag = NULL, *from_user = NULL, *from_host = NULL;
|
||||
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) || (uuid = switch_channel_get_variable(channel, "originate_signal_bond"))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid(channel))) {
|
||||
switch_core_session_t *rsession;
|
||||
if ((rsession = switch_core_session_locate(uuid))) {
|
||||
switch_channel_t *rchannel = switch_core_session_get_channel(rsession);
|
||||
@@ -2191,7 +2193,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CALL_UPDATE) == SWITCH_STATUS_SUCCESS) {
|
||||
const char *uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *uuid = switch_channel_get_partner_uuid(channel);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Direction", "SEND");
|
||||
|
||||
|
||||
@@ -2337,151 +2339,165 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
break;
|
||||
|
||||
case SWITCH_MESSAGE_INDICATE_RESPOND:
|
||||
if (msg->numeric_arg || msg->string_arg) {
|
||||
int code = msg->numeric_arg;
|
||||
const char *reason = NULL;
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
if (code) {
|
||||
reason = msg->string_arg;
|
||||
} else {
|
||||
if (!zstr(msg->string_arg)) {
|
||||
if ((code = atoi(msg->string_arg))) {
|
||||
if ((reason = strchr(msg->string_arg, ' '))) {
|
||||
reason++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tech_pvt->nh && tech_pvt->nh->nh_ds && tech_pvt->nh->nh_ds->ds_sr && nua_server_request_is_pending(tech_pvt->nh->nh_ds->ds_sr)) {
|
||||
status = tech_pvt->nh->nh_ds->ds_sr->sr_status;
|
||||
}
|
||||
|
||||
if (!code) {
|
||||
code = 488;
|
||||
}
|
||||
|
||||
if (!switch_channel_test_flag(channel, CF_ANSWERED) && code >= 300) {
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
goto end_lock;
|
||||
}
|
||||
}
|
||||
|
||||
if (zstr(reason) && code != 407 && code != 302) {
|
||||
reason = sip_status_phrase(code);
|
||||
if (zstr(reason)) {
|
||||
reason = "Because";
|
||||
}
|
||||
}
|
||||
|
||||
if (code == 407 && !msg->numeric_arg) {
|
||||
const char *to_uri = switch_channel_get_variable(channel, "sip_to_uri");
|
||||
const char *to_host = reason;
|
||||
|
||||
if (zstr(to_host)) {
|
||||
to_host = switch_channel_get_variable(channel, "sip_to_host");
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Challenging call %s\n", to_uri);
|
||||
sofia_reg_auth_challenge(tech_pvt->profile, tech_pvt->nh, NULL, REG_INVITE, to_host, 0);
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_USER_CHALLENGE);
|
||||
} else if (code == 484 && msg->numeric_arg) {
|
||||
const char *to = switch_channel_get_variable(channel, "sip_to_uri");
|
||||
const char *max_forwards = switch_channel_get_variable(channel, SWITCH_MAX_FORWARDS_VARIABLE);
|
||||
char *cid = generate_pai_str(tech_pvt);
|
||||
char *to_uri = NULL;
|
||||
|
||||
if (to) {
|
||||
char *p;
|
||||
to_uri = switch_core_session_sprintf(session, "sip:%s", to);
|
||||
if ((p = strstr(to_uri, ":5060"))) {
|
||||
*p = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
if (!switch_channel_test_flag(channel, CF_ANSWERED) && !sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_RESPONSE_HEADER_PREFIX);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Overlap Dial with %d %s\n", code, reason);
|
||||
|
||||
nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), TAG_IF(to_uri, SIPTAG_CONTACT_STR(to_uri)),
|
||||
SIPTAG_SUPPORTED_STR(NULL), SIPTAG_ACCEPT_STR(NULL),
|
||||
TAG_IF(cid, SIPTAG_HEADER_STR(cid)),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
|
||||
TAG_IF(!zstr(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)), TAG_END());
|
||||
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
|
||||
switch_safe_free(extra_headers);
|
||||
}
|
||||
} else if (code == 302 && !zstr(msg->string_arg)) {
|
||||
char *p;
|
||||
|
||||
if ((p = strchr(msg->string_arg, ' '))) {
|
||||
*p = '\0';
|
||||
msg->string_arg = p;
|
||||
}
|
||||
|
||||
msg->message_id = SWITCH_MESSAGE_INDICATE_REDIRECT;
|
||||
switch_core_session_receive_message(session, msg);
|
||||
if (status == 0 || status > 199 || tech_pvt->nh->nh_destroyed) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "%s Cannot call respond on handle at status %d\n",
|
||||
switch_channel_get_name(channel), status);
|
||||
goto end_lock;
|
||||
} else {
|
||||
if (!sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_PROGRESS_HEADER_PREFIX);
|
||||
char *sdp = (char *) msg->pointer_arg;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Responding with %d [%s]\n", code, reason);
|
||||
sofia_clear_flag(tech_pvt, TFLAG_REINVITED);
|
||||
|
||||
if (!zstr((sdp))) {
|
||||
if (!strcasecmp(sdp, "t38")) {
|
||||
switch_t38_options_t *t38_options = switch_channel_get_private(tech_pvt->channel, "t38_options");
|
||||
if (t38_options) {
|
||||
sofia_glue_set_image_sdp(tech_pvt, t38_options, 0);
|
||||
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||
sofia_clear_flag(tech_pvt, TFLAG_NOTIMER_DURING_BRIDGE);
|
||||
switch_rtp_udptl_mode(tech_pvt->rtp_session);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sofia_glue_tech_set_local_sdp(tech_pvt, sdp, SWITCH_TRUE);
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||
sofia_glue_tech_patch_sdp(tech_pvt);
|
||||
sofia_glue_tech_proxy_remote_addr(tech_pvt, NULL);
|
||||
}
|
||||
if (sofia_use_soa(tech_pvt)) {
|
||||
nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
|
||||
SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
|
||||
SOATAG_REUSE_REJECTED(1),
|
||||
SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_END());
|
||||
} else {
|
||||
nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
|
||||
NUTAG_MEDIA_ENABLE(0),
|
||||
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
|
||||
SIPTAG_PAYLOAD_STR(tech_pvt->local_sdp_str),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_END());
|
||||
}
|
||||
if (sofia_test_pflag(tech_pvt->profile, PFLAG_3PCC_PROXY) && sofia_test_flag(tech_pvt, TFLAG_3PCC)) {
|
||||
/* Unlock the session signal to allow the ack to make it in */
|
||||
// Maybe we should timeout?
|
||||
switch_mutex_unlock(tech_pvt->sofia_mutex);
|
||||
|
||||
while (switch_channel_ready(channel) && !sofia_test_flag(tech_pvt, TFLAG_3PCC_HAS_ACK)) {
|
||||
switch_cond_next();
|
||||
}
|
||||
|
||||
/* Regain lock on sofia */
|
||||
switch_mutex_lock(tech_pvt->sofia_mutex);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "3PCC-PROXY, Done waiting for ACK\n");
|
||||
sofia_clear_flag(tech_pvt, TFLAG_3PCC);
|
||||
sofia_clear_flag(tech_pvt, TFLAG_3PCC_HAS_ACK);
|
||||
switch_core_session_pass_indication(session, SWITCH_MESSAGE_INDICATE_ANSWER);
|
||||
}
|
||||
} else {
|
||||
nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_END());
|
||||
}
|
||||
switch_safe_free(extra_headers);
|
||||
}
|
||||
}
|
||||
|
||||
if (msg->numeric_arg || msg->string_arg) {
|
||||
int code = msg->numeric_arg;
|
||||
const char *reason = NULL;
|
||||
|
||||
if (code) {
|
||||
reason = msg->string_arg;
|
||||
} else {
|
||||
if (!zstr(msg->string_arg)) {
|
||||
if ((code = atoi(msg->string_arg))) {
|
||||
if ((reason = strchr(msg->string_arg, ' '))) {
|
||||
reason++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!code) {
|
||||
code = 488;
|
||||
}
|
||||
|
||||
if (!switch_channel_test_flag(channel, CF_ANSWERED) && code >= 300) {
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
goto end_lock;
|
||||
}
|
||||
}
|
||||
|
||||
if (zstr(reason) && code != 407 && code != 302) {
|
||||
reason = sip_status_phrase(code);
|
||||
if (zstr(reason)) {
|
||||
reason = "Because";
|
||||
}
|
||||
}
|
||||
|
||||
if (code == 407 && !msg->numeric_arg) {
|
||||
const char *to_uri = switch_channel_get_variable(channel, "sip_to_uri");
|
||||
const char *to_host = reason;
|
||||
|
||||
if (zstr(to_host)) {
|
||||
to_host = switch_channel_get_variable(channel, "sip_to_host");
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Challenging call %s\n", to_uri);
|
||||
sofia_reg_auth_challenge(tech_pvt->profile, tech_pvt->nh, NULL, REG_INVITE, to_host, 0);
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_USER_CHALLENGE);
|
||||
} else if (code == 484 && msg->numeric_arg) {
|
||||
const char *to = switch_channel_get_variable(channel, "sip_to_uri");
|
||||
const char *max_forwards = switch_channel_get_variable(channel, SWITCH_MAX_FORWARDS_VARIABLE);
|
||||
char *cid = generate_pai_str(tech_pvt);
|
||||
char *to_uri = NULL;
|
||||
|
||||
if (to) {
|
||||
char *p;
|
||||
to_uri = switch_core_session_sprintf(session, "sip:%s", to);
|
||||
if ((p = strstr(to_uri, ":5060"))) {
|
||||
*p = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
if (!switch_channel_test_flag(channel, CF_ANSWERED) && !sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_RESPONSE_HEADER_PREFIX);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Overlap Dial with %d %s\n", code, reason);
|
||||
|
||||
nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), TAG_IF(to_uri, SIPTAG_CONTACT_STR(to_uri)),
|
||||
SIPTAG_SUPPORTED_STR(NULL), SIPTAG_ACCEPT_STR(NULL),
|
||||
TAG_IF(cid, SIPTAG_HEADER_STR(cid)),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
|
||||
TAG_IF(!zstr(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)), TAG_END());
|
||||
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
|
||||
switch_safe_free(extra_headers);
|
||||
}
|
||||
} else if (code == 302 && !zstr(msg->string_arg)) {
|
||||
char *p;
|
||||
|
||||
if ((p = strchr(msg->string_arg, ' '))) {
|
||||
*p = '\0';
|
||||
msg->string_arg = p;
|
||||
}
|
||||
|
||||
msg->message_id = SWITCH_MESSAGE_INDICATE_REDIRECT;
|
||||
switch_core_session_receive_message(session, msg);
|
||||
goto end_lock;
|
||||
} else {
|
||||
if (!sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_PROGRESS_HEADER_PREFIX);
|
||||
char *sdp = (char *) msg->pointer_arg;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Responding with %d [%s]\n", code, reason);
|
||||
sofia_clear_flag(tech_pvt, TFLAG_REINVITED);
|
||||
|
||||
if (!zstr((sdp))) {
|
||||
if (!strcasecmp(sdp, "t38")) {
|
||||
switch_t38_options_t *t38_options = switch_channel_get_private(tech_pvt->channel, "t38_options");
|
||||
if (t38_options) {
|
||||
sofia_glue_set_image_sdp(tech_pvt, t38_options, 0);
|
||||
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||
sofia_clear_flag(tech_pvt, TFLAG_NOTIMER_DURING_BRIDGE);
|
||||
switch_rtp_udptl_mode(tech_pvt->rtp_session);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sofia_glue_tech_set_local_sdp(tech_pvt, sdp, SWITCH_TRUE);
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||
sofia_glue_tech_patch_sdp(tech_pvt);
|
||||
sofia_glue_tech_proxy_remote_addr(tech_pvt, NULL);
|
||||
}
|
||||
if (sofia_use_soa(tech_pvt)) {
|
||||
nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
|
||||
SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
|
||||
SOATAG_REUSE_REJECTED(1),
|
||||
SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_END());
|
||||
} else {
|
||||
nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
|
||||
NUTAG_MEDIA_ENABLE(0),
|
||||
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
|
||||
SIPTAG_PAYLOAD_STR(tech_pvt->local_sdp_str),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_END());
|
||||
}
|
||||
if (sofia_test_pflag(tech_pvt->profile, PFLAG_3PCC_PROXY) && sofia_test_flag(tech_pvt, TFLAG_3PCC)) {
|
||||
/* Unlock the session signal to allow the ack to make it in */
|
||||
// Maybe we should timeout?
|
||||
switch_mutex_unlock(tech_pvt->sofia_mutex);
|
||||
|
||||
while (switch_channel_ready(channel) && !sofia_test_flag(tech_pvt, TFLAG_3PCC_HAS_ACK)) {
|
||||
switch_cond_next();
|
||||
}
|
||||
|
||||
/* Regain lock on sofia */
|
||||
switch_mutex_lock(tech_pvt->sofia_mutex);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "3PCC-PROXY, Done waiting for ACK\n");
|
||||
sofia_clear_flag(tech_pvt, TFLAG_3PCC);
|
||||
sofia_clear_flag(tech_pvt, TFLAG_3PCC_HAS_ACK);
|
||||
switch_core_session_pass_indication(session, SWITCH_MESSAGE_INDICATE_ANSWER);
|
||||
}
|
||||
} else {
|
||||
nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_END());
|
||||
}
|
||||
switch_safe_free(extra_headers);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SWITCH_MESSAGE_INDICATE_RINGING:
|
||||
@@ -2997,6 +3013,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
|
||||
stream->write_function(stream, "NOMEDIA \t%s\n", sofia_test_flag(profile, TFLAG_INB_NOMEDIA) ? "true" : "false");
|
||||
stream->write_function(stream, "LATE-NEG \t%s\n", sofia_test_flag(profile, TFLAG_LATE_NEGOTIATION) ? "true" : "false");
|
||||
stream->write_function(stream, "PROXY-MEDIA \t%s\n", sofia_test_flag(profile, TFLAG_PROXY_MEDIA) ? "true" : "false");
|
||||
stream->write_function(stream, "ZRTP-PASSTHRU \t%s\n", sofia_test_flag(profile, TFLAG_ZRTP_PASSTHRU) ? "true" : "false");
|
||||
stream->write_function(stream, "AGGRESSIVENAT \t%s\n",
|
||||
sofia_test_pflag(profile, PFLAG_AGGRESSIVE_NAT_DETECTION) ? "true" : "false");
|
||||
stream->write_function(stream, "STUN-ENABLED \t%s\n", sofia_test_pflag(profile, PFLAG_STUN_ENABLED) ? "true" : "false");
|
||||
@@ -3275,6 +3292,7 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
|
||||
stream->write_function(stream, " <nomedia>%s</nomedia>\n", sofia_test_flag(profile, TFLAG_INB_NOMEDIA) ? "true" : "false");
|
||||
stream->write_function(stream, " <late-neg>%s</late-neg>\n", sofia_test_flag(profile, TFLAG_LATE_NEGOTIATION) ? "true" : "false");
|
||||
stream->write_function(stream, " <proxy-media>%s</proxy-media>\n", sofia_test_flag(profile, TFLAG_PROXY_MEDIA) ? "true" : "false");
|
||||
stream->write_function(stream, " <zrtp-passthru>%s</zrtp-passthru>\n", sofia_test_flag(profile, TFLAG_ZRTP_PASSTHRU) ? "true" : "false");
|
||||
stream->write_function(stream, " <aggressive-nat>%s</aggressive-nat>\n",
|
||||
sofia_test_pflag(profile, PFLAG_AGGRESSIVE_NAT_DETECTION) ? "true" : "false");
|
||||
stream->write_function(stream, " <stun-enabled>%s</stun-enabled>\n",
|
||||
@@ -4785,6 +4803,17 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
|
||||
sofia_clear_flag(ctech_pvt, TFLAG_ENABLE_SOA);
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(o_channel, CF_ZRTP_PASSTHRU_REQ)) {
|
||||
const char *x = NULL;
|
||||
sofia_glue_pass_zrtp_hash2(session, nsession);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "[zrtp_passthru] Setting a-leg inherit_codec=true\n");
|
||||
switch_channel_set_variable(o_channel, "inherit_codec", "true");
|
||||
if ((x = switch_channel_get_variable(o_channel, "ep_codec_string"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "[zrtp_passthru] Setting b-leg absolute_codec_string='%s'\n", x);
|
||||
switch_channel_set_variable(nchannel, "absolute_codec_string", x);
|
||||
}
|
||||
}
|
||||
|
||||
/* SNARK: lets copy this across so we can see if we're the other leg of 3PCC + bypass_media... */
|
||||
if (sofia_test_flag(ctech_pvt, TFLAG_3PCC) && (switch_channel_test_flag(o_channel, CF_PROXY_MODE) || switch_channel_test_flag(o_channel, CF_PROXY_MEDIA))) {
|
||||
sofia_set_flag(tech_pvt, TFLAG_3PCC_INVITE);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
* Paul D. Tinsley <pdt at jackhammer.org>
|
||||
* Bret McDanel <trixter AT 0xdecafbad.com>
|
||||
* Marcel Barbulescu <marcelbarbulescu@gmail.com>
|
||||
* Raymond Chandler <intralanman@gmail.com>
|
||||
*
|
||||
*
|
||||
* mod_sofia.h -- SOFIA SIP Endpoint
|
||||
@@ -92,7 +93,7 @@ typedef struct private_object private_object_t;
|
||||
|
||||
#define MULTICAST_EVENT "multicast::event"
|
||||
#define SOFIA_REPLACES_HEADER "_sofia_replaces_"
|
||||
#define SOFIA_USER_AGENT "FreeSWITCH-mod_sofia/" SWITCH_VERSION_MAJOR "." SWITCH_VERSION_MINOR "." SWITCH_VERSION_MICRO "-" SWITCH_VERSION_REVISION
|
||||
#define SOFIA_USER_AGENT "FreeSWITCH-mod_sofia/" SWITCH_VERSION_FULL
|
||||
#define SOFIA_CHAT_PROTO "sip"
|
||||
#define SOFIA_MULTIPART_PREFIX "sip_mp_"
|
||||
#define SOFIA_MULTIPART_PREFIX_T "~sip_mp_"
|
||||
@@ -317,6 +318,7 @@ typedef enum {
|
||||
TFLAG_TPORT_LOG,
|
||||
TFLAG_SENT_UPDATE,
|
||||
TFLAG_PROXY_MEDIA,
|
||||
TFLAG_ZRTP_PASSTHRU,
|
||||
TFLAG_HOLD_LOCK,
|
||||
TFLAG_3PCC_HAS_ACK,
|
||||
TFLAG_PASS_RFC2833,
|
||||
@@ -516,7 +518,8 @@ struct sofia_gateway {
|
||||
typedef enum {
|
||||
PRES_TYPE_NONE = 0,
|
||||
PRES_TYPE_FULL = 1,
|
||||
PRES_TYPE_PASSIVE = 2
|
||||
PRES_TYPE_PASSIVE = 2,
|
||||
PRES_TYPE_PNP = 3
|
||||
} sofia_presence_type_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -585,12 +588,15 @@ struct sofia_profile {
|
||||
char *rtcp_audio_interval_msec;
|
||||
char *rtcp_video_interval_msec;
|
||||
char *jb_msec;
|
||||
char *pnp_prov_url;
|
||||
char *pnp_notify_profile;
|
||||
sofia_cid_type_t cid_type;
|
||||
sofia_dtmf_t dtmf_type;
|
||||
int auto_restart;
|
||||
switch_port_t sip_port;
|
||||
switch_port_t tls_sip_port;
|
||||
int tls_version;
|
||||
unsigned int tls_timeout;
|
||||
char *inbound_codec_string;
|
||||
char *outbound_codec_string;
|
||||
int running;
|
||||
@@ -825,6 +831,11 @@ struct private_object {
|
||||
switch_payload_t ianacodes[SWITCH_MAX_CODECS];
|
||||
uint32_t session_timeout;
|
||||
enum nua_session_refresher session_refresher;
|
||||
/** ZRTP **/
|
||||
char *local_sdp_audio_zrtp_hash;
|
||||
char *local_sdp_video_zrtp_hash;
|
||||
char *remote_sdp_audio_zrtp_hash;
|
||||
char *remote_sdp_video_zrtp_hash;
|
||||
};
|
||||
|
||||
struct callback_t {
|
||||
@@ -932,6 +943,8 @@ void launch_sofia_profile_thread(sofia_profile_t *profile);
|
||||
switch_status_t sofia_presence_chat_send(switch_event_t *message_event);
|
||||
|
||||
void sofia_glue_tech_absorb_sdp(private_object_t *tech_pvt);
|
||||
void sofia_glue_pass_zrtp_hash2(switch_core_session_t *aleg_session, switch_core_session_t *bleg_session);
|
||||
void sofia_glue_pass_zrtp_hash(switch_core_session_t *session);
|
||||
|
||||
/*
|
||||
* \brief Sets the "ep_codec_string" channel variable, parsing r_sdp and taing codec_string in consideration
|
||||
|
||||
@@ -618,7 +618,7 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status,
|
||||
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_SLA_BARGE)) {
|
||||
switch_core_session_t *new_session, *other_session;
|
||||
const char *other_uuid = switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *other_uuid = switch_channel_get_partner_uuid(tech_pvt->channel);
|
||||
char *cmd = NULL;
|
||||
|
||||
if (!zstr(other_uuid) && (other_session = switch_core_session_locate(other_uuid))) {
|
||||
@@ -783,7 +783,7 @@ void sofia_send_callee_id(switch_core_session_t *session, const char *name, cons
|
||||
number = caller_profile->destination_number;
|
||||
}
|
||||
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (session_b = switch_core_session_locate(uuid))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid(channel)) && (session_b = switch_core_session_locate(uuid))) {
|
||||
switch_core_session_message_t *msg;
|
||||
//switch_channel_t *channel_b = switch_core_session_get_channel(session_b);
|
||||
|
||||
@@ -906,7 +906,7 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
|
||||
caller_profile->callee_id_number = switch_sanitize_number(switch_core_strdup(caller_profile->pool, number));
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s Update Callee ID to \"%s\" <%s>\n", switch_channel_get_name(channel), name, number);
|
||||
|
||||
if (lazy || (att && !switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
|
||||
if (lazy || (att && !switch_channel_get_partner_uuid(channel))) {
|
||||
switch_channel_flip_cid(channel);
|
||||
}
|
||||
}
|
||||
@@ -914,7 +914,7 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
|
||||
if (send) {
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CALL_UPDATE) == SWITCH_STATUS_SUCCESS) {
|
||||
const char *uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *uuid = switch_channel_get_partner_uuid(channel);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Direction", "RECV");
|
||||
if (uuid) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridged-To", uuid);
|
||||
@@ -2071,6 +2071,8 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
|
||||
TPTAG_TLS_VERIFY_SUBJECTS(profile->tls_verify_in_subjects)),
|
||||
TAG_IF(sofia_test_pflag(profile, PFLAG_TLS),
|
||||
TPTAG_TLS_VERSION(profile->tls_version)),
|
||||
TAG_IF(sofia_test_pflag(profile, PFLAG_TLS) && profile->tls_timeout,
|
||||
TPTAG_TLS_TIMEOUT(profile->tls_timeout)),
|
||||
TAG_IF(!strchr(profile->sipip, ':'),
|
||||
NTATAG_UDP_MTU(65535)),
|
||||
TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_SRV),
|
||||
@@ -2138,6 +2140,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
|
||||
TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("include-session-description")),
|
||||
TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("presence.winfo")),
|
||||
TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("message-summary")),
|
||||
TAG_IF(profile->pres_type == PRES_TYPE_PNP, NUTAG_ALLOW_EVENTS("ua-profile")),
|
||||
NUTAG_ALLOW_EVENTS("refer"), SIPTAG_SUPPORTED_STR(supported), SIPTAG_USER_AGENT_STR(profile->user_agent), TAG_END());
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set params for %s\n", profile->name);
|
||||
@@ -2251,7 +2254,11 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
|
||||
sofia_clear_pflag_locked(profile, PFLAG_SHUTDOWN);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Waiting for worker thread\n");
|
||||
|
||||
switch_thread_join(&st, worker_thread);
|
||||
if ( worker_thread ) {
|
||||
switch_thread_join(&st, worker_thread);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: Sofia worker thead failed to start\n");
|
||||
}
|
||||
|
||||
sanity = 4;
|
||||
while (profile->inuse) {
|
||||
@@ -3321,6 +3328,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
|
||||
} else {
|
||||
sofia_clear_flag(profile, TFLAG_PROXY_MEDIA);
|
||||
}
|
||||
} else if (!strcasecmp(var, "inbound-zrtp-passthru")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_flag(profile, TFLAG_ZRTP_PASSTHRU);
|
||||
} else {
|
||||
sofia_clear_flag(profile, TFLAG_ZRTP_PASSTHRU);
|
||||
}
|
||||
} else if (!strcasecmp(var, "inbound-use-callid-as-uuid")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_CALLID_AS_UUID);
|
||||
@@ -3695,6 +3708,10 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
|
||||
}
|
||||
}
|
||||
|
||||
if (sofia_test_flag(profile, TFLAG_ZRTP_PASSTHRU)) {
|
||||
sofia_set_flag(profile, TFLAG_LATE_NEGOTIATION);
|
||||
}
|
||||
|
||||
if ((gateways_tag = switch_xml_child(xprofile, "gateways"))) {
|
||||
parse_gateways(profile, gateways_tag);
|
||||
}
|
||||
@@ -3919,6 +3936,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
profile->sip_force_expires = 0;
|
||||
profile->sip_expires_max_deviation = 0;
|
||||
profile->tls_version = 0;
|
||||
profile->tls_timeout = 300;
|
||||
profile->mflags = MFLAG_REFER | MFLAG_REGISTER;
|
||||
profile->server_rport_level = 1;
|
||||
profile->client_rport_level = 1;
|
||||
@@ -4171,6 +4189,8 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
}
|
||||
} else if (!strcasecmp(var, "inbound-proxy-media") && switch_true(val)) {
|
||||
sofia_set_flag(profile, TFLAG_PROXY_MEDIA);
|
||||
} else if (!strcasecmp(var, "inbound-zrtp-passthru") && switch_true(val)) {
|
||||
sofia_set_flag(profile, TFLAG_ZRTP_PASSTHRU);
|
||||
} else if (!strcasecmp(var, "force-subscription-expires")) {
|
||||
int tmp = atoi(val);
|
||||
if (tmp > 0) {
|
||||
@@ -4405,10 +4425,16 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
} else if (!strcasecmp(val, "bypass-media-after-att-xfer")) {
|
||||
profile->media_options |= MEDIA_OPT_BYPASS_AFTER_ATT_XFER;
|
||||
}
|
||||
} else if (!strcasecmp(var, "pnp-provision-url")) {
|
||||
profile->pnp_prov_url = switch_core_strdup(profile->pool, val);
|
||||
} else if (!strcasecmp(var, "pnp-notify-profile")) {
|
||||
profile->pnp_notify_profile = switch_core_strdup(profile->pool, val);
|
||||
} else if (!strcasecmp(var, "manage-presence")) {
|
||||
if (!strcasecmp(val, "passive")) {
|
||||
profile->pres_type = PRES_TYPE_PASSIVE;
|
||||
|
||||
} else if (!strcasecmp(val, "pnp")) {
|
||||
profile->pres_type = PRES_TYPE_PNP;
|
||||
} else if (switch_true(val)) {
|
||||
profile->pres_type = PRES_TYPE_FULL;
|
||||
}
|
||||
@@ -4731,6 +4757,9 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
} else {
|
||||
profile->tls_version = 0;
|
||||
}
|
||||
} else if (!strcasecmp(var, "tls-timeout")) {
|
||||
int v = atoi(val);
|
||||
profile->tls_timeout = v > 0 ? (unsigned int)v : 300;
|
||||
} else if (!strcasecmp(var, "timer-T1")) {
|
||||
int v = atoi(val);
|
||||
if (v > 0) {
|
||||
@@ -4801,6 +4830,11 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
}
|
||||
}
|
||||
|
||||
if (sofia_test_flag(profile, TFLAG_ZRTP_PASSTHRU) && !sofia_test_flag(profile, TFLAG_LATE_NEGOTIATION)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "ZRTP passthrough implictly enables inbound-late-negotiation\n");
|
||||
sofia_set_flag(profile, TFLAG_LATE_NEGOTIATION);
|
||||
}
|
||||
|
||||
if ((!profile->cng_pt) && (!sofia_test_pflag(profile, PFLAG_SUPPRESS_CNG))) {
|
||||
profile->cng_pt = SWITCH_RTP_CNG_PAYLOAD;
|
||||
}
|
||||
@@ -4858,6 +4892,23 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
profile->sipdomain = switch_core_strdup(profile->pool, profile->sipip);
|
||||
}
|
||||
|
||||
if (profile->pres_type == PRES_TYPE_PNP) {
|
||||
if (!profile->pnp_prov_url) {
|
||||
profile->pnp_prov_url = switch_core_sprintf(profile->pool, "http://%s/provision/", mod_sofia_globals.guess_ip);
|
||||
}
|
||||
|
||||
if (!profile->pnp_notify_profile) {
|
||||
profile->pnp_notify_profile = switch_core_strdup(profile->pool, mod_sofia_globals.guess_ip);
|
||||
}
|
||||
|
||||
if (!profile->extsipip) {
|
||||
profile->extsipip = switch_core_strdup(profile->pool, mod_sofia_globals.guess_ip);
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "we're configured to provision to [%s] on profile [%s]\n",
|
||||
profile->pnp_prov_url, profile->pnp_notify_profile);
|
||||
}
|
||||
|
||||
config_sofia_profile_urls(profile);
|
||||
|
||||
if (sofia_test_pflag(profile, PFLAG_TLS) && !profile->tls_cert_dir) {
|
||||
@@ -5195,7 +5246,7 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((br = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
|
||||
if ((br = switch_channel_get_partner_uuid(channel))) {
|
||||
switch_xml_t root = NULL, domain = NULL;
|
||||
switch_core_session_t *a_session;
|
||||
switch_channel_t *a_channel;
|
||||
@@ -5354,7 +5405,7 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_SENT_UPDATE)) {
|
||||
sofia_clear_flag_locked(tech_pvt, TFLAG_SENT_UPDATE);
|
||||
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid(channel)) && (other_session = switch_core_session_locate(uuid))) {
|
||||
const char *r_sdp = NULL;
|
||||
switch_core_session_message_t *msg;
|
||||
private_object_t *other_tech_pvt = switch_core_session_get_private(other_session);
|
||||
@@ -5586,7 +5637,7 @@ void *SWITCH_THREAD_FUNC media_on_hold_thread_run(switch_thread_t *thread, void
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
private_object_t *tech_pvt = switch_core_session_get_private(session);
|
||||
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid(channel)) && (other_session = switch_core_session_locate(uuid))) {
|
||||
if (switch_core_session_compare(session, other_session)) {
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_HOLD_LOCK);
|
||||
switch_ivr_media(switch_core_session_get_uuid(other_session), SMF_REBRIDGE);
|
||||
@@ -5799,7 +5850,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
||||
tech_pvt->remote_sdp_str = switch_core_session_strdup(session, r_sdp);
|
||||
switch_channel_set_variable(channel, SWITCH_R_SDP_VARIABLE, r_sdp);
|
||||
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION) && (parser = sdp_parse(NULL, r_sdp, (int) strlen(r_sdp), 0))) {
|
||||
if ((sofia_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION) || switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) && (parser = sdp_parse(NULL, r_sdp, (int) strlen(r_sdp), 0))) {
|
||||
if ((sdp = sdp_session(parser))) {
|
||||
sofia_glue_set_r_sdp_codec_string(session, sofia_glue_get_codec_string(tech_pvt), sdp);
|
||||
}
|
||||
@@ -6041,7 +6092,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
||||
}
|
||||
|
||||
if ((b_private = nua_handle_magic(bnh))) {
|
||||
const char *br_b = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
const char *br_b = switch_channel_get_partner_uuid(channel);
|
||||
char *br_a = b_private->uuid;
|
||||
|
||||
|
||||
@@ -6781,6 +6832,9 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||
|
||||
nua_respond(nh, SIP_202_ACCEPTED, NUTAG_WITH_THIS_MSG(de->data->e_msg), SIPTAG_EXPIRES_STR("60"), TAG_END());
|
||||
|
||||
|
||||
switch_channel_set_variable(tech_pvt->channel, SOFIA_REPLACES_HEADER, NULL);
|
||||
|
||||
if (sip->sip_referred_by) {
|
||||
full_ref_by = sip_header_as_string(home, (void *) sip->sip_referred_by);
|
||||
}
|
||||
@@ -6843,8 +6897,8 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||
b_tech_pvt = (private_object_t *) switch_core_session_get_private(b_session);
|
||||
channel_b = switch_core_session_get_channel(b_session);
|
||||
|
||||
br_a = switch_channel_get_variable(channel_a, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
br_b = switch_channel_get_variable(channel_b, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
br_a = switch_channel_get_partner_uuid(channel_a);
|
||||
br_b = switch_channel_get_partner_uuid(channel_b);
|
||||
|
||||
if (!switch_ivr_uuid_exists(br_a)) {
|
||||
br_a = NULL;
|
||||
@@ -7093,7 +7147,7 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||
}
|
||||
nua_handle_unref(bnh);
|
||||
} else { /* the other channel is on a different box, we have to go find them */
|
||||
if (exten && (br_a = switch_channel_get_variable(channel_a, SWITCH_SIGNAL_BOND_VARIABLE))) {
|
||||
if (exten && (br_a = switch_channel_get_partner_uuid(channel_a))) {
|
||||
switch_core_session_t *a_session;
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
|
||||
@@ -7216,7 +7270,7 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||
const char *br;
|
||||
switch_core_session_t *b_session;
|
||||
|
||||
if ((br = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (b_session = switch_core_session_locate(br))) {
|
||||
if ((br = switch_channel_get_partner_uuid(channel)) && (b_session = switch_core_session_locate(br))) {
|
||||
|
||||
const char *var;
|
||||
switch_channel_t *b_channel = switch_core_session_get_channel(b_session);
|
||||
@@ -7538,7 +7592,7 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||
const char *uuid;
|
||||
switch_core_session_t *session_b;
|
||||
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (session_b = switch_core_session_locate(uuid))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid(channel)) && (session_b = switch_core_session_locate(uuid))) {
|
||||
while (switch_channel_has_dtmf(channel)) {
|
||||
switch_dtmf_t idtmf = { 0, 0 };
|
||||
if (switch_channel_dequeue_dtmf(channel, &idtmf) == SWITCH_STATUS_SUCCESS) {
|
||||
@@ -7625,6 +7679,11 @@ void sofia_handle_sip_i_reinvite(switch_core_session_t *session,
|
||||
tagi_t tags[])
|
||||
{
|
||||
char *call_info = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
|
||||
if (session) {
|
||||
channel = switch_core_session_get_channel(session);
|
||||
}
|
||||
|
||||
if (session && profile && sip && sofia_test_pflag(profile, PFLAG_TRACK_CALLS)) {
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
@@ -7649,7 +7708,6 @@ void sofia_handle_sip_i_reinvite(switch_core_session_t *session,
|
||||
}
|
||||
|
||||
if (sofia_test_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE)) {
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
if (channel && sip->sip_call_info) {
|
||||
char *p;
|
||||
if ((call_info = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_call_info))) {
|
||||
@@ -7663,6 +7721,14 @@ void sofia_handle_sip_i_reinvite(switch_core_session_t *session,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (channel) {
|
||||
if (sip->sip_payload && sip->sip_payload->pl_data) {
|
||||
switch_channel_set_variable(channel, "sip_reinvite_sdp", sip->sip_payload->pl_data);
|
||||
}
|
||||
switch_channel_execute_on(channel, "execute_on_sip_reinvite");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sofia_private_t *sofia_private, sip_t const *sip,
|
||||
@@ -8264,6 +8330,10 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||
switch_channel_set_flag(channel, CF_PROXY_MEDIA);
|
||||
}
|
||||
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_ZRTP_PASSTHRU)) {
|
||||
switch_channel_set_flag(channel, CF_ZRTP_PASSTHRU_REQ);
|
||||
}
|
||||
|
||||
if (!tech_pvt->call_id && sip->sip_call_id && sip->sip_call_id->i_id) {
|
||||
tech_pvt->call_id = switch_core_session_strdup(session, sip->sip_call_id->i_id);
|
||||
switch_channel_set_variable(channel, "sip_call_id", tech_pvt->call_id);
|
||||
@@ -8555,7 +8625,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||
|
||||
tech_pvt->caller_profile->dialplan = "inline";
|
||||
|
||||
bridge_uuid = switch_channel_get_variable(b_channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
bridge_uuid = switch_channel_get_partner_uuid(b_channel);
|
||||
|
||||
if (call_info) {
|
||||
const char *olu;
|
||||
|
||||
@@ -184,7 +184,6 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
|
||||
int rate;
|
||||
int already_did[128] = { 0 };
|
||||
int ptime = 0, noptime = 0;
|
||||
const char *zrtp;
|
||||
|
||||
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "m=audio %d RTP/%sAVP",
|
||||
port, secure ? "S" : "");
|
||||
@@ -344,11 +343,14 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
|
||||
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=ptime:%d\n", cur_ptime);
|
||||
}
|
||||
|
||||
if ((zrtp = switch_channel_get_variable(tech_pvt->channel, "sdp_zrtp_hash_string"))) {
|
||||
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=zrtp-hash:%s\n", zrtp);
|
||||
if (tech_pvt->local_sdp_audio_zrtp_hash) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Adding audio a=zrtp-hash:%s\n",
|
||||
tech_pvt->local_sdp_audio_zrtp_hash);
|
||||
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=zrtp-hash:%s\n",
|
||||
tech_pvt->local_sdp_audio_zrtp_hash);
|
||||
}
|
||||
|
||||
if (sr) {
|
||||
if (!zstr(sr)) {
|
||||
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=%s\n", sr);
|
||||
}
|
||||
}
|
||||
@@ -373,7 +375,7 @@ void sofia_glue_check_dtmf_type(private_object_t *tech_pvt)
|
||||
|
||||
void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch_port_t port, const char *sr, int force)
|
||||
{
|
||||
char buf[2048];
|
||||
char buf[65536];
|
||||
int ptime = 0;
|
||||
uint32_t rate = 0;
|
||||
uint32_t v_port;
|
||||
@@ -391,7 +393,6 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
switch_event_t *map = NULL, *ptmap = NULL;
|
||||
const char *b_sdp = NULL;
|
||||
int verbose_sdp = 0;
|
||||
const char *zrtp;
|
||||
|
||||
sofia_glue_check_dtmf_type(tech_pvt);
|
||||
|
||||
@@ -433,7 +434,7 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
verbose_sdp = 1;
|
||||
}
|
||||
|
||||
if (!force && !ip && !sr
|
||||
if (!force && !ip && zstr(sr)
|
||||
&& (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE) || switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MEDIA))) {
|
||||
return;
|
||||
}
|
||||
@@ -464,7 +465,7 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
sofia_glue_sdp_map(b_sdp, &map, &ptmap);
|
||||
}
|
||||
|
||||
if (!sr) {
|
||||
if (zstr(sr)) {
|
||||
if ((var_val = switch_channel_get_variable(tech_pvt->channel, "media_audio_mode"))) {
|
||||
sr = var_val;
|
||||
} else {
|
||||
@@ -484,7 +485,9 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
|
||||
if ((tech_pvt->profile->ndlb & PFLAG_NDLB_SENDRECV_IN_SESSION) ||
|
||||
((var_val = switch_channel_get_variable(tech_pvt->channel, "ndlb_sendrecv_in_session")) && switch_true(var_val))) {
|
||||
switch_snprintf(srbuf, sizeof(srbuf), "a=%s\n", sr);
|
||||
if (!zstr(sr)) {
|
||||
switch_snprintf(srbuf, sizeof(srbuf), "a=%s\n", sr);
|
||||
}
|
||||
sr = NULL;
|
||||
}
|
||||
|
||||
@@ -545,11 +548,15 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=ptime:%d\n", ptime);
|
||||
}
|
||||
|
||||
if ((zrtp = switch_channel_get_variable(tech_pvt->channel, "sdp_zrtp_hash_string"))) {
|
||||
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=zrtp-hash:%s\n", zrtp);
|
||||
|
||||
if (tech_pvt->local_sdp_audio_zrtp_hash) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Adding audio a=zrtp-hash:%s\n",
|
||||
tech_pvt->local_sdp_audio_zrtp_hash);
|
||||
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=zrtp-hash:%s\n",
|
||||
tech_pvt->local_sdp_audio_zrtp_hash);
|
||||
}
|
||||
|
||||
if (sr) {
|
||||
if (!zstr(sr)) {
|
||||
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=%s\n", sr);
|
||||
}
|
||||
|
||||
@@ -614,7 +621,7 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
cur_ptime = this_ptime;
|
||||
|
||||
if ((!zstr(tech_pvt->local_crypto_key) && sofia_test_flag(tech_pvt, TFLAG_SECURE))) {
|
||||
generate_m(tech_pvt, buf, sizeof(buf), port, cur_ptime, append_audio, sr, use_cng, cng_type, map, verbose_sdp, 1);
|
||||
generate_m(tech_pvt, bp, sizeof(buf) - strlen(buf), port, cur_ptime, append_audio, sr, use_cng, cng_type, map, verbose_sdp, 1);
|
||||
bp = (buf + strlen(buf));
|
||||
|
||||
/* asterisk can't handle AVP and SAVP in sep streams, way to blow off the spec....*/
|
||||
@@ -683,7 +690,7 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
|
||||
pass_fmtp = NULL;
|
||||
|
||||
if (switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE)) {
|
||||
if (switch_channel_get_partner_uuid(tech_pvt->channel)) {
|
||||
if ((of = switch_channel_get_variable_partner(tech_pvt->channel, "sip_video_fmtp"))) {
|
||||
pass_fmtp = of;
|
||||
}
|
||||
@@ -747,6 +754,13 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (tech_pvt->local_sdp_video_zrtp_hash) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Adding video a=zrtp-hash:%s\n",
|
||||
tech_pvt->local_sdp_video_zrtp_hash);
|
||||
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=zrtp-hash:%s\n",
|
||||
tech_pvt->local_sdp_video_zrtp_hash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -764,19 +778,23 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
|
||||
|
||||
const char *sofia_glue_get_codec_string(private_object_t *tech_pvt)
|
||||
{
|
||||
const char *codec_string = NULL, *preferred = NULL, *fallback = NULL;
|
||||
|
||||
if (switch_channel_direction(tech_pvt->channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
|
||||
preferred = tech_pvt->profile->outbound_codec_string;
|
||||
fallback = tech_pvt->profile->inbound_codec_string;
|
||||
} else {
|
||||
preferred = tech_pvt->profile->inbound_codec_string;
|
||||
fallback = tech_pvt->profile->outbound_codec_string;
|
||||
const char *preferred = NULL, *fallback = NULL;
|
||||
|
||||
if (!(preferred = switch_channel_get_variable(tech_pvt->channel, "absolute_codec_string"))) {
|
||||
preferred = switch_channel_get_variable(tech_pvt->channel, "codec_string");
|
||||
}
|
||||
|
||||
if (!preferred) {
|
||||
if (switch_channel_direction(tech_pvt->channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
|
||||
preferred = tech_pvt->profile->outbound_codec_string;
|
||||
fallback = tech_pvt->profile->inbound_codec_string;
|
||||
} else {
|
||||
preferred = tech_pvt->profile->inbound_codec_string;
|
||||
fallback = tech_pvt->profile->outbound_codec_string;
|
||||
}
|
||||
}
|
||||
|
||||
codec_string = !zstr(preferred) ? preferred : fallback;
|
||||
|
||||
return codec_string;
|
||||
return !zstr(preferred) ? preferred : fallback;
|
||||
}
|
||||
|
||||
void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt)
|
||||
@@ -1739,7 +1757,7 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt)
|
||||
|
||||
}
|
||||
|
||||
} else if ((!strncmp("m=audio ", p, 8) && *(p + 9) != '0') || (!strncmp("m=image ", p, 8) && *(p + 9) != '0')) {
|
||||
} else if ((!strncmp("m=audio ", p, 8) && *(p + 8) != '0') || (!strncmp("m=image ", p, 8) && *(p + 8) != '0')) {
|
||||
strncpy(q, p, 8);
|
||||
p += 8;
|
||||
|
||||
@@ -1775,7 +1793,7 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt)
|
||||
|
||||
has_audio++;
|
||||
|
||||
} else if (!strncmp("m=video ", p, 8) && *(p + 9) != '0') {
|
||||
} else if (!strncmp("m=video ", p, 8) && *(p + 8) != '0') {
|
||||
if (!has_video) {
|
||||
sofia_glue_tech_choose_video_port(tech_pvt, 1);
|
||||
tech_pvt->video_rm_encoding = "PROXY-VID";
|
||||
@@ -2075,7 +2093,9 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
||||
}
|
||||
|
||||
|
||||
rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER);
|
||||
if ((rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER))) {
|
||||
switch_channel_set_variable(channel, SOFIA_REPLACES_HEADER, NULL);
|
||||
}
|
||||
|
||||
switch_assert(tech_pvt != NULL);
|
||||
|
||||
@@ -2578,6 +2598,11 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
||||
tech_pvt->session_refresher = nua_no_refresher;
|
||||
}
|
||||
|
||||
if (tech_pvt->local_sdp_str) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG,
|
||||
"Local SDP:\n%s\n", tech_pvt->local_sdp_str);
|
||||
}
|
||||
|
||||
if (sofia_use_soa(tech_pvt)) {
|
||||
nua_invite(tech_pvt->nh,
|
||||
NUTAG_AUTOANSWER(0),
|
||||
@@ -3563,9 +3588,11 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
switch_channel_set_variable(tech_pvt->channel, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, tmp);
|
||||
|
||||
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_ZRTP_PASS)) {
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_ZRTP_PASSTHRU)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_INFO, "Activating ZRTP PROXY MODE\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Disable NOTIMER_DURING_BRIDGE\n");
|
||||
sofia_clear_flag(tech_pvt, TFLAG_NOTIMER_DURING_BRIDGE);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Activating audio UDPTL mode\n");
|
||||
switch_rtp_udptl_mode(tech_pvt->rtp_session);
|
||||
}
|
||||
|
||||
@@ -3752,7 +3779,10 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_ZRTP_PASSTHRU)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Activating video UDPTL mode\n");
|
||||
switch_rtp_udptl_mode(tech_pvt->video_rtp_session);
|
||||
}
|
||||
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_ERROR, "VIDEO RTP REPORTS ERROR: [%s]\n", switch_str_nil(err));
|
||||
@@ -3837,7 +3867,104 @@ static void add_audio_codec(sdp_rtpmap_t *map, int ptime, char *buf, switch_size
|
||||
|
||||
}
|
||||
|
||||
void sofia_glue_pass_zrtp_hash2(switch_core_session_t *aleg_session, switch_core_session_t *bleg_session)
|
||||
{
|
||||
switch_channel_t *aleg_channel;
|
||||
private_object_t *aleg_tech_pvt;
|
||||
switch_channel_t *bleg_channel;
|
||||
private_object_t *bleg_tech_pvt;
|
||||
|
||||
if (!switch_core_session_compare(aleg_session, bleg_session)) {
|
||||
/* since this digs into channel internals its only compatible with sofia sessions*/
|
||||
return;
|
||||
}
|
||||
|
||||
aleg_channel = switch_core_session_get_channel(aleg_session);
|
||||
aleg_tech_pvt = switch_core_session_get_private(aleg_session);
|
||||
bleg_channel = switch_core_session_get_channel(bleg_session);
|
||||
bleg_tech_pvt = switch_core_session_get_private(bleg_session);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(aleg_channel), SWITCH_LOG_DEBUG, "Deciding whether to pass zrtp-hash between a-leg and b-leg\n");
|
||||
if (!(switch_channel_test_flag(aleg_tech_pvt->channel, CF_ZRTP_PASSTHRU_REQ))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(aleg_channel), SWITCH_LOG_DEBUG, "CF_ZRTP_PASSTHRU_REQ not set on a-leg, so not propagating zrtp-hash\n");
|
||||
return;
|
||||
}
|
||||
if (aleg_tech_pvt->remote_sdp_audio_zrtp_hash) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(aleg_channel), SWITCH_LOG_DEBUG, "Passing a-leg remote zrtp-hash (audio) to b-leg\n");
|
||||
bleg_tech_pvt->local_sdp_audio_zrtp_hash = switch_core_session_strdup(bleg_tech_pvt->session, aleg_tech_pvt->remote_sdp_audio_zrtp_hash);
|
||||
switch_channel_set_variable(bleg_channel, "l_sdp_audio_zrtp_hash", bleg_tech_pvt->local_sdp_audio_zrtp_hash);
|
||||
}
|
||||
if (aleg_tech_pvt->remote_sdp_video_zrtp_hash) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(aleg_channel), SWITCH_LOG_DEBUG, "Passing a-leg remote zrtp-hash (video) to b-leg\n");
|
||||
bleg_tech_pvt->local_sdp_video_zrtp_hash = switch_core_session_strdup(bleg_tech_pvt->session, aleg_tech_pvt->remote_sdp_video_zrtp_hash);
|
||||
switch_channel_set_variable(bleg_channel, "l_sdp_video_zrtp_hash", bleg_tech_pvt->local_sdp_video_zrtp_hash);
|
||||
}
|
||||
if (bleg_tech_pvt->remote_sdp_audio_zrtp_hash) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(aleg_channel), SWITCH_LOG_DEBUG, "Passing b-leg remote zrtp-hash (audio) to a-leg\n");
|
||||
aleg_tech_pvt->local_sdp_audio_zrtp_hash = switch_core_session_strdup(aleg_tech_pvt->session, bleg_tech_pvt->remote_sdp_audio_zrtp_hash);
|
||||
switch_channel_set_variable(aleg_channel, "l_sdp_audio_zrtp_hash", aleg_tech_pvt->local_sdp_audio_zrtp_hash);
|
||||
}
|
||||
if (bleg_tech_pvt->remote_sdp_video_zrtp_hash) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(aleg_channel), SWITCH_LOG_DEBUG, "Passing b-leg remote zrtp-hash (video) to a-leg\n");
|
||||
aleg_tech_pvt->local_sdp_video_zrtp_hash = switch_core_session_strdup(aleg_tech_pvt->session, bleg_tech_pvt->remote_sdp_video_zrtp_hash);
|
||||
switch_channel_set_variable(aleg_channel, "l_sdp_video_zrtp_hash", aleg_tech_pvt->local_sdp_video_zrtp_hash);
|
||||
}
|
||||
}
|
||||
|
||||
void sofia_glue_pass_zrtp_hash(switch_core_session_t *session)
|
||||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
private_object_t *tech_pvt = switch_core_session_get_private(session);
|
||||
switch_core_session_t *other_session;
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "Deciding whether to pass zrtp-hash between legs\n");
|
||||
if (!(switch_channel_test_flag(tech_pvt->channel, CF_ZRTP_PASSTHRU_REQ))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "CF_ZRTP_PASSTHRU_REQ not set, so not propagating zrtp-hash\n");
|
||||
return;
|
||||
} else if (!(switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "No partner channel found, so not propagating zrtp-hash\n");
|
||||
return;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "Found peer channel; propagating zrtp-hash if set\n");
|
||||
sofia_glue_pass_zrtp_hash2(session, other_session);
|
||||
switch_core_session_rwunlock(other_session);
|
||||
}
|
||||
}
|
||||
|
||||
static void find_zrtp_hash(switch_core_session_t *session, sdp_session_t *sdp)
|
||||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
private_object_t *tech_pvt = switch_core_session_get_private(session);
|
||||
sdp_media_t *m;
|
||||
sdp_attribute_t *attr;
|
||||
int got_audio = 0, got_video = 0;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "Looking for zrtp-hash\n");
|
||||
for (m = sdp->sdp_media; m; m = m->m_next) {
|
||||
if (got_audio && got_video) break;
|
||||
if (m->m_port && ((m->m_type == sdp_media_audio && !got_audio)
|
||||
|| (m->m_type == sdp_media_video && !got_video))) {
|
||||
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||
if (zstr(attr->a_name)) continue;
|
||||
if (strcasecmp(attr->a_name, "zrtp-hash") || !(attr->a_value)) continue;
|
||||
if (m->m_type == sdp_media_audio) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG,
|
||||
"Found audio zrtp-hash; setting r_sdp_audio_zrtp_hash=%s\n", attr->a_value);
|
||||
switch_channel_set_variable(channel, "r_sdp_audio_zrtp_hash", attr->a_value);
|
||||
tech_pvt->remote_sdp_audio_zrtp_hash = switch_core_session_strdup(tech_pvt->session, attr->a_value);
|
||||
got_audio++;
|
||||
} else if (m->m_type == sdp_media_video) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG,
|
||||
"Found video zrtp-hash; setting r_sdp_video_zrtp_hash=%s\n", attr->a_value);
|
||||
switch_channel_set_variable(channel, "r_sdp_video_zrtp_hash", attr->a_value);
|
||||
tech_pvt->remote_sdp_video_zrtp_hash = switch_core_session_strdup(tech_pvt->session, attr->a_value);
|
||||
got_video++;
|
||||
}
|
||||
switch_channel_set_flag(channel, CF_ZRTP_HASH);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sofia_glue_set_r_sdp_codec_string(switch_core_session_t *session, const char *codec_string, sdp_session_t *sdp)
|
||||
{
|
||||
@@ -3887,18 +4014,8 @@ void sofia_glue_set_r_sdp_codec_string(switch_core_session_t *session, const cha
|
||||
}
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "Looking for zrtp-hash to set sdp_zrtp_hash_string\n");
|
||||
for (m = sdp->sdp_media; m; m = m->m_next) {
|
||||
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||
if (zstr(attr->a_name)) continue;
|
||||
if (!strcasecmp(attr->a_name, "zrtp-hash") && attr->a_value) {
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "Found zrtp-hash, setting sdp_zrtp_hash_string=%s\n", attr->a_value);
|
||||
switch_channel_set_variable(channel, "sdp_zrtp_hash_string", attr->a_value);
|
||||
switch_channel_set_flag(channel, CF_ZRTP_HASH);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
find_zrtp_hash(session, sdp);
|
||||
sofia_glue_pass_zrtp_hash(session);
|
||||
|
||||
for (m = sdp->sdp_media; m; m = m->m_next) {
|
||||
ptime = dptime;
|
||||
@@ -4062,6 +4179,7 @@ int sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
|
||||
int changed = 0;
|
||||
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_SLA_BARGE) || sofia_test_flag(tech_pvt, TFLAG_SLA_BARGING)) {
|
||||
switch_channel_mark_hold(tech_pvt->channel, sendonly);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4096,9 +4214,9 @@ int sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
|
||||
if (!strcasecmp(stream, "indicate_hold")) {
|
||||
switch_channel_set_flag(tech_pvt->channel, CF_SUSPEND);
|
||||
switch_channel_set_flag(tech_pvt->channel, CF_HOLD);
|
||||
switch_ivr_hold_uuid(switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE), NULL, 0);
|
||||
switch_ivr_hold_uuid(switch_channel_get_partner_uuid(tech_pvt->channel), NULL, 0);
|
||||
} else {
|
||||
switch_ivr_broadcast(switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE), stream,
|
||||
switch_ivr_broadcast(switch_channel_get_partner_uuid(tech_pvt->channel), stream,
|
||||
SMF_ECHO_ALEG | SMF_LOOP | SMF_PRIORITY);
|
||||
switch_yield(250000);
|
||||
}
|
||||
@@ -4124,7 +4242,7 @@ int sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
|
||||
switch_rtp_set_max_missed_packets(tech_pvt->rtp_session, tech_pvt->max_missed_packets);
|
||||
}
|
||||
|
||||
if ((uuid = switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (b_session = switch_core_session_locate(uuid))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid(tech_pvt->channel)) && (b_session = switch_core_session_locate(uuid))) {
|
||||
switch_channel_t *b_channel = switch_core_session_get_channel(b_session);
|
||||
|
||||
if (switch_channel_test_flag(tech_pvt->channel, CF_HOLD)) {
|
||||
@@ -4578,6 +4696,9 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
|
||||
switch_channel_set_variable(tech_pvt->channel, "t38_broken_boolean", "true");
|
||||
}
|
||||
|
||||
find_zrtp_hash(session, sdp);
|
||||
sofia_glue_pass_zrtp_hash(session);
|
||||
|
||||
for (m = sdp->sdp_media; m; m = m->m_next) {
|
||||
sdp_connection_t *connection;
|
||||
switch_core_session_t *other_session;
|
||||
@@ -4601,10 +4722,6 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (switch_channel_test_app_flag_key("T38", tech_pvt->channel, CF_APP_T38)) {
|
||||
sofia_set_flag(tech_pvt, TFLAG_NOREPLY);
|
||||
}
|
||||
|
||||
if (switch_true(switch_channel_get_variable(channel, "refuse_t38"))) {
|
||||
switch_channel_clear_app_flag_key("T38", tech_pvt->channel, CF_APP_T38);
|
||||
match = 0;
|
||||
@@ -4613,6 +4730,11 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
|
||||
const char *var = switch_channel_get_variable(channel, "t38_passthru");
|
||||
int pass = sofia_test_pflag(tech_pvt->profile, PFLAG_T38_PASSTHRU);
|
||||
|
||||
|
||||
if (switch_channel_test_app_flag_key("T38", tech_pvt->channel, CF_APP_T38)) {
|
||||
sofia_set_flag(tech_pvt, TFLAG_NOREPLY);
|
||||
}
|
||||
|
||||
if (var) {
|
||||
if (!(pass = switch_true(var))) {
|
||||
if (!strcasecmp(var, "once")) {
|
||||
@@ -4699,9 +4821,6 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
|
||||
ptime = atoi(attr->a_value);
|
||||
} else if (!strcasecmp(attr->a_name, "maxptime") && attr->a_value) {
|
||||
maxptime = atoi(attr->a_value);
|
||||
} else if (!strcasecmp(attr->a_name, "zrtp-hash") && attr->a_value) {
|
||||
switch_channel_set_variable(tech_pvt->channel, "sdp_zrtp_hash_string", attr->a_value);
|
||||
switch_channel_set_flag(tech_pvt->channel, CF_ZRTP_HASH);
|
||||
} else if (!got_crypto && !strcasecmp(attr->a_name, "crypto") && !zstr(attr->a_value)) {
|
||||
int crypto_tag;
|
||||
|
||||
@@ -5237,7 +5356,7 @@ void sofia_glue_pass_sdp(private_object_t *tech_pvt, char *sdp)
|
||||
switch_core_session_t *other_session;
|
||||
switch_channel_t *other_channel;
|
||||
|
||||
if ((val = switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE))
|
||||
if ((val = switch_channel_get_partner_uuid(tech_pvt->channel))
|
||||
&& (other_session = switch_core_session_locate(val))) {
|
||||
other_channel = switch_core_session_get_channel(other_session);
|
||||
switch_channel_set_variable(other_channel, SWITCH_B_SDP_VARIABLE, sdp);
|
||||
@@ -5811,7 +5930,7 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
|
||||
|
||||
}
|
||||
|
||||
if (switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) {
|
||||
if (switch_channel_get_partner_uuid(channel)) {
|
||||
sofia_set_flag(tech_pvt, TFLAG_RECOVERING_BRIDGE);
|
||||
} else {
|
||||
switch_xml_t callflow, param, x_extension;
|
||||
@@ -6733,7 +6852,7 @@ void sofia_glue_tech_simplify(private_object_t *tech_pvt)
|
||||
|
||||
|
||||
|
||||
if ((uuid = switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE))
|
||||
if ((uuid = switch_channel_get_partner_uuid(tech_pvt->channel))
|
||||
&& (other_session = switch_core_session_locate(uuid))) {
|
||||
|
||||
other_channel = switch_core_session_get_channel(other_session);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
* Ken Rice <krice@freeswitch.org>
|
||||
* Paul D. Tinsley <pdt at jackhammer.org>
|
||||
* Bret McDanel <trixter AT 0xdecafbad.com>
|
||||
* Raymond Chandler <intralanman@gmail.com>
|
||||
*
|
||||
*
|
||||
* sofia_presence.c -- SOFIA SIP Endpoint (presence code)
|
||||
@@ -537,16 +538,16 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event)
|
||||
sql = switch_mprintf("select proto,sip_user,sip_host,sub_to_user,sub_to_host,event,contact,call_id,full_from,"
|
||||
"full_via,expires,user_agent,accept,profile_name,network_ip"
|
||||
",'%q',full_to,network_ip,network_port from sip_subscriptions "
|
||||
"where hostname='%q' and profile_name='%q' and event='message-summary' "
|
||||
"where hostname='%q' and event='message-summary' "
|
||||
"and sub_to_user='%q' and (sub_to_host='%q' or presence_hosts like '%%%q%%')",
|
||||
stream.data, mod_sofia_globals.hostname, profile->name, user, host, host);
|
||||
stream.data, mod_sofia_globals.hostname, user, host, host);
|
||||
} else if (sub_call_id) {
|
||||
sql = switch_mprintf("select proto,sip_user,sip_host,sub_to_user,sub_to_host,event,contact,call_id,full_from,"
|
||||
"full_via,expires,user_agent,accept,profile_name,network_ip"
|
||||
",'%q',full_to,network_ip,network_port from sip_subscriptions where "
|
||||
"hostname='%q' and profile_name='%q' and event='message-summary' "
|
||||
"hostname='%q' and event='message-summary' "
|
||||
"and sub_to_user='%q' and (sub_to_host='%q' or presence_hosts like '%%%q%%') and call_id='%q'",
|
||||
stream.data, mod_sofia_globals.hostname, profile->name, user, host, host, sub_call_id);
|
||||
stream.data, mod_sofia_globals.hostname, user, host, host, sub_call_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -559,12 +560,12 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event)
|
||||
|
||||
if (for_everyone) {
|
||||
sql = switch_mprintf("select sip_user,sip_host,contact,profile_name,network_ip,'%q',call_id "
|
||||
"from sip_registrations where hostname='%q' and profile_name='%q' and mwi_user='%q' and mwi_host='%q'",
|
||||
stream.data, mod_sofia_globals.hostname, profile->name, user, host);
|
||||
"from sip_registrations where hostname='%q' and mwi_user='%q' and mwi_host='%q'",
|
||||
stream.data, mod_sofia_globals.hostname, user, host);
|
||||
} else if (call_id) {
|
||||
sql = switch_mprintf("select sip_user,sip_host,contact,profile_name,network_ip,'%q',call_id "
|
||||
"from sip_registrations where hostname='%q' and profile_name='%q' and call_id='%q'",
|
||||
stream.data, mod_sofia_globals.hostname, profile->name, call_id);
|
||||
"from sip_registrations where hostname='%q' and call_id='%q'",
|
||||
stream.data, mod_sofia_globals.hostname, call_id);
|
||||
}
|
||||
|
||||
if (sql) {
|
||||
@@ -3273,7 +3274,9 @@ void sofia_presence_handle_sip_i_subscribe(int status,
|
||||
int sent_reply = 0;
|
||||
sip_contact_t const *contact;
|
||||
const char *ipv6;
|
||||
const char *contact_user;
|
||||
const char *contact_user = NULL;
|
||||
const char *contact_host = NULL;
|
||||
const char *contact_port = NULL;
|
||||
sofia_nat_parse_t np = { { 0 } };
|
||||
int found_proto = 0;
|
||||
char to_tag[13] = "";
|
||||
@@ -3295,8 +3298,11 @@ void sofia_presence_handle_sip_i_subscribe(int status,
|
||||
|
||||
switch_stun_random_string(to_tag, 12, NULL);
|
||||
|
||||
//contact_host = sip->sip_contact->m_url->url_host;
|
||||
contact_user = sip->sip_contact->m_url->url_user;
|
||||
if ( sip->sip_contact && sip->sip_contact->m_url ) {
|
||||
contact_host = sip->sip_contact->m_url->url_host;
|
||||
contact_port = sip->sip_contact->m_url->url_port;
|
||||
contact_user = sip->sip_contact->m_url->url_user;
|
||||
}
|
||||
|
||||
//tl_gets(tags, NUTAG_SUBSTATE_REF(sub_state), TAG_END());
|
||||
|
||||
@@ -3645,6 +3651,32 @@ void sofia_presence_handle_sip_i_subscribe(int status,
|
||||
}
|
||||
}
|
||||
|
||||
if ( sip->sip_event && sip->sip_event->o_type && !strcasecmp(sip->sip_event->o_type, "ua-profile") && contact_host ) {
|
||||
switch_event_t *params;
|
||||
char *uri = NULL;
|
||||
|
||||
if ( contact_port ) {
|
||||
uri = switch_mprintf("sip:%s:%s", contact_host, contact_port);
|
||||
} else {
|
||||
uri = switch_mprintf("sip:%s", contact_host);
|
||||
}
|
||||
|
||||
if ( uri ) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "sending pnp NOTIFY to %s\n", uri);
|
||||
|
||||
switch_event_create(¶ms, SWITCH_EVENT_NOTIFY);
|
||||
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "profile", profile->pnp_notify_profile);
|
||||
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "event-string", sip->sip_event->o_type);
|
||||
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "to-uri", uri);
|
||||
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "from-uri", uri);
|
||||
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "content-type", "application/url");
|
||||
switch_event_add_body(params, "%s", profile->pnp_prov_url);
|
||||
switch_event_fire(¶ms);
|
||||
|
||||
switch_safe_free(uri);
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
||||
if (strcasecmp(event, "call-info") && strcasecmp(event, "line-seize")) {
|
||||
|
||||
@@ -1028,6 +1028,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
|
||||
sip_contact_t const *contact = NULL;
|
||||
char *sql;
|
||||
switch_event_t *s_event;
|
||||
const char *reg_meta = NULL;
|
||||
const char *to_user = NULL;
|
||||
const char *to_host = NULL;
|
||||
char *mwi_account = NULL;
|
||||
@@ -1485,6 +1486,10 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
|
||||
to_user = var;
|
||||
}
|
||||
|
||||
if (v_event && *v_event && (var = switch_event_get_header(*v_event, "registration_metadata"))) {
|
||||
reg_meta = var;
|
||||
}
|
||||
|
||||
if (v_event && *v_event && (mwi_account = switch_event_get_header(*v_event, "mwi-account"))) {
|
||||
dup_mwi_account = strdup(mwi_account);
|
||||
switch_assert(dup_mwi_account != NULL);
|
||||
@@ -1559,7 +1564,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
|
||||
url = switch_mprintf("sofia/%q/sip:%q", profile->name, sofia_glue_strip_proto(contact));
|
||||
|
||||
switch_core_add_registration(to_user, reg_host, call_id, url, (long) switch_epoch_time_now(NULL) + (long) exptime + 60,
|
||||
network_ip, network_port_c, is_tls ? "tls" : is_tcp ? "tcp" : "udp");
|
||||
network_ip, network_port_c, is_tls ? "tls" : is_tcp ? "tcp" : "udp", reg_meta);
|
||||
|
||||
switch_safe_free(url);
|
||||
switch_safe_free(contact);
|
||||
|
||||
@@ -145,7 +145,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
||||
for (ap = app_log; ap; ap = ap->next) {
|
||||
bson_append_start_object(&cdr, "application");
|
||||
bson_append_string(&cdr, "app_name", ap->app);
|
||||
bson_append_string(&cdr, "app_data", ap->arg);
|
||||
bson_append_string(&cdr, "app_data", switch_str_nil(ap->arg));
|
||||
bson_append_long(&cdr, "app_stamp", ap->stamp);
|
||||
bson_append_finish_object(&cdr); /* application */
|
||||
}
|
||||
@@ -186,7 +186,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
||||
bson_append_bool(&cdr, "last_executed", 1);
|
||||
}
|
||||
bson_append_string(&cdr, "app_name", ap->application_name);
|
||||
bson_append_string(&cdr, "app_data", ap->application_data);
|
||||
bson_append_string(&cdr, "app_data", switch_str_nil(ap->application_data));
|
||||
bson_append_finish_object(&cdr);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
||||
bson_append_bool(&cdr, "last_executed", 1);
|
||||
}
|
||||
bson_append_string(&cdr, "app_name", ap->application_name);
|
||||
bson_append_string(&cdr, "app_data", ap->application_data);
|
||||
bson_append_string(&cdr, "app_data", switch_str_nil(ap->application_data));
|
||||
bson_append_finish_object(&cdr);
|
||||
}
|
||||
|
||||
|
||||
@@ -857,7 +857,7 @@ static void listener_main_loop(listener_t *listener)
|
||||
|
||||
/* do we need the mutex when reading? */
|
||||
/*switch_mutex_lock(listener->sock_mutex); */
|
||||
status = ei_xreceive_msg_tmo(listener->sockfd, &msg, &buf, 10);
|
||||
status = ei_xreceive_msg_tmo(listener->sockfd, &msg, &buf, 100);
|
||||
/*switch_mutex_unlock(listener->sock_mutex); */
|
||||
|
||||
switch (status) {
|
||||
|
||||
@@ -1185,7 +1185,7 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
|
||||
}
|
||||
count++;
|
||||
if (count == 1) {
|
||||
switch_event_create(event, SWITCH_EVENT_SOCKET_DATA);
|
||||
switch_event_create(event, SWITCH_EVENT_CLONE);
|
||||
switch_event_add_header_string(*event, SWITCH_STACK_BOTTOM, "Command", mbuf);
|
||||
} else if (cur) {
|
||||
char *var, *val;
|
||||
|
||||
@@ -213,7 +213,7 @@ static switch_status_t my_on_routing(switch_core_session_t *session)
|
||||
}
|
||||
*/
|
||||
|
||||
if ((signal_bond = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && !zstr(signal_bond)) {
|
||||
if ((signal_bond = switch_channel_get_partner_uuid(channel)) && !zstr(signal_bond)) {
|
||||
if (rc_avpair_add(rad_config, &send, PW_FS_OTHER_LEG_ID, (void*) signal_bond, -1, PW_FS_PEC) == NULL) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "[mod_radius_cdr] Failed adding Freeswitch-Other-Leg-Id: %s\n", uuid_str);
|
||||
rc_destroy(rad_config);
|
||||
|
||||
@@ -91,8 +91,8 @@ public class EventConsumer {
|
||||
return new SWIGTYPE_p_uint32_t(freeswitchJNI.EventConsumer_node_index_get(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
public EventConsumer(String event_name, String subclass_name) {
|
||||
this(freeswitchJNI.new_EventConsumer(event_name, subclass_name), true);
|
||||
public EventConsumer(String event_name, String subclass_name, int len) {
|
||||
this(freeswitchJNI.new_EventConsumer(event_name, subclass_name, len), true);
|
||||
}
|
||||
|
||||
public int bind(String event_name, String subclass_name) {
|
||||
|
||||
@@ -81,7 +81,7 @@ class freeswitchJNI {
|
||||
public final static native long EventConsumer_enodes_get(long jarg1, EventConsumer jarg1_);
|
||||
public final static native void EventConsumer_node_index_set(long jarg1, EventConsumer jarg1_, long jarg2);
|
||||
public final static native long EventConsumer_node_index_get(long jarg1, EventConsumer jarg1_);
|
||||
public final static native long new_EventConsumer(String jarg1, String jarg2);
|
||||
public final static native long new_EventConsumer(String jarg1, String jarg2, int jarg3);
|
||||
public final static native void delete_EventConsumer(long jarg1);
|
||||
public final static native int EventConsumer_bind(long jarg1, EventConsumer jarg1_, String jarg2, String jarg3);
|
||||
public final static native long EventConsumer_pop(long jarg1, EventConsumer jarg1_, int jarg2, int jarg3);
|
||||
|
||||
@@ -1587,10 +1587,11 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1n
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1EventConsumer(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
|
||||
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1EventConsumer(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jint jarg3) {
|
||||
jlong jresult = 0 ;
|
||||
char *arg1 = (char *) NULL ;
|
||||
char *arg2 = (char *) "" ;
|
||||
int arg3 = (int) 5000 ;
|
||||
EventConsumer *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
@@ -1605,7 +1606,8 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1EventConsum
|
||||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return 0;
|
||||
}
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2);
|
||||
arg3 = (int)jarg3;
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2,arg3);
|
||||
*(EventConsumer **)&jresult = result;
|
||||
if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
|
||||
@@ -3705,18 +3705,23 @@ static int _wrap_new_EventConsumer(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
char *arg1 = (char *) NULL ;
|
||||
char *arg2 = (char *) "" ;
|
||||
int arg3 = (int) 5000 ;
|
||||
EventConsumer *result = 0 ;
|
||||
|
||||
SWIG_check_num_args("EventConsumer",0,2)
|
||||
SWIG_check_num_args("EventConsumer",0,3)
|
||||
if(lua_gettop(L)>=1 && !lua_isstring(L,1)) SWIG_fail_arg("EventConsumer",1,"char const *");
|
||||
if(lua_gettop(L)>=2 && !lua_isstring(L,2)) SWIG_fail_arg("EventConsumer",2,"char const *");
|
||||
if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("EventConsumer",3,"int");
|
||||
if(lua_gettop(L)>=1){
|
||||
arg1 = (char *)lua_tostring(L, 1);
|
||||
}
|
||||
if(lua_gettop(L)>=2){
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
}
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2);
|
||||
if(lua_gettop(L)>=3){
|
||||
arg3 = (int)lua_tonumber(L, 3);
|
||||
}
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2,arg3);
|
||||
SWIG_arg=0;
|
||||
SWIG_NewPointerObj(L,result,SWIGTYPE_p_EventConsumer,1); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
@@ -1050,6 +1050,16 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_READ_RESULT_VARIABLE_get() {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ATT_XFER_RESULT_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *)("att_xfer_result");
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_COPY_XML_CDR_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -1060,6 +1070,16 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_COPY_XML_CDR_VARIABLE_get() {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_COPY_JSON_CDR_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *)("copy_json_cdr");
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -1400,6 +1420,16 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_PROXY_MEDIA_VARIABLE_get() {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ZRTP_PASSTHRU_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *)("zrtp_passthru");
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ENDPOINT_DISPOSITION_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -1520,6 +1550,16 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_SIGNAL_BOND_VARIABLE_get() {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *)("originate_signal_bond");
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ORIGINATOR_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -6425,6 +6465,54 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_disable_heartbeat(void *
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_pop(void * jarg1, char * jarg2, void * jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_media_bug_t **arg3 = (switch_media_bug_t **) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_media_bug_t **)jarg3;
|
||||
result = (switch_status_t)switch_core_media_bug_pop(arg1,(char const *)arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_exec_all(void * jarg1, char * jarg2, void * jarg3, void * jarg4) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_media_bug_exec_cb_t arg3 = (switch_media_bug_exec_cb_t) 0 ;
|
||||
void *arg4 = (void *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_media_bug_exec_cb_t)jarg3;
|
||||
arg4 = (void *)jarg4;
|
||||
result = (switch_status_t)switch_core_media_bug_exec_all(arg1,(char const *)arg2,arg3,arg4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_core_media_bug_count(void * jarg1, char * jarg2) {
|
||||
unsigned long jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
uint32_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (uint32_t)switch_core_media_bug_count(arg1,(char const *)arg2);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_add(void * jarg1, char * jarg2, char * jarg3, void * jarg4, void * jarg5, void * jarg6, unsigned long jarg7, void * jarg8) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -6531,6 +6619,16 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_media_bug_get_read_replace_fram
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_media_bug_set_read_demux_frame(void * jarg1, void * jarg2) {
|
||||
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
|
||||
switch_frame_t *arg2 = (switch_frame_t *) 0 ;
|
||||
|
||||
arg1 = (switch_media_bug_t *)jarg1;
|
||||
arg2 = (switch_frame_t *)jarg2;
|
||||
switch_core_media_bug_set_read_demux_frame(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_media_bug_get_session(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
|
||||
@@ -6657,13 +6755,15 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_close(void * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_remove_all(void * jarg1) {
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_remove_all_function(void * jarg1, char * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
result = (switch_status_t)switch_core_media_bug_remove_all(arg1);
|
||||
arg2 = (char *)jarg2;
|
||||
result = (switch_status_t)switch_core_media_bug_remove_all_function(arg1,(char const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
@@ -8996,6 +9096,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_get_read_impl(void * jarg1
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_get_real_read_impl(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_codec_implementation_t *arg2 = (switch_codec_implementation_t *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_codec_implementation_t *)jarg2;
|
||||
result = (switch_status_t)switch_core_session_get_real_read_impl(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_get_write_impl(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -11004,7 +11118,7 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_ptime(char * jarg1, u
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, char * jarg2, char * jarg3, char * jarg4, unsigned long jarg5, char * jarg6, char * jarg7, char * jarg8) {
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, char * jarg2, char * jarg3, char * jarg4, unsigned long jarg5, char * jarg6, char * jarg7, char * jarg8, char * jarg9) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
@@ -11014,6 +11128,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, cha
|
||||
char *arg6 = (char *) 0 ;
|
||||
char *arg7 = (char *) 0 ;
|
||||
char *arg8 = (char *) 0 ;
|
||||
char *arg9 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
@@ -11024,7 +11139,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, cha
|
||||
arg6 = (char *)jarg6;
|
||||
arg7 = (char *)jarg7;
|
||||
arg8 = (char *)jarg8;
|
||||
result = (switch_status_t)switch_core_add_registration((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8);
|
||||
arg9 = (char *)jarg9;
|
||||
result = (switch_status_t)switch_core_add_registration((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
@@ -11151,6 +11267,23 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_close_extra_files(void * jarg1, int ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_thread_set_cpu_affinity(int jarg1) {
|
||||
int jresult ;
|
||||
int arg1 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (int)jarg1;
|
||||
result = (switch_status_t)switch_core_thread_set_cpu_affinity(arg1);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_os_yield() {
|
||||
switch_os_yield();
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_loadable_module_interface_module_name_set(void * jarg1, char * jarg2) {
|
||||
switch_loadable_module_interface *arg1 = (switch_loadable_module_interface *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
@@ -11635,6 +11768,24 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_loadable_module_get_codec_interface(
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_parse_codec_buf(char * jarg1, void * jarg2, void * jarg3, void * jarg4) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
uint32_t *arg2 = (uint32_t *) 0 ;
|
||||
uint32_t *arg3 = (uint32_t *) 0 ;
|
||||
uint32_t *arg4 = (uint32_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (uint32_t *)jarg2;
|
||||
arg3 = (uint32_t *)jarg3;
|
||||
arg4 = (uint32_t *)jarg4;
|
||||
result = (char *)switch_parse_codec_buf(arg1,arg2,arg3,arg4);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_loadable_module_get_dialplan_interface(char * jarg1) {
|
||||
void * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
@@ -25633,6 +25784,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_transfer_to_extension(void * j
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_get_partner_uuid(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
result = (char *)switch_channel_get_partner_uuid(arg1);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_buffer_create(void * jarg1, void * jarg2, void * jarg3) {
|
||||
int jresult ;
|
||||
switch_memory_pool_t *arg1 = (switch_memory_pool_t *) 0 ;
|
||||
@@ -27013,6 +27176,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_check_permission_list(void * jarg
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_event_add_presence_data_cols(void * jarg1, void * jarg2, char * jarg3) {
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
switch_event_t *arg2 = (switch_event_t *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (switch_event_t *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
switch_event_add_presence_data_cols(arg1,arg2,(char const *)arg3);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RESAMPLE_QUALITY_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
@@ -27403,6 +27578,24 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_merge_sln(void * jarg1, unsig
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_unmerge_sln(void * jarg1, unsigned long jarg2, void * jarg3, unsigned long jarg4) {
|
||||
unsigned long jresult ;
|
||||
int16_t *arg1 = (int16_t *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
int16_t *arg3 = (int16_t *) 0 ;
|
||||
uint32_t arg4 ;
|
||||
uint32_t result;
|
||||
|
||||
arg1 = (int16_t *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
arg3 = (int16_t *)jarg3;
|
||||
arg4 = (uint32_t)jarg4;
|
||||
result = (uint32_t)switch_unmerge_sln(arg1,arg2,arg3,arg4);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_mux_channels(void * jarg1, void * jarg2, unsigned long jarg3) {
|
||||
int16_t *arg1 = (int16_t *) 0 ;
|
||||
switch_size_t arg2 ;
|
||||
@@ -27847,6 +28040,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_activate_unicast(void * jarg1, char
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_generate_json_cdr(void * jarg1, void * jarg2, int jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
cJSON **arg2 = (cJSON **) 0 ;
|
||||
switch_bool_t arg3 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (cJSON **)jarg2;
|
||||
arg3 = (switch_bool_t)jarg3;
|
||||
result = (switch_status_t)switch_ivr_generate_json_cdr(arg1,arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_generate_xml_cdr(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -28257,6 +28466,52 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_record_session(void * jarg1, char *
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_pop_eavesdropper(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_core_session_t **arg2 = (switch_core_session_t **) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_core_session_t **)jarg2;
|
||||
result = (switch_status_t)switch_ivr_eavesdrop_pop_eavesdropper(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_exec_all(void * jarg1, char * jarg2, char * jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (switch_status_t)switch_ivr_eavesdrop_exec_all(arg1,(char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_update_display(void * jarg1, char * jarg2, char * jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (switch_status_t)switch_ivr_eavesdrop_update_display(arg1,(char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_session(void * jarg1, char * jarg2, char * jarg3, unsigned long jarg4) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -29969,6 +30224,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_kill_uuid(char * jarg1, int jarg2)
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_blind_transfer_ack(void * jarg1, int jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_bool_t arg2 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_bool_t)jarg2;
|
||||
result = (switch_status_t)switch_ivr_blind_transfer_ack(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_MAX_BUF_LEN_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
@@ -31026,6 +31295,16 @@ SWIGEXPORT unsigned char SWIGSTDCALL CSharp_switch_rtp_check_auto_adj(void * jar
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_set_interdigit_delay(void * jarg1, unsigned long jarg2) {
|
||||
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
|
||||
arg1 = (switch_rtp_t *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
switch_rtp_set_interdigit_delay(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_log_node_t_data_set(void * jarg1, char * jarg2) {
|
||||
switch_log_node_t *arg1 = (switch_log_node_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
@@ -1113,6 +1113,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_READ_RESULT_VARIABLE_get() {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ATT_XFER_RESULT_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *) "att_xfer_result";
|
||||
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_COPY_XML_CDR_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -1124,6 +1135,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_COPY_XML_CDR_VARIABLE_get() {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_COPY_JSON_CDR_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *) "copy_json_cdr";
|
||||
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -1498,6 +1520,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_PROXY_MEDIA_VARIABLE_get() {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ZRTP_PASSTHRU_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *) "zrtp_passthru";
|
||||
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ENDPOINT_DISPOSITION_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -1630,6 +1663,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_SIGNAL_BOND_VARIABLE_get() {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *) "originate_signal_bond";
|
||||
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_ORIGINATOR_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
@@ -6732,6 +6776,54 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_disable_heartbeat(void *
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_pop(void * jarg1, char * jarg2, void * jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_media_bug_t **arg3 = (switch_media_bug_t **) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_media_bug_t **)jarg3;
|
||||
result = (switch_status_t)switch_core_media_bug_pop(arg1,(char const *)arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_exec_all(void * jarg1, char * jarg2, void * jarg3, void * jarg4) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_media_bug_exec_cb_t arg3 = (switch_media_bug_exec_cb_t) 0 ;
|
||||
void *arg4 = (void *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (switch_media_bug_exec_cb_t)jarg3;
|
||||
arg4 = (void *)jarg4;
|
||||
result = (switch_status_t)switch_core_media_bug_exec_all(arg1,(char const *)arg2,arg3,arg4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_core_media_bug_count(void * jarg1, char * jarg2) {
|
||||
unsigned long jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
uint32_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (uint32_t)switch_core_media_bug_count(arg1,(char const *)arg2);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_add(void * jarg1, char * jarg2, char * jarg3, void * jarg4, void * jarg5, void * jarg6, unsigned long jarg7, void * jarg8) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -6838,6 +6930,16 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_media_bug_get_read_replace_fram
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_media_bug_set_read_demux_frame(void * jarg1, void * jarg2) {
|
||||
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
|
||||
switch_frame_t *arg2 = (switch_frame_t *) 0 ;
|
||||
|
||||
arg1 = (switch_media_bug_t *)jarg1;
|
||||
arg2 = (switch_frame_t *)jarg2;
|
||||
switch_core_media_bug_set_read_demux_frame(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_media_bug_get_session(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ;
|
||||
@@ -6964,13 +7066,15 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_close(void * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_remove_all(void * jarg1) {
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_remove_all_function(void * jarg1, char * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
result = (switch_status_t)switch_core_media_bug_remove_all(arg1);
|
||||
arg2 = (char *)jarg2;
|
||||
result = (switch_status_t)switch_core_media_bug_remove_all_function(arg1,(char const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
@@ -9303,6 +9407,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_get_read_impl(void * jarg1
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_get_real_read_impl(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_codec_implementation_t *arg2 = (switch_codec_implementation_t *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_codec_implementation_t *)jarg2;
|
||||
result = (switch_status_t)switch_core_session_get_real_read_impl(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_get_write_impl(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -11320,7 +11438,7 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_default_ptime(char * jarg1, u
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, char * jarg2, char * jarg3, char * jarg4, unsigned long jarg5, char * jarg6, char * jarg7, char * jarg8) {
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, char * jarg2, char * jarg3, char * jarg4, unsigned long jarg5, char * jarg6, char * jarg7, char * jarg8, char * jarg9) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
@@ -11330,6 +11448,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, cha
|
||||
char *arg6 = (char *) 0 ;
|
||||
char *arg7 = (char *) 0 ;
|
||||
char *arg8 = (char *) 0 ;
|
||||
char *arg9 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
@@ -11340,7 +11459,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_add_registration(char * jarg1, cha
|
||||
arg6 = (char *)jarg6;
|
||||
arg7 = (char *)jarg7;
|
||||
arg8 = (char *)jarg8;
|
||||
result = (switch_status_t)switch_core_add_registration((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8);
|
||||
arg9 = (char *)jarg9;
|
||||
result = (switch_status_t)switch_core_add_registration((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
@@ -11467,6 +11587,23 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_close_extra_files(void * jarg1, int ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_thread_set_cpu_affinity(int jarg1) {
|
||||
int jresult ;
|
||||
int arg1 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (int)jarg1;
|
||||
result = (switch_status_t)switch_core_thread_set_cpu_affinity(arg1);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_os_yield() {
|
||||
switch_os_yield();
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_loadable_module_interface_module_name_set(void * jarg1, char * jarg2) {
|
||||
switch_loadable_module_interface *arg1 = (switch_loadable_module_interface *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
@@ -11970,6 +12107,24 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_loadable_module_get_codec_interface(
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_parse_codec_buf(char * jarg1, void * jarg2, void * jarg3, void * jarg4) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
uint32_t *arg2 = (uint32_t *) 0 ;
|
||||
uint32_t *arg3 = (uint32_t *) 0 ;
|
||||
uint32_t *arg4 = (uint32_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (uint32_t *)jarg2;
|
||||
arg3 = (uint32_t *)jarg3;
|
||||
arg4 = (uint32_t *)jarg4;
|
||||
result = (char *)switch_parse_codec_buf(arg1,arg2,arg3,arg4);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_loadable_module_get_dialplan_interface(char * jarg1) {
|
||||
void * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
@@ -26328,6 +26483,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_transfer_to_extension(void * j
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_get_partner_uuid(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
result = (char *)switch_channel_get_partner_uuid(arg1);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_buffer_create(void * jarg1, void * jarg2, void * jarg3) {
|
||||
int jresult ;
|
||||
switch_memory_pool_t *arg1 = (switch_memory_pool_t *) 0 ;
|
||||
@@ -27723,6 +27890,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_check_permission_list(void * jarg
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_event_add_presence_data_cols(void * jarg1, void * jarg2, char * jarg3) {
|
||||
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
|
||||
switch_event_t *arg2 = (switch_event_t *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
|
||||
arg1 = (switch_channel_t *)jarg1;
|
||||
arg2 = (switch_event_t *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
switch_event_add_presence_data_cols(arg1,arg2,(char const *)arg3);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RESAMPLE_QUALITY_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
@@ -28123,6 +28302,24 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_merge_sln(void * jarg1, unsig
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_unmerge_sln(void * jarg1, unsigned long jarg2, void * jarg3, unsigned long jarg4) {
|
||||
unsigned long jresult ;
|
||||
int16_t *arg1 = (int16_t *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
int16_t *arg3 = (int16_t *) 0 ;
|
||||
uint32_t arg4 ;
|
||||
uint32_t result;
|
||||
|
||||
arg1 = (int16_t *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
arg3 = (int16_t *)jarg3;
|
||||
arg4 = (uint32_t)jarg4;
|
||||
result = (uint32_t)switch_unmerge_sln(arg1,arg2,arg3,arg4);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_mux_channels(void * jarg1, void * jarg2, unsigned long jarg3) {
|
||||
int16_t *arg1 = (int16_t *) 0 ;
|
||||
switch_size_t arg2 ;
|
||||
@@ -28581,6 +28778,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_activate_unicast(void * jarg1, char
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_generate_json_cdr(void * jarg1, void * jarg2, int jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
cJSON **arg2 = (cJSON **) 0 ;
|
||||
switch_bool_t arg3 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (cJSON **)jarg2;
|
||||
arg3 = (switch_bool_t)jarg3;
|
||||
result = (switch_status_t)switch_ivr_generate_json_cdr(arg1,arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_generate_xml_cdr(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -28991,6 +29204,52 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_record_session(void * jarg1, char *
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_pop_eavesdropper(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_core_session_t **arg2 = (switch_core_session_t **) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_core_session_t **)jarg2;
|
||||
result = (switch_status_t)switch_ivr_eavesdrop_pop_eavesdropper(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_exec_all(void * jarg1, char * jarg2, char * jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (switch_status_t)switch_ivr_eavesdrop_exec_all(arg1,(char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_update_display(void * jarg1, char * jarg2, char * jarg3) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (switch_status_t)switch_ivr_eavesdrop_update_display(arg1,(char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_eavesdrop_session(void * jarg1, char * jarg2, char * jarg3, unsigned long jarg4) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
@@ -30703,6 +30962,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_kill_uuid(char * jarg1, int jarg2)
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_blind_transfer_ack(void * jarg1, int jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_bool_t arg2 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_bool_t)jarg2;
|
||||
result = (switch_status_t)switch_ivr_blind_transfer_ack(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_MAX_BUF_LEN_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
@@ -31771,6 +32044,16 @@ SWIGEXPORT unsigned char SWIGSTDCALL CSharp_switch_rtp_check_auto_adj(void * jar
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_set_interdigit_delay(void * jarg1, unsigned long jarg2) {
|
||||
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
|
||||
arg1 = (switch_rtp_t *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
switch_rtp_set_interdigit_delay(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_log_node_t_data_set(void * jarg1, char * jarg2) {
|
||||
switch_log_node_t *arg1 = (switch_log_node_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
@@ -36196,15 +36479,17 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_EventConsumer_node_index_get(void *
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_EventConsumer(char * jarg1, char * jarg2) {
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_EventConsumer(char * jarg1, char * jarg2, int jarg3) {
|
||||
void * jresult ;
|
||||
char *arg1 = (char *) NULL ;
|
||||
char *arg2 = (char *) "" ;
|
||||
int arg3 = (int) 5000 ;
|
||||
EventConsumer *result = 0 ;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2);
|
||||
arg3 = (int)jarg3;
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2,arg3);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
@@ -1066,6 +1066,21 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_core_session_disable_heartbeat(SWIGTYPE_p_switch_core_session.getCPtr(session));
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_pop(SWIGTYPE_p_switch_core_session orig_session, string function, SWIGTYPE_p_p_switch_media_bug pop) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_pop(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), function, SWIGTYPE_p_p_switch_media_bug.getCPtr(pop));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_exec_all(SWIGTYPE_p_switch_core_session orig_session, string function, SWIGTYPE_p_f_p_switch_media_bug_p_void__void cb, SWIGTYPE_p_void user_data) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_exec_all(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), function, SWIGTYPE_p_f_p_switch_media_bug_p_void__void.getCPtr(cb), SWIGTYPE_p_void.getCPtr(user_data));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_core_media_bug_count(SWIGTYPE_p_switch_core_session orig_session, string function) {
|
||||
uint ret = freeswitchPINVOKE.switch_core_media_bug_count(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), function);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_add(SWIGTYPE_p_switch_core_session session, string function, string target, SWIGTYPE_p_f_p_switch_media_bug_p_void_enum_switch_abc_type_t__switch_bool_t callback, SWIGTYPE_p_void user_data, SWIGTYPE_p_time_t stop_time, uint flags, SWIGTYPE_p_p_switch_media_bug new_bug) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_add(SWIGTYPE_p_switch_core_session.getCPtr(session), function, target, SWIGTYPE_p_f_p_switch_media_bug_p_void_enum_switch_abc_type_t__switch_bool_t.getCPtr(callback), SWIGTYPE_p_void.getCPtr(user_data), SWIGTYPE_p_time_t.getCPtr(stop_time), flags, SWIGTYPE_p_p_switch_media_bug.getCPtr(new_bug));
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -1106,6 +1121,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_core_media_bug_set_read_demux_frame(SWIGTYPE_p_switch_media_bug bug, switch_frame frame) {
|
||||
freeswitchPINVOKE.switch_core_media_bug_set_read_demux_frame(SWIGTYPE_p_switch_media_bug.getCPtr(bug), switch_frame.getCPtr(frame));
|
||||
}
|
||||
|
||||
public static SWIGTYPE_p_switch_core_session switch_core_media_bug_get_session(SWIGTYPE_p_switch_media_bug bug) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_core_media_bug_get_session(SWIGTYPE_p_switch_media_bug.getCPtr(bug));
|
||||
SWIGTYPE_p_switch_core_session ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_core_session(cPtr, false);
|
||||
@@ -1156,8 +1175,8 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_remove_all(SWIGTYPE_p_switch_core_session session) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_remove_all(SWIGTYPE_p_switch_core_session.getCPtr(session));
|
||||
public static switch_status_t switch_core_media_bug_remove_all_function(SWIGTYPE_p_switch_core_session session, string function) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_remove_all_function(SWIGTYPE_p_switch_core_session.getCPtr(session), function);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2000,6 +2019,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_session_get_real_read_impl(SWIGTYPE_p_switch_core_session session, switch_codec_implementation impp) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_get_real_read_impl(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_codec_implementation.getCPtr(impp));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_session_get_write_impl(SWIGTYPE_p_switch_core_session session, switch_codec_implementation impp) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_get_write_impl(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_codec_implementation.getCPtr(impp));
|
||||
return ret;
|
||||
@@ -2647,8 +2671,8 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_add_registration(string user, string realm, string token, string url, uint expires, string network_ip, string network_port, string network_proto) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_add_registration(user, realm, token, url, expires, network_ip, network_port, network_proto);
|
||||
public static switch_status_t switch_core_add_registration(string user, string realm, string token, string url, uint expires, string network_ip, string network_port, string network_proto, string metadata) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_add_registration(user, realm, token, url, expires, network_ip, network_port, network_proto, metadata);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2699,6 +2723,15 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_close_extra_files(SWIGTYPE_p_int.getCPtr(keep), keep_ttl);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_thread_set_cpu_affinity(int cpu) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_thread_set_cpu_affinity(cpu);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_os_yield() {
|
||||
freeswitchPINVOKE.switch_os_yield();
|
||||
}
|
||||
|
||||
public static switch_status_t switch_loadable_module_init(switch_bool_t autoload) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_loadable_module_init((int)autoload);
|
||||
return ret;
|
||||
@@ -2720,6 +2753,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_parse_codec_buf(string buf, SWIGTYPE_p_unsigned_long interval, SWIGTYPE_p_unsigned_long rate, SWIGTYPE_p_unsigned_long bit) {
|
||||
string ret = freeswitchPINVOKE.switch_parse_codec_buf(buf, SWIGTYPE_p_unsigned_long.getCPtr(interval), SWIGTYPE_p_unsigned_long.getCPtr(rate), SWIGTYPE_p_unsigned_long.getCPtr(bit));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_dialplan_interface switch_loadable_module_get_dialplan_interface(string name) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_loadable_module_get_dialplan_interface(name);
|
||||
switch_dialplan_interface ret = (cPtr == IntPtr.Zero) ? null : new switch_dialplan_interface(cPtr, false);
|
||||
@@ -4080,6 +4118,11 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_channel_transfer_to_extension(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_caller_extension.getCPtr(caller_extension));
|
||||
}
|
||||
|
||||
public static string switch_channel_get_partner_uuid(SWIGTYPE_p_switch_channel channel) {
|
||||
string ret = freeswitchPINVOKE.switch_channel_get_partner_uuid(SWIGTYPE_p_switch_channel.getCPtr(channel));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_buffer_create(SWIGTYPE_p_apr_pool_t pool, SWIGTYPE_p_p_switch_buffer buffer, SWIGTYPE_p_switch_size_t max_len) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_buffer_create(SWIGTYPE_p_apr_pool_t.getCPtr(pool), SWIGTYPE_p_p_switch_buffer.getCPtr(buffer), SWIGTYPE_p_switch_size_t.getCPtr(max_len));
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -4370,6 +4413,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_event_add_presence_data_cols(SWIGTYPE_p_switch_channel channel, switch_event arg1, string prefix) {
|
||||
freeswitchPINVOKE.switch_event_add_presence_data_cols(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_event.getCPtr(arg1), prefix);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t new_resampler, uint from_rate, uint to_rate, uint to_size, int quality, uint channels, string file, string func, int line) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t.getCPtr(new_resampler), from_rate, to_rate, to_size, quality, channels, file, func, line);
|
||||
return ret;
|
||||
@@ -4426,6 +4473,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_unmerge_sln(SWIGTYPE_p_short data, uint samples, SWIGTYPE_p_short other_data, uint other_samples) {
|
||||
uint ret = freeswitchPINVOKE.switch_unmerge_sln(SWIGTYPE_p_short.getCPtr(data), samples, SWIGTYPE_p_short.getCPtr(other_data), other_samples);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_mux_channels(SWIGTYPE_p_short data, SWIGTYPE_p_switch_size_t samples, uint channels) {
|
||||
freeswitchPINVOKE.switch_mux_channels(SWIGTYPE_p_short.getCPtr(data), SWIGTYPE_p_switch_size_t.getCPtr(samples), channels);
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -4441,6 +4493,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_generate_json_cdr(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_cJSON json_cdr, switch_bool_t urlencode) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_generate_json_cdr(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_cJSON.getCPtr(json_cdr), (int)urlencode);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_generate_xml_cdr(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_switch_xml xml_cdr) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_generate_xml_cdr(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_switch_xml.getCPtr(xml_cdr));
|
||||
return ret;
|
||||
@@ -4572,6 +4629,21 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_eavesdrop_pop_eavesdropper(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_switch_core_session sessionp) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_pop_eavesdropper(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_switch_core_session.getCPtr(sessionp));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_eavesdrop_exec_all(SWIGTYPE_p_switch_core_session session, string app, string arg) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_exec_all(SWIGTYPE_p_switch_core_session.getCPtr(session), app, arg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_eavesdrop_update_display(SWIGTYPE_p_switch_core_session session, string name, string number) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_update_display(SWIGTYPE_p_switch_core_session.getCPtr(session), name, number);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_eavesdrop_session(SWIGTYPE_p_switch_core_session session, string uuid, string require_group, uint flags) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_session(SWIGTYPE_p_switch_core_session.getCPtr(session), uuid, require_group, flags);
|
||||
return ret;
|
||||
@@ -5088,6 +5160,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_blind_transfer_ack(SWIGTYPE_p_switch_core_session session, switch_bool_t success) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_blind_transfer_ack(SWIGTYPE_p_switch_core_session.getCPtr(session), (int)success);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_rtp_add_crypto_key(SWIGTYPE_p_switch_rtp rtp_session, switch_rtp_crypto_direction_t direction, uint index, switch_rtp_crypto_key_type_t type, SWIGTYPE_p_unsigned_char key, SWIGTYPE_p_switch_size_t keylen) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_add_crypto_key(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), (int)direction, index, (int)type, SWIGTYPE_p_unsigned_char.getCPtr(key), SWIGTYPE_p_switch_size_t.getCPtr(keylen));
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -5387,6 +5464,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_rtp_set_interdigit_delay(SWIGTYPE_p_switch_rtp rtp_session, uint delay) {
|
||||
freeswitchPINVOKE.switch_rtp_set_interdigit_delay(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), delay);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_log_init(SWIGTYPE_p_apr_pool_t pool, switch_bool_t colorize) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_log_init(SWIGTYPE_p_apr_pool_t.getCPtr(pool), (int)colorize);
|
||||
return ret;
|
||||
@@ -6004,7 +6085,9 @@ public class freeswitch {
|
||||
public static readonly string SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE = freeswitchPINVOKE.SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get();
|
||||
public static readonly string SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE_get();
|
||||
public static readonly string SWITCH_READ_RESULT_VARIABLE = freeswitchPINVOKE.SWITCH_READ_RESULT_VARIABLE_get();
|
||||
public static readonly string SWITCH_ATT_XFER_RESULT_VARIABLE = freeswitchPINVOKE.SWITCH_ATT_XFER_RESULT_VARIABLE_get();
|
||||
public static readonly string SWITCH_COPY_XML_CDR_VARIABLE = freeswitchPINVOKE.SWITCH_COPY_XML_CDR_VARIABLE_get();
|
||||
public static readonly string SWITCH_COPY_JSON_CDR_VARIABLE = freeswitchPINVOKE.SWITCH_COPY_JSON_CDR_VARIABLE_get();
|
||||
public static readonly string SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE = freeswitchPINVOKE.SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get();
|
||||
public static readonly string SWITCH_TRANSFER_HISTORY_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_HISTORY_VARIABLE_get();
|
||||
public static readonly string SWITCH_TRANSFER_SOURCE_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_SOURCE_VARIABLE_get();
|
||||
@@ -6039,6 +6122,7 @@ public class freeswitch {
|
||||
public static readonly string SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME = freeswitchPINVOKE.SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME_get();
|
||||
public static readonly string SWITCH_BYPASS_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_BYPASS_MEDIA_VARIABLE_get();
|
||||
public static readonly string SWITCH_PROXY_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_PROXY_MEDIA_VARIABLE_get();
|
||||
public static readonly string SWITCH_ZRTP_PASSTHRU_VARIABLE = freeswitchPINVOKE.SWITCH_ZRTP_PASSTHRU_VARIABLE_get();
|
||||
public static readonly string SWITCH_ENDPOINT_DISPOSITION_VARIABLE = freeswitchPINVOKE.SWITCH_ENDPOINT_DISPOSITION_VARIABLE_get();
|
||||
public static readonly string SWITCH_HOLD_MUSIC_VARIABLE = freeswitchPINVOKE.SWITCH_HOLD_MUSIC_VARIABLE_get();
|
||||
public static readonly string SWITCH_TEMP_HOLD_MUSIC_VARIABLE = freeswitchPINVOKE.SWITCH_TEMP_HOLD_MUSIC_VARIABLE_get();
|
||||
@@ -6051,6 +6135,7 @@ public class freeswitch {
|
||||
public static readonly string SWITCH_LAST_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_LAST_BRIDGE_VARIABLE_get();
|
||||
public static readonly string SWITCH_SIGNAL_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_SIGNAL_BRIDGE_VARIABLE_get();
|
||||
public static readonly string SWITCH_SIGNAL_BOND_VARIABLE = freeswitchPINVOKE.SWITCH_SIGNAL_BOND_VARIABLE_get();
|
||||
public static readonly string SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE = freeswitchPINVOKE.SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE_get();
|
||||
public static readonly string SWITCH_ORIGINATOR_VARIABLE = freeswitchPINVOKE.SWITCH_ORIGINATOR_VARIABLE_get();
|
||||
public static readonly string SWITCH_ORIGINATOR_CODEC_VARIABLE = freeswitchPINVOKE.SWITCH_ORIGINATOR_CODEC_VARIABLE_get();
|
||||
public static readonly string SWITCH_ORIGINATOR_VIDEO_CODEC_VARIABLE = freeswitchPINVOKE.SWITCH_ORIGINATOR_VIDEO_CODEC_VARIABLE_get();
|
||||
@@ -6551,9 +6636,15 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_READ_RESULT_VARIABLE_get")]
|
||||
public static extern string SWITCH_READ_RESULT_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ATT_XFER_RESULT_VARIABLE_get")]
|
||||
public static extern string SWITCH_ATT_XFER_RESULT_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_COPY_XML_CDR_VARIABLE_get")]
|
||||
public static extern string SWITCH_COPY_XML_CDR_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_COPY_JSON_CDR_VARIABLE_get")]
|
||||
public static extern string SWITCH_COPY_JSON_CDR_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get")]
|
||||
public static extern string SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get();
|
||||
|
||||
@@ -6656,6 +6747,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_PROXY_MEDIA_VARIABLE_get")]
|
||||
public static extern string SWITCH_PROXY_MEDIA_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ZRTP_PASSTHRU_VARIABLE_get")]
|
||||
public static extern string SWITCH_ZRTP_PASSTHRU_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ENDPOINT_DISPOSITION_VARIABLE_get")]
|
||||
public static extern string SWITCH_ENDPOINT_DISPOSITION_VARIABLE_get();
|
||||
|
||||
@@ -6692,6 +6786,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_SIGNAL_BOND_VARIABLE_get")]
|
||||
public static extern string SWITCH_SIGNAL_BOND_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE_get")]
|
||||
public static extern string SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ORIGINATOR_VARIABLE_get")]
|
||||
public static extern string SWITCH_ORIGINATOR_VARIABLE_get();
|
||||
|
||||
@@ -7952,6 +8049,15 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_disable_heartbeat")]
|
||||
public static extern void switch_core_session_disable_heartbeat(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_pop")]
|
||||
public static extern int switch_core_media_bug_pop(HandleRef jarg1, string jarg2, HandleRef jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_exec_all")]
|
||||
public static extern int switch_core_media_bug_exec_all(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_count")]
|
||||
public static extern uint switch_core_media_bug_count(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_add")]
|
||||
public static extern int switch_core_media_bug_add(HandleRef jarg1, string jarg2, string jarg3, HandleRef jarg4, HandleRef jarg5, HandleRef jarg6, uint jarg7, HandleRef jarg8);
|
||||
|
||||
@@ -7976,6 +8082,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_get_read_replace_frame")]
|
||||
public static extern IntPtr switch_core_media_bug_get_read_replace_frame(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_set_read_demux_frame")]
|
||||
public static extern void switch_core_media_bug_set_read_demux_frame(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_get_session")]
|
||||
public static extern IntPtr switch_core_media_bug_get_session(HandleRef jarg1);
|
||||
|
||||
@@ -8006,8 +8115,8 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_close")]
|
||||
public static extern int switch_core_media_bug_close(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_remove_all")]
|
||||
public static extern int switch_core_media_bug_remove_all(HandleRef jarg1);
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_remove_all_function")]
|
||||
public static extern int switch_core_media_bug_remove_all_function(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_enumerate")]
|
||||
public static extern int switch_core_media_bug_enumerate(HandleRef jarg1, HandleRef jarg2);
|
||||
@@ -8519,6 +8628,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_read_impl")]
|
||||
public static extern int switch_core_session_get_read_impl(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_real_read_impl")]
|
||||
public static extern int switch_core_session_get_real_read_impl(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_write_impl")]
|
||||
public static extern int switch_core_session_get_write_impl(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
@@ -8991,7 +9103,7 @@ class freeswitchPINVOKE {
|
||||
public static extern uint switch_default_ptime(string jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_add_registration")]
|
||||
public static extern int switch_core_add_registration(string jarg1, string jarg2, string jarg3, string jarg4, uint jarg5, string jarg6, string jarg7, string jarg8);
|
||||
public static extern int switch_core_add_registration(string jarg1, string jarg2, string jarg3, string jarg4, uint jarg5, string jarg6, string jarg7, string jarg8, string jarg9);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_del_registration")]
|
||||
public static extern int switch_core_del_registration(string jarg1, string jarg2, string jarg3);
|
||||
@@ -9023,6 +9135,12 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_close_extra_files")]
|
||||
public static extern void switch_close_extra_files(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_thread_set_cpu_affinity")]
|
||||
public static extern int switch_core_thread_set_cpu_affinity(int jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_os_yield")]
|
||||
public static extern void switch_os_yield();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_loadable_module_interface_module_name_set")]
|
||||
public static extern void switch_loadable_module_interface_module_name_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
@@ -9155,6 +9273,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_loadable_module_get_codec_interface")]
|
||||
public static extern IntPtr switch_loadable_module_get_codec_interface(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_parse_codec_buf")]
|
||||
public static extern string switch_parse_codec_buf(string jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_loadable_module_get_dialplan_interface")]
|
||||
public static extern IntPtr switch_loadable_module_get_dialplan_interface(string jarg1);
|
||||
|
||||
@@ -12593,6 +12714,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_transfer_to_extension")]
|
||||
public static extern void switch_channel_transfer_to_extension(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_get_partner_uuid")]
|
||||
public static extern string switch_channel_get_partner_uuid(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_buffer_create")]
|
||||
public static extern int switch_buffer_create(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3);
|
||||
|
||||
@@ -12887,6 +13011,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_check_permission_list")]
|
||||
public static extern int switch_event_check_permission_list(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_add_presence_data_cols")]
|
||||
public static extern void switch_event_add_presence_data_cols(HandleRef jarg1, HandleRef jarg2, string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RESAMPLE_QUALITY_get")]
|
||||
public static extern int SWITCH_RESAMPLE_QUALITY_get();
|
||||
|
||||
@@ -12980,6 +13107,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_merge_sln")]
|
||||
public static extern uint switch_merge_sln(HandleRef jarg1, uint jarg2, HandleRef jarg3, uint jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_unmerge_sln")]
|
||||
public static extern uint switch_unmerge_sln(HandleRef jarg1, uint jarg2, HandleRef jarg3, uint jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_mux_channels")]
|
||||
public static extern void switch_mux_channels(HandleRef jarg1, HandleRef jarg2, uint jarg3);
|
||||
|
||||
@@ -13091,6 +13221,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_activate_unicast")]
|
||||
public static extern int switch_ivr_activate_unicast(HandleRef jarg1, string jarg2, ushort jarg3, string jarg4, ushort jarg5, string jarg6, string jarg7);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_generate_json_cdr")]
|
||||
public static extern int switch_ivr_generate_json_cdr(HandleRef jarg1, HandleRef jarg2, int jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_generate_xml_cdr")]
|
||||
public static extern int switch_ivr_generate_xml_cdr(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
@@ -13169,6 +13302,15 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_record_session")]
|
||||
public static extern int switch_ivr_record_session(HandleRef jarg1, string jarg2, uint jarg3, HandleRef jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_pop_eavesdropper")]
|
||||
public static extern int switch_ivr_eavesdrop_pop_eavesdropper(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_exec_all")]
|
||||
public static extern int switch_ivr_eavesdrop_exec_all(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_update_display")]
|
||||
public static extern int switch_ivr_eavesdrop_update_display(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_session")]
|
||||
public static extern int switch_ivr_eavesdrop_session(HandleRef jarg1, string jarg2, string jarg3, uint jarg4);
|
||||
|
||||
@@ -13481,6 +13623,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_kill_uuid")]
|
||||
public static extern int switch_ivr_kill_uuid(string jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_blind_transfer_ack")]
|
||||
public static extern int switch_ivr_blind_transfer_ack(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_BUF_LEN_get")]
|
||||
public static extern int SWITCH_RTP_MAX_BUF_LEN_get();
|
||||
|
||||
@@ -13724,6 +13869,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_check_auto_adj")]
|
||||
public static extern byte switch_rtp_check_auto_adj(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_set_interdigit_delay")]
|
||||
public static extern void switch_rtp_set_interdigit_delay(HandleRef jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_log_node_t_data_set")]
|
||||
public static extern void switch_log_node_t_data_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
@@ -17420,6 +17568,36 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_f_p_switch_media_bug_p_void__void {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_f_p_switch_media_bug_p_void__void(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_f_p_switch_media_bug_p_void__void() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_media_bug_p_void__void obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.1
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_f_p_switch_rtp_p_switch_socket_t_p_void_switch_size_t_p_switch_sockaddr_t__void {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -18200,6 +18378,36 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_p_cJSON {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_p_cJSON(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_p_cJSON() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_p_cJSON obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.1
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_p_p_char {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -23052,8 +23260,12 @@ public enum switch_channel_flag_t {
|
||||
CF_VIDEO_REFRESH_REQ,
|
||||
CF_SERVICE_AUDIO,
|
||||
CF_SERVICE_VIDEO,
|
||||
CF_ZRTP_PASSTHRU_REQ,
|
||||
CF_ZRTP_PASSTHRU,
|
||||
CF_ZRTP_HASH,
|
||||
CF_ZRTP_PASS,
|
||||
CF_CHANNEL_SWAP,
|
||||
CF_PICKUP,
|
||||
CF_CONFIRM_BLIND_TRANSFER,
|
||||
CF_FLAG_MAX
|
||||
}
|
||||
|
||||
@@ -24971,6 +25183,7 @@ public enum switch_core_session_message_types_t {
|
||||
SWITCH_MESSAGE_INDICATE_SIGNAL_DATA,
|
||||
SWITCH_MESSAGE_INDICATE_INFO,
|
||||
SWITCH_MESSAGE_INDICATE_AUDIO_DATA,
|
||||
SWITCH_MESSAGE_INDICATE_BLIND_TRANSFER_RESPONSE,
|
||||
SWITCH_MESSAGE_INVALID
|
||||
}
|
||||
|
||||
@@ -25930,7 +26143,8 @@ namespace FreeSWITCH.Native {
|
||||
ED_NONE = 0,
|
||||
ED_MUX_READ = (1 << 0),
|
||||
ED_MUX_WRITE = (1 << 1),
|
||||
ED_DTMF = (1 << 2)
|
||||
ED_DTMF = (1 << 2),
|
||||
ED_COPY_DISPLAY = (1 << 3)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29926,7 +30140,8 @@ namespace FreeSWITCH.Native {
|
||||
SMBF_THREAD_LOCK = (1 << 7),
|
||||
SMBF_PRUNE = (1 << 8),
|
||||
SMBF_NO_PAUSE = (1 << 9),
|
||||
SMBF_STEREO_SWAP = (1 << 10)
|
||||
SMBF_STEREO_SWAP = (1 << 10),
|
||||
SMBF_LOCK = (1 << 11)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -709,7 +709,7 @@ public class EventConsumer : IDisposable {
|
||||
}
|
||||
}
|
||||
|
||||
public EventConsumer(string event_name, string subclass_name) : this(freeswitchPINVOKE.new_EventConsumer(event_name, subclass_name), true) {
|
||||
public EventConsumer(string event_name, string subclass_name, int len) : this(freeswitchPINVOKE.new_EventConsumer(event_name, subclass_name, len), true) {
|
||||
}
|
||||
|
||||
public int bind(string event_name, string subclass_name) {
|
||||
@@ -1054,6 +1054,21 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_core_session_disable_heartbeat(SWIGTYPE_p_switch_core_session.getCPtr(session));
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_pop(SWIGTYPE_p_switch_core_session orig_session, string function, SWIGTYPE_p_p_switch_media_bug pop) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_pop(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), function, SWIGTYPE_p_p_switch_media_bug.getCPtr(pop));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_exec_all(SWIGTYPE_p_switch_core_session orig_session, string function, SWIGTYPE_p_f_p_switch_media_bug_p_void__void cb, SWIGTYPE_p_void user_data) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_exec_all(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), function, SWIGTYPE_p_f_p_switch_media_bug_p_void__void.getCPtr(cb), SWIGTYPE_p_void.getCPtr(user_data));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_core_media_bug_count(SWIGTYPE_p_switch_core_session orig_session, string function) {
|
||||
uint ret = freeswitchPINVOKE.switch_core_media_bug_count(SWIGTYPE_p_switch_core_session.getCPtr(orig_session), function);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_add(SWIGTYPE_p_switch_core_session session, string function, string target, SWIGTYPE_p_f_p_switch_media_bug_p_void_enum_switch_abc_type_t__switch_bool_t callback, SWIGTYPE_p_void user_data, SWIGTYPE_p_time_t stop_time, uint flags, SWIGTYPE_p_p_switch_media_bug new_bug) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_add(SWIGTYPE_p_switch_core_session.getCPtr(session), function, target, SWIGTYPE_p_f_p_switch_media_bug_p_void_enum_switch_abc_type_t__switch_bool_t.getCPtr(callback), SWIGTYPE_p_void.getCPtr(user_data), SWIGTYPE_p_time_t.getCPtr(stop_time), flags, SWIGTYPE_p_p_switch_media_bug.getCPtr(new_bug));
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -1094,6 +1109,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_core_media_bug_set_read_demux_frame(SWIGTYPE_p_switch_media_bug bug, switch_frame frame) {
|
||||
freeswitchPINVOKE.switch_core_media_bug_set_read_demux_frame(SWIGTYPE_p_switch_media_bug.getCPtr(bug), switch_frame.getCPtr(frame));
|
||||
}
|
||||
|
||||
public static SWIGTYPE_p_switch_core_session switch_core_media_bug_get_session(SWIGTYPE_p_switch_media_bug bug) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_core_media_bug_get_session(SWIGTYPE_p_switch_media_bug.getCPtr(bug));
|
||||
SWIGTYPE_p_switch_core_session ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_core_session(cPtr, false);
|
||||
@@ -1144,8 +1163,8 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_media_bug_remove_all(SWIGTYPE_p_switch_core_session session) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_remove_all(SWIGTYPE_p_switch_core_session.getCPtr(session));
|
||||
public static switch_status_t switch_core_media_bug_remove_all_function(SWIGTYPE_p_switch_core_session session, string function) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_remove_all_function(SWIGTYPE_p_switch_core_session.getCPtr(session), function);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1988,6 +2007,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_session_get_real_read_impl(SWIGTYPE_p_switch_core_session session, switch_codec_implementation impp) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_get_real_read_impl(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_codec_implementation.getCPtr(impp));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_session_get_write_impl(SWIGTYPE_p_switch_core_session session, switch_codec_implementation impp) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_get_write_impl(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_codec_implementation.getCPtr(impp));
|
||||
return ret;
|
||||
@@ -2635,8 +2659,8 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_add_registration(string user, string realm, string token, string url, uint expires, string network_ip, string network_port, string network_proto) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_add_registration(user, realm, token, url, expires, network_ip, network_port, network_proto);
|
||||
public static switch_status_t switch_core_add_registration(string user, string realm, string token, string url, uint expires, string network_ip, string network_port, string network_proto, string metadata) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_add_registration(user, realm, token, url, expires, network_ip, network_port, network_proto, metadata);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2687,6 +2711,15 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_close_extra_files(SWIGTYPE_p_int.getCPtr(keep), keep_ttl);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_thread_set_cpu_affinity(int cpu) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_thread_set_cpu_affinity(cpu);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_os_yield() {
|
||||
freeswitchPINVOKE.switch_os_yield();
|
||||
}
|
||||
|
||||
public static switch_status_t switch_loadable_module_init(switch_bool_t autoload) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_loadable_module_init((int)autoload);
|
||||
return ret;
|
||||
@@ -2708,6 +2741,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_parse_codec_buf(string buf, SWIGTYPE_p_unsigned_long interval, SWIGTYPE_p_unsigned_long rate, SWIGTYPE_p_unsigned_long bit) {
|
||||
string ret = freeswitchPINVOKE.switch_parse_codec_buf(buf, SWIGTYPE_p_unsigned_long.getCPtr(interval), SWIGTYPE_p_unsigned_long.getCPtr(rate), SWIGTYPE_p_unsigned_long.getCPtr(bit));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_dialplan_interface switch_loadable_module_get_dialplan_interface(string name) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_loadable_module_get_dialplan_interface(name);
|
||||
switch_dialplan_interface ret = (cPtr == IntPtr.Zero) ? null : new switch_dialplan_interface(cPtr, false);
|
||||
@@ -4068,6 +4106,11 @@ public class freeswitch {
|
||||
freeswitchPINVOKE.switch_channel_transfer_to_extension(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_caller_extension.getCPtr(caller_extension));
|
||||
}
|
||||
|
||||
public static string switch_channel_get_partner_uuid(SWIGTYPE_p_switch_channel channel) {
|
||||
string ret = freeswitchPINVOKE.switch_channel_get_partner_uuid(SWIGTYPE_p_switch_channel.getCPtr(channel));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_buffer_create(SWIGTYPE_p_apr_pool_t pool, SWIGTYPE_p_p_switch_buffer buffer, SWIGTYPE_p_switch_size_t max_len) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_buffer_create(SWIGTYPE_p_apr_pool_t.getCPtr(pool), SWIGTYPE_p_p_switch_buffer.getCPtr(buffer), SWIGTYPE_p_switch_size_t.getCPtr(max_len));
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -4358,6 +4401,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_event_add_presence_data_cols(SWIGTYPE_p_switch_channel channel, switch_event arg1, string prefix) {
|
||||
freeswitchPINVOKE.switch_event_add_presence_data_cols(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_event.getCPtr(arg1), prefix);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t new_resampler, uint from_rate, uint to_rate, uint to_size, int quality, uint channels, string file, string func, int line) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t.getCPtr(new_resampler), from_rate, to_rate, to_size, quality, channels, file, func, line);
|
||||
return ret;
|
||||
@@ -4414,6 +4461,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static uint switch_unmerge_sln(SWIGTYPE_p_short data, uint samples, SWIGTYPE_p_short other_data, uint other_samples) {
|
||||
uint ret = freeswitchPINVOKE.switch_unmerge_sln(SWIGTYPE_p_short.getCPtr(data), samples, SWIGTYPE_p_short.getCPtr(other_data), other_samples);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_mux_channels(SWIGTYPE_p_short data, SWIGTYPE_p_switch_size_t samples, uint channels) {
|
||||
freeswitchPINVOKE.switch_mux_channels(SWIGTYPE_p_short.getCPtr(data), SWIGTYPE_p_switch_size_t.getCPtr(samples), channels);
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -4429,6 +4481,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_generate_json_cdr(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_cJSON json_cdr, switch_bool_t urlencode) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_generate_json_cdr(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_cJSON.getCPtr(json_cdr), (int)urlencode);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_generate_xml_cdr(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_switch_xml xml_cdr) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_generate_xml_cdr(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_switch_xml.getCPtr(xml_cdr));
|
||||
return ret;
|
||||
@@ -4560,6 +4617,21 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_eavesdrop_pop_eavesdropper(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_p_switch_core_session sessionp) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_pop_eavesdropper(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_p_switch_core_session.getCPtr(sessionp));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_eavesdrop_exec_all(SWIGTYPE_p_switch_core_session session, string app, string arg) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_exec_all(SWIGTYPE_p_switch_core_session.getCPtr(session), app, arg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_eavesdrop_update_display(SWIGTYPE_p_switch_core_session session, string name, string number) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_update_display(SWIGTYPE_p_switch_core_session.getCPtr(session), name, number);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_eavesdrop_session(SWIGTYPE_p_switch_core_session session, string uuid, string require_group, uint flags) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_eavesdrop_session(SWIGTYPE_p_switch_core_session.getCPtr(session), uuid, require_group, flags);
|
||||
return ret;
|
||||
@@ -5076,6 +5148,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_blind_transfer_ack(SWIGTYPE_p_switch_core_session session, switch_bool_t success) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_blind_transfer_ack(SWIGTYPE_p_switch_core_session.getCPtr(session), (int)success);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_rtp_add_crypto_key(SWIGTYPE_p_switch_rtp rtp_session, switch_rtp_crypto_direction_t direction, uint index, switch_rtp_crypto_key_type_t type, SWIGTYPE_p_unsigned_char key, SWIGTYPE_p_switch_size_t keylen) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_add_crypto_key(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), (int)direction, index, (int)type, SWIGTYPE_p_unsigned_char.getCPtr(key), SWIGTYPE_p_switch_size_t.getCPtr(keylen));
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
@@ -5375,6 +5452,10 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_rtp_set_interdigit_delay(SWIGTYPE_p_switch_rtp rtp_session, uint delay) {
|
||||
freeswitchPINVOKE.switch_rtp_set_interdigit_delay(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), delay);
|
||||
}
|
||||
|
||||
public static switch_status_t switch_log_init(SWIGTYPE_p_apr_pool_t pool, switch_bool_t colorize) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_log_init(SWIGTYPE_p_apr_pool_t.getCPtr(pool), (int)colorize);
|
||||
return ret;
|
||||
@@ -5992,7 +6073,9 @@ public class freeswitch {
|
||||
public static readonly string SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE = freeswitchPINVOKE.SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE_get();
|
||||
public static readonly string SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE_get();
|
||||
public static readonly string SWITCH_READ_RESULT_VARIABLE = freeswitchPINVOKE.SWITCH_READ_RESULT_VARIABLE_get();
|
||||
public static readonly string SWITCH_ATT_XFER_RESULT_VARIABLE = freeswitchPINVOKE.SWITCH_ATT_XFER_RESULT_VARIABLE_get();
|
||||
public static readonly string SWITCH_COPY_XML_CDR_VARIABLE = freeswitchPINVOKE.SWITCH_COPY_XML_CDR_VARIABLE_get();
|
||||
public static readonly string SWITCH_COPY_JSON_CDR_VARIABLE = freeswitchPINVOKE.SWITCH_COPY_JSON_CDR_VARIABLE_get();
|
||||
public static readonly string SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE = freeswitchPINVOKE.SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get();
|
||||
public static readonly string SWITCH_TRANSFER_HISTORY_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_HISTORY_VARIABLE_get();
|
||||
public static readonly string SWITCH_TRANSFER_SOURCE_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_SOURCE_VARIABLE_get();
|
||||
@@ -6027,6 +6110,7 @@ public class freeswitch {
|
||||
public static readonly string SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME = freeswitchPINVOKE.SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME_get();
|
||||
public static readonly string SWITCH_BYPASS_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_BYPASS_MEDIA_VARIABLE_get();
|
||||
public static readonly string SWITCH_PROXY_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_PROXY_MEDIA_VARIABLE_get();
|
||||
public static readonly string SWITCH_ZRTP_PASSTHRU_VARIABLE = freeswitchPINVOKE.SWITCH_ZRTP_PASSTHRU_VARIABLE_get();
|
||||
public static readonly string SWITCH_ENDPOINT_DISPOSITION_VARIABLE = freeswitchPINVOKE.SWITCH_ENDPOINT_DISPOSITION_VARIABLE_get();
|
||||
public static readonly string SWITCH_HOLD_MUSIC_VARIABLE = freeswitchPINVOKE.SWITCH_HOLD_MUSIC_VARIABLE_get();
|
||||
public static readonly string SWITCH_TEMP_HOLD_MUSIC_VARIABLE = freeswitchPINVOKE.SWITCH_TEMP_HOLD_MUSIC_VARIABLE_get();
|
||||
@@ -6039,6 +6123,7 @@ public class freeswitch {
|
||||
public static readonly string SWITCH_LAST_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_LAST_BRIDGE_VARIABLE_get();
|
||||
public static readonly string SWITCH_SIGNAL_BRIDGE_VARIABLE = freeswitchPINVOKE.SWITCH_SIGNAL_BRIDGE_VARIABLE_get();
|
||||
public static readonly string SWITCH_SIGNAL_BOND_VARIABLE = freeswitchPINVOKE.SWITCH_SIGNAL_BOND_VARIABLE_get();
|
||||
public static readonly string SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE = freeswitchPINVOKE.SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE_get();
|
||||
public static readonly string SWITCH_ORIGINATOR_VARIABLE = freeswitchPINVOKE.SWITCH_ORIGINATOR_VARIABLE_get();
|
||||
public static readonly string SWITCH_ORIGINATOR_CODEC_VARIABLE = freeswitchPINVOKE.SWITCH_ORIGINATOR_CODEC_VARIABLE_get();
|
||||
public static readonly string SWITCH_ORIGINATOR_VIDEO_CODEC_VARIABLE = freeswitchPINVOKE.SWITCH_ORIGINATOR_VIDEO_CODEC_VARIABLE_get();
|
||||
@@ -6535,9 +6620,15 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_READ_RESULT_VARIABLE_get")]
|
||||
public static extern string SWITCH_READ_RESULT_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ATT_XFER_RESULT_VARIABLE_get")]
|
||||
public static extern string SWITCH_ATT_XFER_RESULT_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_COPY_XML_CDR_VARIABLE_get")]
|
||||
public static extern string SWITCH_COPY_XML_CDR_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_COPY_JSON_CDR_VARIABLE_get")]
|
||||
public static extern string SWITCH_COPY_JSON_CDR_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get")]
|
||||
public static extern string SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get();
|
||||
|
||||
@@ -6640,6 +6731,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_PROXY_MEDIA_VARIABLE_get")]
|
||||
public static extern string SWITCH_PROXY_MEDIA_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ZRTP_PASSTHRU_VARIABLE_get")]
|
||||
public static extern string SWITCH_ZRTP_PASSTHRU_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ENDPOINT_DISPOSITION_VARIABLE_get")]
|
||||
public static extern string SWITCH_ENDPOINT_DISPOSITION_VARIABLE_get();
|
||||
|
||||
@@ -6676,6 +6770,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_SIGNAL_BOND_VARIABLE_get")]
|
||||
public static extern string SWITCH_SIGNAL_BOND_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE_get")]
|
||||
public static extern string SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_ORIGINATOR_VARIABLE_get")]
|
||||
public static extern string SWITCH_ORIGINATOR_VARIABLE_get();
|
||||
|
||||
@@ -7936,6 +8033,15 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_disable_heartbeat")]
|
||||
public static extern void switch_core_session_disable_heartbeat(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_pop")]
|
||||
public static extern int switch_core_media_bug_pop(HandleRef jarg1, string jarg2, HandleRef jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_exec_all")]
|
||||
public static extern int switch_core_media_bug_exec_all(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_count")]
|
||||
public static extern uint switch_core_media_bug_count(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_add")]
|
||||
public static extern int switch_core_media_bug_add(HandleRef jarg1, string jarg2, string jarg3, HandleRef jarg4, HandleRef jarg5, HandleRef jarg6, uint jarg7, HandleRef jarg8);
|
||||
|
||||
@@ -7960,6 +8066,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_get_read_replace_frame")]
|
||||
public static extern IntPtr switch_core_media_bug_get_read_replace_frame(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_set_read_demux_frame")]
|
||||
public static extern void switch_core_media_bug_set_read_demux_frame(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_get_session")]
|
||||
public static extern IntPtr switch_core_media_bug_get_session(HandleRef jarg1);
|
||||
|
||||
@@ -7990,8 +8099,8 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_close")]
|
||||
public static extern int switch_core_media_bug_close(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_remove_all")]
|
||||
public static extern int switch_core_media_bug_remove_all(HandleRef jarg1);
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_remove_all_function")]
|
||||
public static extern int switch_core_media_bug_remove_all_function(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_enumerate")]
|
||||
public static extern int switch_core_media_bug_enumerate(HandleRef jarg1, HandleRef jarg2);
|
||||
@@ -8503,6 +8612,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_read_impl")]
|
||||
public static extern int switch_core_session_get_read_impl(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_real_read_impl")]
|
||||
public static extern int switch_core_session_get_real_read_impl(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_write_impl")]
|
||||
public static extern int switch_core_session_get_write_impl(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
@@ -8975,7 +9087,7 @@ class freeswitchPINVOKE {
|
||||
public static extern uint switch_default_ptime(string jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_add_registration")]
|
||||
public static extern int switch_core_add_registration(string jarg1, string jarg2, string jarg3, string jarg4, uint jarg5, string jarg6, string jarg7, string jarg8);
|
||||
public static extern int switch_core_add_registration(string jarg1, string jarg2, string jarg3, string jarg4, uint jarg5, string jarg6, string jarg7, string jarg8, string jarg9);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_del_registration")]
|
||||
public static extern int switch_core_del_registration(string jarg1, string jarg2, string jarg3);
|
||||
@@ -9007,6 +9119,12 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_close_extra_files")]
|
||||
public static extern void switch_close_extra_files(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_thread_set_cpu_affinity")]
|
||||
public static extern int switch_core_thread_set_cpu_affinity(int jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_os_yield")]
|
||||
public static extern void switch_os_yield();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_loadable_module_interface_module_name_set")]
|
||||
public static extern void switch_loadable_module_interface_module_name_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
@@ -9139,6 +9257,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_loadable_module_get_codec_interface")]
|
||||
public static extern IntPtr switch_loadable_module_get_codec_interface(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_parse_codec_buf")]
|
||||
public static extern string switch_parse_codec_buf(string jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_loadable_module_get_dialplan_interface")]
|
||||
public static extern IntPtr switch_loadable_module_get_dialplan_interface(string jarg1);
|
||||
|
||||
@@ -12577,6 +12698,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_transfer_to_extension")]
|
||||
public static extern void switch_channel_transfer_to_extension(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_get_partner_uuid")]
|
||||
public static extern string switch_channel_get_partner_uuid(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_buffer_create")]
|
||||
public static extern int switch_buffer_create(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3);
|
||||
|
||||
@@ -12871,6 +12995,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_check_permission_list")]
|
||||
public static extern int switch_event_check_permission_list(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_add_presence_data_cols")]
|
||||
public static extern void switch_event_add_presence_data_cols(HandleRef jarg1, HandleRef jarg2, string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RESAMPLE_QUALITY_get")]
|
||||
public static extern int SWITCH_RESAMPLE_QUALITY_get();
|
||||
|
||||
@@ -12964,6 +13091,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_merge_sln")]
|
||||
public static extern uint switch_merge_sln(HandleRef jarg1, uint jarg2, HandleRef jarg3, uint jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_unmerge_sln")]
|
||||
public static extern uint switch_unmerge_sln(HandleRef jarg1, uint jarg2, HandleRef jarg3, uint jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_mux_channels")]
|
||||
public static extern void switch_mux_channels(HandleRef jarg1, HandleRef jarg2, uint jarg3);
|
||||
|
||||
@@ -13075,6 +13205,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_activate_unicast")]
|
||||
public static extern int switch_ivr_activate_unicast(HandleRef jarg1, string jarg2, ushort jarg3, string jarg4, ushort jarg5, string jarg6, string jarg7);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_generate_json_cdr")]
|
||||
public static extern int switch_ivr_generate_json_cdr(HandleRef jarg1, HandleRef jarg2, int jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_generate_xml_cdr")]
|
||||
public static extern int switch_ivr_generate_xml_cdr(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
@@ -13153,6 +13286,15 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_record_session")]
|
||||
public static extern int switch_ivr_record_session(HandleRef jarg1, string jarg2, uint jarg3, HandleRef jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_pop_eavesdropper")]
|
||||
public static extern int switch_ivr_eavesdrop_pop_eavesdropper(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_exec_all")]
|
||||
public static extern int switch_ivr_eavesdrop_exec_all(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_update_display")]
|
||||
public static extern int switch_ivr_eavesdrop_update_display(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_eavesdrop_session")]
|
||||
public static extern int switch_ivr_eavesdrop_session(HandleRef jarg1, string jarg2, string jarg3, uint jarg4);
|
||||
|
||||
@@ -13465,6 +13607,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_kill_uuid")]
|
||||
public static extern int switch_ivr_kill_uuid(string jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_blind_transfer_ack")]
|
||||
public static extern int switch_ivr_blind_transfer_ack(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_BUF_LEN_get")]
|
||||
public static extern int SWITCH_RTP_MAX_BUF_LEN_get();
|
||||
|
||||
@@ -13708,6 +13853,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_check_auto_adj")]
|
||||
public static extern byte switch_rtp_check_auto_adj(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_set_interdigit_delay")]
|
||||
public static extern void switch_rtp_set_interdigit_delay(HandleRef jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_log_node_t_data_set")]
|
||||
public static extern void switch_log_node_t_data_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
@@ -14768,7 +14916,7 @@ class freeswitchPINVOKE {
|
||||
public static extern uint EventConsumer_node_index_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_EventConsumer")]
|
||||
public static extern IntPtr new_EventConsumer(string jarg1, string jarg2);
|
||||
public static extern IntPtr new_EventConsumer(string jarg1, string jarg2, int jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_delete_EventConsumer")]
|
||||
public static extern void delete_EventConsumer(HandleRef jarg1);
|
||||
@@ -17362,6 +17510,36 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_f_p_switch_media_bug_p_void__void {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_f_p_switch_media_bug_p_void__void(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_f_p_switch_media_bug_p_void__void() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_media_bug_p_void__void obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.35
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_f_p_switch_rtp_p_switch_socket_t_p_void_switch_size_t_p_switch_sockaddr_t__void {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -18142,6 +18320,36 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_p_cJSON {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_p_cJSON(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_p_cJSON() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_p_cJSON obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.35
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_p_p_char {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
@@ -22996,8 +23204,12 @@ public enum switch_channel_flag_t {
|
||||
CF_VIDEO_REFRESH_REQ,
|
||||
CF_SERVICE_AUDIO,
|
||||
CF_SERVICE_VIDEO,
|
||||
CF_ZRTP_PASSTHRU_REQ,
|
||||
CF_ZRTP_PASSTHRU,
|
||||
CF_ZRTP_HASH,
|
||||
CF_ZRTP_PASS,
|
||||
CF_CHANNEL_SWAP,
|
||||
CF_PICKUP,
|
||||
CF_CONFIRM_BLIND_TRANSFER,
|
||||
CF_FLAG_MAX
|
||||
}
|
||||
|
||||
@@ -24891,6 +25103,7 @@ public enum switch_core_session_message_types_t {
|
||||
SWITCH_MESSAGE_INDICATE_SIGNAL_DATA,
|
||||
SWITCH_MESSAGE_INDICATE_INFO,
|
||||
SWITCH_MESSAGE_INDICATE_AUDIO_DATA,
|
||||
SWITCH_MESSAGE_INDICATE_BLIND_TRANSFER_RESPONSE,
|
||||
SWITCH_MESSAGE_INVALID
|
||||
}
|
||||
|
||||
@@ -25836,7 +26049,8 @@ namespace FreeSWITCH.Native {
|
||||
ED_NONE = 0,
|
||||
ED_MUX_READ = (1 << 0),
|
||||
ED_MUX_WRITE = (1 << 1),
|
||||
ED_DTMF = (1 << 2)
|
||||
ED_DTMF = (1 << 2),
|
||||
ED_COPY_DISPLAY = (1 << 3)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29776,7 +29990,8 @@ namespace FreeSWITCH.Native {
|
||||
SMBF_THREAD_LOCK = (1 << 7),
|
||||
SMBF_PRUNE = (1 << 8),
|
||||
SMBF_NO_PAUSE = (1 << 9),
|
||||
SMBF_STEREO_SWAP = (1 << 10)
|
||||
SMBF_STEREO_SWAP = (1 << 10),
|
||||
SMBF_LOCK = (1 << 11)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4675,6 +4675,7 @@ XS(_wrap_new_EventConsumer) {
|
||||
{
|
||||
char *arg1 = (char *) NULL ;
|
||||
char *arg2 = (char *) "" ;
|
||||
int arg3 = (int) 5000 ;
|
||||
EventConsumer *result = 0 ;
|
||||
int res1 ;
|
||||
char *buf1 = 0 ;
|
||||
@@ -4682,11 +4683,13 @@ XS(_wrap_new_EventConsumer) {
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 0) || (items > 2)) {
|
||||
SWIG_croak("Usage: new_EventConsumer(event_name,subclass_name);");
|
||||
if ((items < 0) || (items > 3)) {
|
||||
SWIG_croak("Usage: new_EventConsumer(event_name,subclass_name,len);");
|
||||
}
|
||||
if (items > 0) {
|
||||
res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
|
||||
@@ -4702,14 +4705,23 @@ XS(_wrap_new_EventConsumer) {
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
}
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2);
|
||||
if (items > 2) {
|
||||
ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_EventConsumer" "', argument " "3"" of type '" "int""'");
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
}
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2,arg3);
|
||||
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EventConsumer, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
||||
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5406,6 +5406,7 @@ SWIGINTERN PyObject *_wrap_new_EventConsumer(PyObject *SWIGUNUSEDPARM(self), PyO
|
||||
PyObject *resultobj = 0;
|
||||
char *arg1 = (char *) NULL ;
|
||||
char *arg2 = (char *) "" ;
|
||||
int arg3 = (int) 5000 ;
|
||||
EventConsumer *result = 0 ;
|
||||
int res1 ;
|
||||
char *buf1 = 0 ;
|
||||
@@ -5413,10 +5414,13 @@ SWIGINTERN PyObject *_wrap_new_EventConsumer(PyObject *SWIGUNUSEDPARM(self), PyO
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"|OO:new_EventConsumer",&obj0,&obj1)) SWIG_fail;
|
||||
if (!PyArg_ParseTuple(args,(char *)"|OOO:new_EventConsumer",&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
if (obj0) {
|
||||
res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
@@ -5431,7 +5435,14 @@ SWIGINTERN PyObject *_wrap_new_EventConsumer(PyObject *SWIGUNUSEDPARM(self), PyO
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
}
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2);
|
||||
if (obj2) {
|
||||
ecode3 = SWIG_AsVal_int(obj2, &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_EventConsumer" "', argument " "3"" of type '" "int""'");
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
}
|
||||
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2,arg3);
|
||||
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EventConsumer, SWIG_POINTER_NEW | 0 );
|
||||
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -22,9 +22,11 @@
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Chris Rienzo <chris@rienzo.net>
|
||||
* Christopher M. Rienzo <chris@rienzo.com>
|
||||
* Timo Teräs <timo.teras@iki.fi> (based on mod_timerfd.c)
|
||||
*
|
||||
* Maintainer: Christopher M. Rienzo <chris@rienzo.com>
|
||||
*
|
||||
* mod_posix_timer.c -- soft timer implemented with POSIX timers (timer_create/timer_settime/timer_getoverrun)
|
||||
*
|
||||
*/
|
||||
@@ -44,7 +46,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_posix_timer_shutdown);
|
||||
SWITCH_MODULE_RUNTIME_FUNCTION(mod_posix_timer_runtime);
|
||||
SWITCH_MODULE_DEFINITION(mod_posix_timer, mod_posix_timer_load, mod_posix_timer_shutdown, mod_posix_timer_runtime);
|
||||
|
||||
#define SIG SIGRTMAX
|
||||
#define SIG (SIGRTMAX - 1)
|
||||
#define MAX_INTERVAL 2000 /* ms */
|
||||
#define TIMERS_PER_INTERVAL 4
|
||||
#define MAX_ACTIVE_TIMERS 256 /* one byte */
|
||||
@@ -111,7 +113,9 @@ static void timer_signal_handler(int sig, siginfo_t *si, void *cu)
|
||||
if (val >= 0 && val <= MAX_ACTIVE_TIMERS) {
|
||||
uint8_t active_id = (uint8_t)val;
|
||||
/* notify runtime thread that timer identified by active_id has ticked */
|
||||
write(globals.timer_tick_pipe[1], &active_id, 1);
|
||||
if (write(globals.timer_tick_pipe[1], &active_id, 1) == -1) {
|
||||
/* don't actually care about this error- this is only to make the compiler happy */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ static void *module_thread(void *dummy)
|
||||
/**
|
||||
* Load mod_posix_timer and start the runtime thread
|
||||
*/
|
||||
static void load_module()
|
||||
static int load_module()
|
||||
{
|
||||
fail_count = 0;
|
||||
warn_count = 0;
|
||||
@@ -124,9 +124,11 @@ static void load_module()
|
||||
session_count = 0;
|
||||
last_reported_session_count = 0;
|
||||
shutdown = 0;
|
||||
mod_posix_timer_load(&mod, &pool);
|
||||
if (mod_posix_timer_load(&mod, &pool) != SWITCH_STATUS_SUCCESS) {
|
||||
return -1;
|
||||
}
|
||||
timer_if = mod->timer;
|
||||
pthread_create(&module_runtime_thread_id, NULL, module_thread, NULL);
|
||||
return pthread_create(&module_runtime_thread_id, NULL, module_thread, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -444,12 +446,14 @@ int main (int argc, char **argv)
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
srand48(ts.tv_nsec);
|
||||
load_module();
|
||||
if (load_module() == -1) {
|
||||
return -1;
|
||||
}
|
||||
//test_timer(20, 5.0f, .2f, 1000);
|
||||
//test_timer_session(intervals, interval_weights, 4, 2 * 86400.0f, 90, 2000, 30.0, 5.0f);
|
||||
while(1) {
|
||||
/* stop periodically to trigger timer shutdown */
|
||||
test_timer_session(intervals, interval_weights, 1, 60, 150, 3000, 30.0, 5.0f);
|
||||
test_timer_session(intervals, interval_weights, 1, 60, 150, 190 /* 3000 */, 30.0, 5.0f);
|
||||
}
|
||||
//test_timer(1000, 5.0f, 1);
|
||||
//test_timer(20, 5.0f, .2f, 1000);
|
||||
|
||||
@@ -46,6 +46,9 @@ struct xml_binding {
|
||||
switch_hash_t *vars_map;
|
||||
char *bindings;
|
||||
|
||||
char *server;
|
||||
switch_thread_t *thread;
|
||||
struct xml_binding *next;
|
||||
};
|
||||
|
||||
static int GLOBAL_DEBUG = 0;
|
||||
@@ -63,6 +66,8 @@ static struct {
|
||||
switch_memory_pool_t *pool;
|
||||
hash_node_t *hash_root;
|
||||
hash_node_t *hash_tail;
|
||||
int running;
|
||||
xml_binding_t *bindings;
|
||||
} globals;
|
||||
|
||||
#define XML_SCGI_SYNTAX "[debug_on|debug_off]"
|
||||
@@ -92,6 +97,38 @@ SWITCH_STANDARD_API(xml_scgi_function)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void *SWITCH_THREAD_FUNC monitor_thread_run(switch_thread_t *thread, void *obj)
|
||||
{
|
||||
xml_binding_t *binding = (xml_binding_t *) obj;
|
||||
time_t st;
|
||||
int diff;
|
||||
|
||||
while(globals.running) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Running server command: %s\n", binding->server);
|
||||
st = switch_epoch_time_now(NULL);
|
||||
switch_system(binding->server, SWITCH_TRUE);
|
||||
diff = (int) switch_epoch_time_now(NULL) - st;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Server command complete: %s\n", binding->server);
|
||||
|
||||
if (globals.running && diff < 5) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Server command had short run duration, sleeping: %s\n", binding->server);
|
||||
switch_yield(10000000);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void launch_monitor_thread(xml_binding_t *binding)
|
||||
{
|
||||
switch_threadattr_t *thd_attr = NULL;
|
||||
|
||||
switch_threadattr_create(&thd_attr, globals.pool);
|
||||
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
|
||||
switch_threadattr_priority_increase(thd_attr);
|
||||
switch_thread_create(&binding->thread, thd_attr, monitor_thread_run, binding, globals.pool);
|
||||
}
|
||||
|
||||
|
||||
static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, const char *key_name, const char *key_value, switch_event_t *params,
|
||||
void *user_data)
|
||||
@@ -130,6 +167,7 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
|
||||
txt = (char *) stream.data;
|
||||
|
||||
while((len = scgi_recv(&handle, buf, sizeof(buf))) > 0) {
|
||||
char *expanded = switch_event_expand_headers(params, (char *)buf);
|
||||
|
||||
bytes += len;
|
||||
|
||||
@@ -139,8 +177,14 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
|
||||
break;
|
||||
}
|
||||
|
||||
stream.write_function(&stream, "%s", buf);
|
||||
stream.write_function(&stream, "%s", expanded);
|
||||
txt = (char *) stream.data;
|
||||
|
||||
if (expanded != (char *)buf) {
|
||||
free(expanded);
|
||||
}
|
||||
|
||||
memset(buf, 0, sizeof(buf));
|
||||
}
|
||||
|
||||
scgi_disconnect(&handle);
|
||||
@@ -210,7 +254,8 @@ static switch_status_t do_config(void)
|
||||
char *port = "8080";
|
||||
char *bind_mask = NULL;
|
||||
int timeout = 0;
|
||||
|
||||
char *server = NULL;
|
||||
|
||||
hash_node_t *hash_node;
|
||||
need_vars_map = 0;
|
||||
vars_map = NULL;
|
||||
@@ -248,6 +293,8 @@ static switch_status_t do_config(void)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't add %s to params hash!\n", val);
|
||||
}
|
||||
}
|
||||
} else if (!strcasecmp(var, "server")) {
|
||||
server = val;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,6 +320,10 @@ static switch_status_t do_config(void)
|
||||
binding->vars_map = vars_map;
|
||||
binding->url = switch_mprintf("scgi://%s:%s/%s", host, port, bname);
|
||||
|
||||
if (server) {
|
||||
binding->server = switch_core_strdup(globals.pool, server);
|
||||
}
|
||||
|
||||
if (bind_mask) {
|
||||
binding->bindings = switch_core_strdup(globals.pool, bind_mask);
|
||||
}
|
||||
@@ -297,6 +348,15 @@ static switch_status_t do_config(void)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Binding [%s] XML Fetch Function [%s] [%s]\n",
|
||||
zstr(bname) ? "N/A" : bname, binding->url, binding->bindings ? binding->bindings : "all");
|
||||
switch_xml_bind_search_function(xml_url_fetch, switch_xml_parse_section_string(binding->bindings), binding);
|
||||
|
||||
if (binding->server) {
|
||||
launch_monitor_thread(binding);
|
||||
}
|
||||
|
||||
binding->next = globals.bindings;
|
||||
globals.bindings = binding;
|
||||
|
||||
|
||||
x++;
|
||||
binding = NULL;
|
||||
}
|
||||
@@ -315,6 +375,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_scgi_load)
|
||||
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
globals.running = 1;
|
||||
globals.pool = pool;
|
||||
globals.hash_root = NULL;
|
||||
globals.hash_tail = NULL;
|
||||
@@ -334,6 +395,41 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_scgi_load)
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_scgi_shutdown)
|
||||
{
|
||||
hash_node_t *ptr = NULL;
|
||||
xml_binding_t *bp;
|
||||
|
||||
globals.running = 0;
|
||||
|
||||
for(bp = globals.bindings; bp; bp = bp->next) {
|
||||
if (bp->thread) {
|
||||
switch_status_t st;
|
||||
scgi_handle_t handle = { 0 };
|
||||
unsigned char buf[16336] = "";
|
||||
int x = 3;
|
||||
|
||||
scgi_add_param(&handle, "REQUEST_METHOD", "POST");
|
||||
scgi_add_param(&handle, "REQUEST_URI", bp->url);
|
||||
scgi_add_body(&handle, "SHUTDOWN");
|
||||
|
||||
while(x--) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Sending shutdown message to server for %s\n", bp->url);
|
||||
|
||||
if (scgi_connect(&handle, bp->host, bp->port, bp->timeout * 1000) == SCGI_SUCCESS) {
|
||||
while(0 && scgi_recv(&handle, buf, sizeof(buf)) > 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "%s\n", (char *) buf);
|
||||
memset(buf, 0, sizeof(buf));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
switch_yield(5000000);
|
||||
}
|
||||
|
||||
scgi_disconnect(&handle);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Waiting for server to stop.\n");
|
||||
switch_thread_join(&st, bp->thread);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
while (globals.hash_root) {
|
||||
ptr = globals.hash_root;
|
||||
|
||||
Reference in New Issue
Block a user