aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-03 04:19:59 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-03 04:19:59 +0000
commitcfe24c16a11115f5880b3bb6088e8a622a785574 (patch)
treeebfab599cc9bd5e02129e2a5bd1842ee528a7106 /channels
parent54c7235cd7328bb4661dad734e6f698f4dba6b97 (diff)
Major PBX revamps (including labels, update examples)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3886 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_agent.c2
-rwxr-xr-xchannels/chan_alsa.c2
-rwxr-xr-xchannels/chan_h323.c2
-rwxr-xr-xchannels/chan_iax2.c16
-rwxr-xr-xchannels/chan_local.c2
-rwxr-xr-xchannels/chan_mgcp.c2
-rwxr-xr-xchannels/chan_modem.c2
-rwxr-xr-xchannels/chan_nbs.c2
-rwxr-xr-xchannels/chan_oss.c2
-rwxr-xr-xchannels/chan_phone.c2
-rwxr-xr-xchannels/chan_sip.c4
-rwxr-xr-xchannels/chan_skinny.c2
-rwxr-xr-xchannels/chan_vpb.c2
-rwxr-xr-xchannels/chan_zap.c9
14 files changed, 22 insertions, 29 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index f0474806b..97e5f1534 100755
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -1001,7 +1001,7 @@ static int check_beep(struct agent_pvt *newlyavailable, int needlock)
return res;
}
-static struct ast_channel *agent_request(char *type, int format, void *data)
+static struct ast_channel *agent_request(const char *type, int format, void *data)
{
struct agent_pvt *p;
struct ast_channel *chan = NULL;
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c
index acf80b857..09074ec87 100755
--- a/channels/chan_alsa.c
+++ b/channels/chan_alsa.c
@@ -753,7 +753,7 @@ static struct ast_channel *alsa_new(struct chan_alsa_pvt *p, int state)
return tmp;
}
-static struct ast_channel *alsa_request(char *type, int format, void *data)
+static struct ast_channel *alsa_request(const char *type, int format, void *data)
{
int oldformat = format;
struct ast_channel *tmp=NULL;
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index c0187594e..85877fccb 100755
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -906,7 +906,7 @@ static int create_addr(struct oh323_pvt *r, char *opeer)
}
}
-static struct ast_channel *oh323_request(char *type, int format, void *data)
+static struct ast_channel *oh323_request(const char *type, int format, void *data)
{
int oldformat;
struct oh323_pvt *p;
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 827f587ec..dfa2ec3b5 100755
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -4341,7 +4341,7 @@ static void register_peer_exten(struct iax2_peer *peer, int onoff)
stringp = multi;
while((ext = strsep(&stringp, "&"))) {
if (onoff)
- ast_add_extension(regcontext, 1, ext, 1, NULL, "Noop", strdup(peer->name), free, type);
+ ast_add_extension(regcontext, 1, ext, 1, NULL, NULL, "Noop", strdup(peer->name), free, type);
else
ast_context_remove_extension(regcontext, ext, 1, NULL);
}
@@ -6205,7 +6205,7 @@ static void free_context(struct iax2_context *con)
}
}
-static struct ast_channel *iax2_request(char *type, int format, void *data)
+static struct ast_channel *iax2_request(const char *type, int format, void *data)
{
int callno;
int res;
@@ -6993,7 +6993,7 @@ int reload(void)
return reload_config();
}
-static int cache_get_callno_locked(char *data)
+static int cache_get_callno_locked(const char *data)
{
struct sockaddr_in sin;
int x;
@@ -7075,7 +7075,7 @@ static int cache_get_callno_locked(char *data)
return callno;
}
-static struct iax2_dpcache *find_cache(struct ast_channel *chan, char *data, char *context, char *exten, int priority)
+static struct iax2_dpcache *find_cache(struct ast_channel *chan, const char *data, const char *context, const char *exten, int priority)
{
struct iax2_dpcache *dp, *prev = NULL, *next;
struct timeval tv;
@@ -7225,7 +7225,7 @@ static struct iax2_dpcache *find_cache(struct ast_channel *chan, char *data, cha
return dp;
}
-static int iax2_exists(struct ast_channel *chan, char *context, char *exten, int priority, char *callerid, char *data)
+static int iax2_exists(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
{
struct iax2_dpcache *dp;
int res = 0;
@@ -7247,7 +7247,7 @@ static int iax2_exists(struct ast_channel *chan, char *context, char *exten, int
return res;
}
-static int iax2_canmatch(struct ast_channel *chan, char *context, char *exten, int priority, char *callerid, char *data)
+static int iax2_canmatch(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
{
int res = 0;
struct iax2_dpcache *dp;
@@ -7269,7 +7269,7 @@ static int iax2_canmatch(struct ast_channel *chan, char *context, char *exten, i
return res;
}
-static int iax2_matchmore(struct ast_channel *chan, char *context, char *exten, int priority, char *callerid, char *data)
+static int iax2_matchmore(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
{
int res = 0;
struct iax2_dpcache *dp;
@@ -7291,7 +7291,7 @@ static int iax2_matchmore(struct ast_channel *chan, char *context, char *exten,
return res;
}
-static int iax2_exec(struct ast_channel *chan, char *context, char *exten, int priority, char *callerid, int newstack, char *data)
+static int iax2_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, int newstack, const char *data)
{
char odata[256];
char req[256];
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 4c50720dc..9d004b5ed 100755
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -462,7 +462,7 @@ static struct ast_channel *local_new(struct local_pvt *p, int state)
}
-static struct ast_channel *local_request(char *type, int format, void *data)
+static struct ast_channel *local_request(const char *type, int format, void *data)
{
struct local_pvt *p;
struct ast_channel *chan = NULL;
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 308d7e6c1..309283b77 100755
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -3345,7 +3345,7 @@ static int restart_monitor(void)
return 0;
}
-static struct ast_channel *mgcp_request(char *type, int format, void *data)
+static struct ast_channel *mgcp_request(const char *type, int format, void *data)
{
int oldformat;
struct mgcp_subchannel *sub;
diff --git a/channels/chan_modem.c b/channels/chan_modem.c
index 063725504..677edd4fb 100755
--- a/channels/chan_modem.c
+++ b/channels/chan_modem.c
@@ -760,7 +760,7 @@ static struct ast_modem_pvt *mkif(char *iface)
return tmp;
}
-static struct ast_channel *modem_request(char *type, int format, void *data)
+static struct ast_channel *modem_request(const char *type, int format, void *data)
{
int oldformat;
struct ast_modem_pvt *p;
diff --git a/channels/chan_nbs.c b/channels/chan_nbs.c
index a188c1262..6f67b3ada 100755
--- a/channels/chan_nbs.c
+++ b/channels/chan_nbs.c
@@ -232,7 +232,7 @@ static struct ast_channel *nbs_new(struct nbs_pvt *i, int state)
}
-static struct ast_channel *nbs_request(char *type, int format, void *data)
+static struct ast_channel *nbs_request(const char *type, int format, void *data)
{
int oldformat;
struct nbs_pvt *p;
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 350fd630d..61dd4ce89 100755
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -745,7 +745,7 @@ static struct ast_channel *oss_new(struct chan_oss_pvt *p, int state)
return tmp;
}
-static struct ast_channel *oss_request(char *type, int format, void *data)
+static struct ast_channel *oss_request(const char *type, int format, void *data)
{
int oldformat = format;
struct ast_channel *tmp;
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index dc985c170..b91b3657f 100755
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -1023,7 +1023,7 @@ static struct phone_pvt *mkif(char *iface, int mode, int txgain, int rxgain)
return tmp;
}
-static struct ast_channel *phone_request(char *type, int format, void *data)
+static struct ast_channel *phone_request(const char *type, int format, void *data)
{
int oldformat;
struct phone_pvt *p;
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 6c95951f6..8b8f6691a 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4293,7 +4293,7 @@ static void register_peer_exten(struct sip_peer *peer, int onoff)
stringp = multi;
while((ext = strsep(&stringp, "&"))) {
if (onoff)
- ast_add_extension(regcontext, 1, ext, 1, NULL, "Noop", strdup(peer->name), free, type);
+ ast_add_extension(regcontext, 1, ext, 1, NULL, NULL, "Noop", strdup(peer->name), free, type);
else
ast_context_remove_extension(regcontext, ext, 1, NULL);
}
@@ -7966,7 +7966,7 @@ static int sip_devicestate(void *data)
/*--- sip_request: PBX interface function -build SIP pvt structure ---*/
/* SIP calls initiated by the PBX arrive here */
-static struct ast_channel *sip_request(char *type, int format, void *data)
+static struct ast_channel *sip_request(const char *type, int format, void *data)
{
int oldformat;
struct sip_pvt *p;
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 56abeb14e..727d427e0 100755
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -2489,7 +2489,7 @@ static int restart_monitor(void)
return 0;
}
-static struct ast_channel *skinny_request(char *type, int format, void *data)
+static struct ast_channel *skinny_request(const char *type, int format, void *data)
{
int oldformat;
struct skinny_subchannel *sub;
diff --git a/channels/chan_vpb.c b/channels/chan_vpb.c
index 06808e17a..b4737bfe7 100755
--- a/channels/chan_vpb.c
+++ b/channels/chan_vpb.c
@@ -2032,7 +2032,7 @@ static struct ast_channel *vpb_new(struct vpb_pvt *me, int state, char *context)
return tmp;
}
-static struct ast_channel *vpb_request(char *type, int format, void *data)
+static struct ast_channel *vpb_request(const char *type, int format, void *data)
{
int oldformat;
struct vpb_pvt *p;
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index cc0e3eace..eece03e76 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -114,7 +114,6 @@ static char *tdesc = "Zapata Telephony Driver"
;
static char *type = "Zap";
-static char *typecompat = "Tor"; /* Retain compatibility with chan_tor */
static char *config = "zapata.conf";
#define SIG_EM ZT_SIG_EM
@@ -6730,7 +6729,7 @@ static int pri_find_empty_chan(struct zt_pri *pri, int backwards)
}
#endif
-static struct ast_channel *zt_request(char *type, int format, void *data)
+static struct ast_channel *zt_request(const char *type, int format, void *data)
{
int oldformat;
int groupmatch = 0;
@@ -8882,7 +8881,6 @@ static int __unload_module(void)
ast_manager_unregister( "ZapDNDon" );
ast_manager_unregister("ZapShowChannels");
ast_unregister_application(app_callingpres);
- ast_channel_unregister(typecompat);
ast_channel_unregister(type);
if (!ast_mutex_lock(&iflock)) {
/* Hangup all interfaces if they have an owner */
@@ -9686,11 +9684,6 @@ int load_module(void)
__unload_module();
return -1;
}
- if (ast_channel_register(typecompat, tdesc, AST_FORMAT_SLINEAR | AST_FORMAT_ULAW, zt_request)) {
- ast_log(LOG_ERROR, "Unable to register channel class %s\n", typecompat);
- __unload_module();
- return -1;
- }
#ifdef ZAPATA_PRI
ast_cli_register(&pri_debug);
ast_cli_register(&pri_no_debug);