mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 06:53:41 +00:00
Issue #8536 - Caller ID not set in CDR for jingle
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@65841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -894,6 +894,7 @@ static struct ast_channel *gtalk_new(struct gtalk *client, struct gtalk_pvt *i,
|
|||||||
int fmt;
|
int fmt;
|
||||||
int what;
|
int what;
|
||||||
const char *n2;
|
const char *n2;
|
||||||
|
char *data = NULL, *cid = NULL;
|
||||||
|
|
||||||
if (title)
|
if (title)
|
||||||
n2 = title;
|
n2 = title;
|
||||||
@@ -954,9 +955,21 @@ static struct ast_channel *gtalk_new(struct gtalk *client, struct gtalk_pvt *i,
|
|||||||
ast_copy_string(tmp->exten, i->exten, sizeof(tmp->exten));
|
ast_copy_string(tmp->exten, i->exten, sizeof(tmp->exten));
|
||||||
/* Don't use ast_set_callerid() here because it will
|
/* Don't use ast_set_callerid() here because it will
|
||||||
* generate a needless NewCallerID event */
|
* generate a needless NewCallerID event */
|
||||||
tmp->cid.cid_num = ast_strdup(i->cid_num);
|
if (!strcasecmp(client->name, "guest")) {
|
||||||
tmp->cid.cid_ani = ast_strdup(i->cid_num);
|
if (strchr(i->them, '/')) {
|
||||||
tmp->cid.cid_name = ast_strdup(i->cid_name);
|
char *aux;
|
||||||
|
data = ast_strdupa((char *)i->them);
|
||||||
|
aux = data;
|
||||||
|
cid = strsep(&aux, "/");
|
||||||
|
} else
|
||||||
|
cid = i->them;
|
||||||
|
} else {
|
||||||
|
cid = client->user;
|
||||||
|
}
|
||||||
|
cid = strsep(&cid, "@");
|
||||||
|
tmp->cid.cid_num = ast_strdup(cid);
|
||||||
|
tmp->cid.cid_ani = ast_strdup(cid);
|
||||||
|
tmp->cid.cid_name = ast_strdup(i->them);
|
||||||
if (!ast_strlen_zero(i->exten) && strcmp(i->exten, "s"))
|
if (!ast_strlen_zero(i->exten) && strcmp(i->exten, "s"))
|
||||||
tmp->cid.cid_dnid = ast_strdup(i->exten);
|
tmp->cid.cid_dnid = ast_strdup(i->exten);
|
||||||
tmp->priority = 1;
|
tmp->priority = 1;
|
||||||
|
Reference in New Issue
Block a user