aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_unistim.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-26 15:28:53 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-26 15:28:53 +0000
commitac3b35dcc792329046ec2532ff204962c895ee98 (patch)
treea28e9113cf1daf97e45a8fc6d41a52c76ac69836 /channels/chan_unistim.c
parentd13a40e1cfe5f54bfb4d1aacd2c63e7859e010bc (diff)
Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events. This was inspired after facing many problems trying to represent what is possible to happen to a call in Asterisk using CDR records. For more information on CEL, see the built in HTML or PDF documentation generated from the files in doc/tex/. Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard work developing this code. Also, thanks to Matt Nicholson (mnicholson) and Sean Bright (seanbright) for their assistance in the final push to get this code ready for Asterisk trunk. Review: https://reviewboard.asterisk.org/r/239/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203638 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_unistim.c')
-rw-r--r--channels/chan_unistim.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index 27e8e0cb2..bb90301f9 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -670,13 +670,13 @@ static const char tdesc[] = "UNISTIM Channel Driver";
static const char channel_type[] = "USTM";
/*! Protos */
-static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state);
+static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state, const char *linkedid);
static int load_module(void);
static int reload(void);
static int unload_module(void);
static int reload_config(void);
static void show_main_page(struct unistimsession *pte);
-static struct ast_channel *unistim_request(const char *type, int format,
+static struct ast_channel *unistim_request(const char *type, int format, const struct ast_channel *requestor,
void *data, int *cause);
static int unistim_call(struct ast_channel *ast, char *dest, int timeout);
static int unistim_hangup(struct ast_channel *ast);
@@ -2363,7 +2363,7 @@ static void HandleCallOutgoing(struct unistimsession *s)
return;
}
if (!sub->owner) { /* A call is already in progress ? */
- c = unistim_new(sub, AST_STATE_DOWN); /* No, starting a new one */
+ c = unistim_new(sub, AST_STATE_DOWN, NULL); /* No, starting a new one */
if (c) {
/* Need to start RTP before calling ast_pbx_run */
if (!sub->rtp)
@@ -2411,7 +2411,7 @@ static void HandleCallOutgoing(struct unistimsession *s)
}
send_tone(s, 0, 0);
/* Make new channel */
- c = unistim_new(p->subs[SUB_THREEWAY], AST_STATE_DOWN);
+ c = unistim_new(p->subs[SUB_THREEWAY], AST_STATE_DOWN, NULL);
if (!c) {
ast_log(LOG_WARNING, "Cannot allocate new structure on channel %p\n", p);
return;
@@ -4422,7 +4422,7 @@ static int unistim_send_mwi_to_peer(struct unistimsession *s, unsigned int tick)
/*--- unistim_new: Initiate a call in the UNISTIM channel */
/* called from unistim_request (calls from the pbx ) */
-static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state)
+static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state, const char *linkedid)
{
struct ast_channel *tmp;
struct unistim_line *l;
@@ -4438,7 +4438,7 @@ static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state
}
l = sub->parent;
tmp = ast_channel_alloc(1, state, l->cid_num, NULL, l->accountcode, l->exten,
- l->context, l->amaflags, "%s@%s-%d", l->name, l->parent->name, sub->subtype);
+ l->context, linkedid, l->amaflags, "%s@%s-%d", l->name, l->parent->name, sub->subtype);
if (unistimdebug)
ast_verb(0, "unistim_new sub=%d (%p) chan=%p\n", sub->subtype, sub, tmp);
if (!tmp) {
@@ -4617,7 +4617,7 @@ static int restart_monitor(void)
/*--- unistim_request: PBX interface function ---*/
/* UNISTIM calls initiated by the PBX arrive here */
-static struct ast_channel *unistim_request(const char *type, int format, void *data,
+static struct ast_channel *unistim_request(const char *type, int format, const struct ast_channel *requestor, void *data,
int *cause)
{
int oldformat;
@@ -4660,7 +4660,7 @@ static struct ast_channel *unistim_request(const char *type, int format, void *d
return NULL;
}
sub->parent->capability = format;
- tmpc = unistim_new(sub, AST_STATE_DOWN);
+ tmpc = unistim_new(sub, AST_STATE_DOWN, requestor ? requestor->linkedid : NULL);
if (!tmpc)
ast_log(LOG_WARNING, "Unable to make channel for '%s'\n", tmp);
if (unistimdebug)