Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#include "asterisk/config.h"
Go to the source code of this file.
Data Structures | |
struct | ast_sip_api_tech |
Macros | |
#define | AST_SIP_API_VERSION 1 |
Functions | |
int | ast_sip_api_provider_register (const struct ast_sip_api_tech *provider) |
Register a SIP API provider. More... | |
void | ast_sip_api_provider_unregister (void) |
Unregister a SIP API provider. More... | |
int | ast_sipinfo_send (struct ast_channel *chan, struct ast_variable *headers, const char *content_type, const char *content, const char *useragent_filter) |
Send a customized SIP INFO request. More... | |
int ast_sip_api_provider_register | ( | const struct ast_sip_api_tech * | provider | ) |
Register a SIP API provider.
This will fail if a provider has already registered or if the provider is using an incorrect version.
provider | The provider to register |
0 | Success |
-1 | Failure |
Definition at line 39 of file sip_api.c.
References api_provider, ast_log, AST_SIP_API_VERSION, LOG_WARNING, prometheus_metrics_provider::name, ast_sip_api_tech::name, and provider.
void ast_sip_api_provider_unregister | ( | void | ) |
Unregister a SIP API provider.
Definition at line 57 of file sip_api.c.
References api_provider, and NULL.
int ast_sipinfo_send | ( | struct ast_channel * | chan, |
struct ast_variable * | headers, | ||
const char * | content_type, | ||
const char * | content, | ||
const char * | useragent_filter | ||
) |
Send a customized SIP INFO request.
chan | Channel |
headers | The headers to add to the INFO request |
content_type | The content type header to add |
content | The body of the INFO request |
useragent_filter | If non-NULL, only send the INFO if the recipient's User-Agent contains useragent_filter as a substring |
0 | Success |
non-zero | Failure |
Definition at line 25 of file sip_api.c.
References api_provider, ast_log, LOG_WARNING, and ast_sip_api_tech::sipinfo_send.