pkgsrc-wip/asterisk/patches/patch-ah
Marc Recht bc729d14c7 Initial import of asterisk 0.4.0
from PR pkg/22585

Asterisk is a complete PBX in software. It runs on Linux and provides
all of the features you would expect from a PBX and more. Asterisk
does voice over IP in three protocols, and can interoperate with
almost all standards-based telephony equipment using relatively
inexpensive hardware.

Asterisk provides Voicemail services with Directory, Call Conferencing,
Interactive Voice Response, Call Queuing. It has support for
three-way calling, caller ID services, ADSI, SIP and H.323 (as both
client and gateway). Check the Features section for a more complete
list.
2003-11-10 10:14:16 +00:00

36 lines
1.1 KiB
Text

$NetBSD: patch-ah,v 1.1.1.1 2003/11/10 10:14:30 marc Exp $
--- work.i386/asterisk-0.4.0/channels/chan_iax.c- 2003-08-24 09:51:59.000000000 +0900
+++ work.i386/asterisk-0.4.0/channels/chan_iax.c 2003-08-24 09:56:05.000000000 +0900
@@ -32,6 +32,9 @@
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#ifdef __NetBSD__
+#include <netinet/in_systm.h>
+#endif
#include <netinet/ip.h>
#include <sys/time.h>
#include <sys/signal.h>
@@ -4625,6 +4628,9 @@
} else if (!strcasecmp(v->name, "register")) {
iax_register(v->value, v->lineno);
} else if (!strcasecmp(v->name, "tos")) {
+#ifndef IPTOS_MINCOST
+#define IPTOS_MINCOST 0x01
+#endif
if (sscanf(v->value, "%i", &format) == 1)
tos = format & 0xff;
else if (!strcasecmp(v->value, "lowdelay"))
@@ -5125,7 +5131,11 @@
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Using TOS bits %d\n", tos);
+#ifdef SOL_IP
if (setsockopt(netsocket, SOL_IP, IP_TOS, &tos, sizeof(tos)))
+#else
+ if (setsockopt(netsocket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)))
+#endif
ast_log(LOG_WARNING, "Unable to set TOS to %d\n", tos);
if (!res) {