MGCP updates to try to improve CID delivery

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2003-03-24 21:46:06 +00:00
parent eb180d0bb5
commit 54d3735b7b

View File

@@ -267,7 +267,7 @@ static int mgcp_call(struct ast_channel *ast, char *dest, int timeout)
res = 0; res = 0;
p->outgoing = 1; p->outgoing = 1;
if (p->type == TYPE_LINE) { if (p->type == TYPE_LINE) {
transmit_notify_request_with_callerid(p, "rg", 0, ast->callerid); transmit_notify_request_with_callerid(p, "L/rg", 0, ast->callerid);
ast_setstate(ast, AST_STATE_RINGING); ast_setstate(ast, AST_STATE_RINGING);
ast_queue_control(ast, AST_CONTROL_RINGING, 0); ast_queue_control(ast, AST_CONTROL_RINGING, 0);
} else { } else {
@@ -1243,13 +1243,13 @@ static int transmit_notify_request_with_callerid(struct mgcp_endpoint *p, char *
n = "O"; n = "O";
if (!l) if (!l)
l = ""; l = "";
snprintf(tone2, sizeof(tone2), "%s, ci(%02d/%02d/%02d/%02d,%s,%s)", tone, snprintf(tone2, sizeof(tone2), "%s,L/ci(%02d/%02d/%02d/%02d,%s,%s)", tone,
tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, l, n); tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, l, n);
strncpy(p->curtone, tone, sizeof(p->curtone) - 1); strncpy(p->curtone, tone, sizeof(p->curtone) - 1);
reqprep(&resp, p, "RQNT"); reqprep(&resp, p, "RQNT");
add_header(&resp, "X", p->txident); add_header(&resp, "X", p->txident);
if (offhook) if (offhook)
add_header(&resp, "R", "hu(N), hf(N), D/[0-9#*](N)"); add_header(&resp, "R", "hu(N),hf(N),D/[0-9#*](N)");
else else
add_header(&resp, "R", "hd(N)"); add_header(&resp, "R", "hd(N)");
add_header(&resp, "S", tone2); add_header(&resp, "S", tone2);