mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-08 16:53:21 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@999 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
cbd2b860ff
commit
703642fbfd
@ -34,8 +34,8 @@ POST_INSTALL = :
|
|||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
build_triplet = i686-pc-linux-gnu
|
build_triplet = x86_64-unknown-linux-gnu
|
||||||
host_triplet = i686-pc-linux-gnu
|
host_triplet = x86_64-unknown-linux-gnu
|
||||||
noinst_PROGRAMS = example1$(EXEEXT) example2$(EXEEXT) \
|
noinst_PROGRAMS = example1$(EXEEXT) example2$(EXEEXT) \
|
||||||
example3$(EXEEXT) example4$(EXEEXT)
|
example3$(EXEEXT) example4$(EXEEXT)
|
||||||
subdir = examples
|
subdir = examples
|
||||||
@ -114,8 +114,8 @@ INSTALL_DATA = ${INSTALL} -m 644
|
|||||||
INSTALL_PROGRAM = ${INSTALL}
|
INSTALL_PROGRAM = ${INSTALL}
|
||||||
INSTALL_SCRIPT = ${INSTALL}
|
INSTALL_SCRIPT = ${INSTALL}
|
||||||
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
|
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
|
||||||
IS64BITLINUX_FALSE =
|
IS64BITLINUX_FALSE = #
|
||||||
IS64BITLINUX_TRUE = #
|
IS64BITLINUX_TRUE =
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
LIBOBJS =
|
LIBOBJS =
|
||||||
LIBS =
|
LIBS =
|
||||||
@ -170,18 +170,18 @@ am__quote =
|
|||||||
am__tar = ${AMTAR} chof - "$$tardir"
|
am__tar = ${AMTAR} chof - "$$tardir"
|
||||||
am__untar = ${AMTAR} xf -
|
am__untar = ${AMTAR} xf -
|
||||||
bindir = ${exec_prefix}/bin
|
bindir = ${exec_prefix}/bin
|
||||||
build = i686-pc-linux-gnu
|
build = x86_64-unknown-linux-gnu
|
||||||
build_alias =
|
build_alias =
|
||||||
build_cpu = i686
|
build_cpu = x86_64
|
||||||
build_os = linux-gnu
|
build_os = linux-gnu
|
||||||
build_vendor = pc
|
build_vendor = unknown
|
||||||
datadir = ${prefix}/share
|
datadir = ${prefix}/share
|
||||||
exec_prefix = ${prefix}
|
exec_prefix = ${prefix}
|
||||||
host = i686-pc-linux-gnu
|
host = x86_64-unknown-linux-gnu
|
||||||
host_alias =
|
host_alias =
|
||||||
host_cpu = i686
|
host_cpu = x86_64
|
||||||
host_os = linux-gnu
|
host_os = linux-gnu
|
||||||
host_vendor = pc
|
host_vendor = unknown
|
||||||
includedir = ${prefix}/include
|
includedir = ${prefix}/include
|
||||||
infodir = ${prefix}/info
|
infodir = ${prefix}/info
|
||||||
install_sh = /usr/src/freeswitch.trunk/libs/jrtplib/install-sh
|
install_sh = /usr/src/freeswitch.trunk/libs/jrtplib/install-sh
|
||||||
|
@ -497,7 +497,9 @@ static switch_status channel_kill_channel(switch_core_session *session, int sig)
|
|||||||
if (tech_pvt->dlsession) {
|
if (tech_pvt->dlsession) {
|
||||||
ldl_session_terminate(tech_pvt->dlsession);
|
ldl_session_terminate(tech_pvt->dlsession);
|
||||||
}
|
}
|
||||||
jrtp4c_killread(tech_pvt->rtp_session);
|
if (tech_pvt->rtp_session) {
|
||||||
|
jrtp4c_killread(tech_pvt->rtp_session);
|
||||||
|
}
|
||||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s CHANNEL KILL\n", switch_channel_get_name(channel));
|
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s CHANNEL KILL\n", switch_channel_get_name(channel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -722,8 +724,8 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr
|
|||||||
stun_packet_attribute_add_username(packet, login, 32);
|
stun_packet_attribute_add_username(packet, login, 32);
|
||||||
sendto(tech_pvt->rtp_sock, (char *)packet, stun_packet_length(packet), 0 ,(struct sockaddr *)&servaddr, sizeof(servaddr));
|
sendto(tech_pvt->rtp_sock, (char *)packet, stun_packet_length(packet), 0 ,(struct sockaddr *)&servaddr, sizeof(servaddr));
|
||||||
//xstun
|
//xstun
|
||||||
//printf("SEND STUN REQ %s U=%s to %s:%d\n", packet->header.id, login, tech_pvt->remote_ip, tech_pvt->remote_port);
|
//printf("XXXX SEND STUN REQ %s U=%s to %s:%d\n", packet->header.id, login, tech_pvt->remote_ip, tech_pvt->remote_port);
|
||||||
tech_pvt->stuncount = 75;
|
tech_pvt->stuncount = 25;
|
||||||
} else {
|
} else {
|
||||||
tech_pvt->stuncount--;
|
tech_pvt->stuncount--;
|
||||||
}
|
}
|
||||||
@ -1399,7 +1401,6 @@ static void stun_callback(struct jrtp4c *jrtp4c, jrtp_socket_t sock, void *data,
|
|||||||
packet = stun_packet_parse(buf, sizeof(buf));
|
packet = stun_packet_parse(buf, sizeof(buf));
|
||||||
tech_pvt->last_stun = switch_time_now();
|
tech_pvt->last_stun = switch_time_now();
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "read %d\ntype: [%s] (0x%04x)\nlength 0x%04x\nid %s\n",
|
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "read %d\ntype: [%s] (0x%04x)\nlength 0x%04x\nid %s\n",
|
||||||
len,
|
len,
|
||||||
@ -1434,7 +1435,8 @@ static void stun_callback(struct jrtp4c *jrtp4c, jrtp_socket_t sock, void *data,
|
|||||||
}
|
}
|
||||||
} while (stun_packet_next_attribute(attr));
|
} while (stun_packet_next_attribute(attr));
|
||||||
|
|
||||||
if (packet->header.type == STUN_BINDING_REQUEST) {
|
|
||||||
|
if (packet->header.type == STUN_BINDING_REQUEST && strstr(username,tech_pvt->remote_user)) {
|
||||||
uint8_t buf[512];
|
uint8_t buf[512];
|
||||||
stun_packet_t *rpacket;
|
stun_packet_t *rpacket;
|
||||||
struct sockaddr_in servaddr;
|
struct sockaddr_in servaddr;
|
||||||
@ -1442,8 +1444,7 @@ static void stun_callback(struct jrtp4c *jrtp4c, jrtp_socket_t sock, void *data,
|
|||||||
|
|
||||||
servaddr.sin_addr.s_addr = ip;
|
servaddr.sin_addr.s_addr = ip;
|
||||||
remote_ip = inet_ntoa(servaddr.sin_addr);
|
remote_ip = inet_ntoa(servaddr.sin_addr);
|
||||||
|
|
||||||
|
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
rpacket = stun_packet_build_header(STUN_BINDING_RESPONSE, packet->header.id, buf);
|
rpacket = stun_packet_build_header(STUN_BINDING_RESPONSE, packet->header.id, buf);
|
||||||
stun_packet_attribute_add_username(rpacket, username, 32);
|
stun_packet_attribute_add_username(rpacket, username, 32);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user