Asterisk.org: Developer Documentation (28 Oct 2009)

Wed Oct 28 15:47:49 2009

## Asterisk developer's documentation

# astosp.h

Go to the documentation of this file.

    00001 /*
    00002  * Asterisk -- An open source telephony toolkit.
    00003  *
    00004  * Copyright (C) 1999 - 2005, Digium, Inc.
    00005  *
    00006  * Mark Spencer <markster@digium.com>
    00007  *
    00008  * See http://www.asterisk.org for more information about
    00009  * the Asterisk project. Please do not directly contact
    00010  * any of the maintainers of this project for assistance;
    00011  * the project provides a web site, mailing lists and IRC
    00012  * channels for your use.
    00013  *
    00014  * This program is free software, distributed under the terms of
    00015  * the GNU General Public License Version 2. See the LICENSE file
    00016  * at the top of the source tree.
    00017  */
    00018
    00019 /*! \file
    00020  * \brief OSP support (Open Settlement Protocol)
    00021  */
    00022
    00023 #ifndef _ASTERISK_OSP_H
    00024 #define _ASTERISK_OSP_H
    00025
    00026 #include "asterisk/channel.h"
    00027 #include <netinet/in.h>
    00028 #include <time.h>
    00029
    00030 struct ast_osp_result {
    00031    int handle;
    00032    int numresults;
    00033    char tech[20];
    00034    char dest[256];
    00035    char token[4096];
    00036 };
    00037
    00038 /* Note: Channel will be auto-serviced if specified.  Returns -1 on hangup,
    00039    0 if nothing found, or 1 if something is found */
    00040 int ast_osp_lookup(struct ast_channel *chan, char *provider, char *extension, char *callerid, struct ast_osp_result *result);
    00041
    00042 int ast_osp_next(struct ast_osp_result *result, int cause);
    00043
    00044 int ast_osp_terminate(int handle, int cause, time_t start, time_t duration);
    00045
    00046 int ast_osp_validate(char *provider, char *token, int *handle, unsigned int *timeout, char *callerid, struct in_addr addr, char *extension);
    00047
    00048 #endif /* _ASTERISK_OSP_H */