From 1d473f25ddbfa8caabaf8e2aa83c190c2b3fc9d2 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Fri, 25 Jun 2004 03:59:07 +0000 Subject: Add outgoing OSP support (SIP only at this point) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3296 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/astosp.h | 35 +++++++++++++++++++++++++++++++++++ include/asterisk/causes.h | 1 + include/asterisk/utils.h | 3 +++ 3 files changed, 39 insertions(+) create mode 100755 include/asterisk/astosp.h (limited to 'include/asterisk') diff --git a/include/asterisk/astosp.h b/include/asterisk/astosp.h new file mode 100755 index 000000000..92eeab82f --- /dev/null +++ b/include/asterisk/astosp.h @@ -0,0 +1,35 @@ +/* + * Asterisk -- A telephony toolkit for Linux. + * + * OSP support + * + * Copyright (C) 1999, Mark Spencer + * + * Mark Spencer + * + * This program is free software, distributed under the terms of + * the GNU General Public License + */ + +#ifndef _ASTERISK_OSP_H +#define _ASTERISK_OSP_H +#include +#include + +struct ast_osp_result { + int handle; + int numresults; + char tech[20]; + char dest[256]; + char token[4096]; +}; + +/* Note: Channel will be auto-serviced if specified. Returns -1 on hangup, + 0 if nothing found, or 1 if something is found */ +int ast_osp_lookup(struct ast_channel *chan, char *provider, char *extension, char *callerid, struct ast_osp_result *result); + +int ast_osp_next(struct ast_osp_result *result, int cause); + +int ast_osp_terminate(int handle, int cause, time_t start, time_t duration); + +#endif diff --git a/include/asterisk/causes.h b/include/asterisk/causes.h index 8f8e811fb..c77905def 100755 --- a/include/asterisk/causes.h +++ b/include/asterisk/causes.h @@ -20,5 +20,6 @@ #define AST_CAUSE_FAILURE 3 #define AST_CAUSE_CONGESTION 4 #define AST_CAUSE_UNALLOCATED 5 +#define AST_CAUSE_NOANSWER 6 #endif diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 16212a038..aa456262f 100755 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -25,7 +25,10 @@ struct ast_hostent { }; extern struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp); +extern int ast_base64encode(char *dst, unsigned char *src, int srclen, int max); +extern int ast_base64decode(unsigned char *dst, char *src, int max); extern int test_for_thread_safety(void); +extern int ast_utils_init(void); #endif -- cgit v1.2.3