#include "asterisk.h"
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/image.h"
#include "asterisk/callerid.h"
Go to the source code of this file.
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | load_module (void) |
static int | setcallerid_pres_exec (struct ast_channel *chan, void *data) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Set CallerID Presentation Application" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "a9c98e5d177805051735cb5b0b16b0a0" , .load = load_module, .unload = unload_module, } |
static char * | app2 = "SetCallerPres" |
static struct ast_module_info * | ast_module_info = &__mod_info |
static char * | descrip2 |
static char * | synopsis2 = "Set CallerID Presentation" |
Definition in file app_setcallerid.c.
static void __reg_module | ( | void | ) | [static] |
Definition at line 97 of file app_setcallerid.c.
static void __unreg_module | ( | void | ) | [static] |
Definition at line 97 of file app_setcallerid.c.
static int load_module | ( | void | ) | [static] |
Definition at line 92 of file app_setcallerid.c.
References ast_register_application, and setcallerid_pres_exec().
00093 { 00094 return ast_register_application(app2, setcallerid_pres_exec, synopsis2, descrip2); 00095 }
static int setcallerid_pres_exec | ( | struct ast_channel * | chan, | |
void * | data | |||
) | [static] |
Definition at line 62 of file app_setcallerid.c.
References ast_log(), ast_parse_caller_presentation(), chan, ast_channel::cid, ast_callerid::cid_pres, and LOG_WARNING.
Referenced by load_module().
00063 { 00064 int pres = -1; 00065 static int deprecated = 0; 00066 00067 if (!deprecated) { 00068 deprecated = 1; 00069 ast_log(LOG_WARNING, "SetCallerPres is deprecated. Please use Set(CALLERPRES()=%s) instead.\n", (char *)data); 00070 } 00071 00072 /* For interface consistency, permit the argument to be specified as a number */ 00073 if (sscanf(data, "%30d", &pres) != 1 || pres < 0 || pres > 255 || (pres & 0x9c)) { 00074 pres = ast_parse_caller_presentation(data); 00075 } 00076 00077 if (pres < 0) { 00078 ast_log(LOG_WARNING, "'%s' is not a valid presentation (see 'show application SetCallerPres')\n", 00079 (char *) data); 00080 return 0; 00081 } 00082 00083 chan->cid.cid_pres = pres; 00084 return 0; 00085 }
static int unload_module | ( | void | ) | [static] |
Definition at line 87 of file app_setcallerid.c.
References ast_unregister_application().
00088 { 00089 return ast_unregister_application(app2); 00090 }
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Set CallerID Presentation Application" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "a9c98e5d177805051735cb5b0b16b0a0" , .load = load_module, .unload = unload_module, } [static] |
Definition at line 97 of file app_setcallerid.c.
char* app2 = "SetCallerPres" [static] |
Definition at line 41 of file app_setcallerid.c.
struct ast_module_info* ast_module_info = &__mod_info [static] |
Definition at line 97 of file app_setcallerid.c.
char* descrip2 [static] |
Definition at line 46 of file app_setcallerid.c.
char* synopsis2 = "Set CallerID Presentation" [static] |
Definition at line 43 of file app_setcallerid.c.