[asterisk-bugs] [Asterisk 0017138]: [patch] CallerID not properly set when using Originate and AGI
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Aug 9 15:46:53 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=17138
======================================================================
Reported By: kobaz
Assigned To: jpeeler
======================================================================
Project: Asterisk
Issue ID: 17138
Category: Channels/chan_iax2
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Target Version: 1.6.2.12
Asterisk Version: SVN
JIRA: SWP-1534
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2010-04-05 16:03 CDT
Last Modified: 2010-08-09 15:46 CDT
======================================================================
Summary: [patch] CallerID not properly set when using
Originate and AGI
Description:
Dialplan:
context Dialer_DialPhone {
s => {
if ("${PhoneAutoAnswer}" == "1") {
SIPAddHeader(Call-Info: answer-after=0');
SIPAddHeader(alert-info: alert-autoanswer');
}
Set(CALLERID(name)=${DstCallerIdName});
Set(CALLERID(num)=${DstCallerIdNum});
Dial(${PhoneDevice},10);
Hangup();
}
}
context Dialer_DialNumber {
s => {
Set(CALLERID(name)=${SrcCallerIdName});
Set(CALLERID(num)=${SrcCallerIdNum});
// Dial(IAX2/out-tipton-local/${DstNumber},120,r); // this works
goto ${PhoneClassOfService}, ${DstNumber}, 1; // this doesn't
Hangup();
}
}
You should be able to override the callerid even if the call will be sent
to an agi script.
Note that agi_callerid and agi_calleridname are actually correct as set in
the dialplan.. but when the agi executes the Dial... callerid gets sent out
as "s <s>" as shown in the iax debug.
Note that callerid is not changed by the agi script.
If you replace the goto, with the Dial() straight from dialplan, CALLING
NUMBER and CALLING NAME will be correct in the iax call.
======================================================================
----------------------------------------------------------------------
(0125737) svnbot (reporter) - 2010-08-09 15:46
https://issues.asterisk.org/view.php?id=17138#c125737
----------------------------------------------------------------------
Repository: asterisk
Revision: 281431
_U trunk/
U trunk/channels/chan_local.c
------------------------------------------------------------------------
r281431 | jpeeler | 2010-08-09 15:46:52 -0500 (Mon, 09 Aug 2010) | 34
lines
Merged revisions 281429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r281429 | jpeeler | 2010-08-09 15:43:54 -0500 (Mon, 09 Aug 2010) | 27
lines
Merged revisions 281391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r281391 | jpeeler | 2010-08-09 15:07:29 -0500 (Mon, 09 Aug 2010) | 20
lines
Merged revisions 281390 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r281390 | jpeeler | 2010-08-09 15:04:30 -0500 (Mon, 09 Aug 2010) |
13 lines
Prevent loss of Caller ID information set on local channel after
masquerade.
Caller ID set on the channel before a masquerade occurs when using a
local
channel would cause the information to be lost. The problem was that
the
information was set on a channel destined to be hung up. The
somewhat confusing
fix is to detect if any Caller ID has been set on the channel and if
so
preswap the Caller ID data so that basically the masquerade puts the
data back.
(closes issue https://issues.asterisk.org/view.php?id=17138)
Reported by: kobaz
Review: https://reviewboard.asterisk.org/r/847/
........
................
................
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=281431
Issue History
Date Modified Username Field Change
======================================================================
2010-08-09 15:46 svnbot Checkin
2010-08-09 15:46 svnbot Note Added: 0125737
======================================================================
More information about the asterisk-bugs
mailing list