[Home]

Summary:ASTERISK-15480: [patch] DISA doesn't honor caller ID on the channel
Reporter:jstapleton (jstapleton)Labels:
Date Opened:2010-01-20 15:42:30.000-0600Date Closed:2010-08-03 17:18:49
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_disa
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20100414__issue16661.diff.txt
( 1) 20100415__issue16661__1.6.2.diff.txt
Description:DISA doesn't honor caller ID on the channel that may have been changed with the caller ID dialplan function.  Instead, it defaults to using the caller ID of the original incoming call.

****** ADDITIONAL INFORMATION ******

This only appears to happen on DAHDI calls.

I have a DID that comes into an extension in a conext which changes the caller ID before calling the DISA application.  The DISA application ignores the changed caller ID and uses the original caller ID value for its outbound call.
Comments:By: Jared Smith (jsmith) 2010-01-20 15:52:39.000-0600

For what it's worth, I helped jstapleton diagnose this issue, so I'm confident this is in fact a bug with the DISA dialplan application.

By: Russell Bryant (russell) 2010-02-02 11:39:22.000-0600

Can we get some sample configuration and console output of the test to help replicate the problem?

By: Tilghman Lesher (tilghman) 2010-02-26 01:04:45.000-0600

Ping.  We really need some steps to reproduce.

By: jstapleton (jstapleton) 2010-03-02 22:39:45.000-0600

This doesn't work:
exten=>XXXX,1,Set(CALLERID(num)=1601)
exten=>XXXX,n,DISA(no-password,features)

This does:
exten=>XXXX,1,Set(CALLERID(num)=1601)
exten=>XXXX,n,DISA(no-password,features,${CALLERID(all)})

By: Tilghman Lesher (tilghman) 2010-03-31 15:27:13

I am unable to reproduce that:

   -- Executing [8172@digium:1] Set("SIP/103-00000000", "CALLERID(num)=1601") in new stack
   -- Executing [8172@digium:2] DISA("SIP/103-00000000", "no-password,features") in new stack
   -- Executing [1@features:1] NoOp("SIP/103-00000000", "CallerID num=1601") in new stack
   -- Auto fallthrough, channel 'SIP/103-00000000' status is 'UNKNOWN'

*CLI> dialplan show features
[ Context 'features' created by 'pbx_config' ]
 '_X' =>           1. NoOp(CallerID num=${CALLERID(num)})        [pbx_config]

-= 1 extension (1 priority) in 1 context. =-
*CLI> dialplan show 8172@digium
[ Context 'digium' created by 'pbx_config' ]
 '8172' =>         1. Set(CALLERID(num)=1601)                    [pbx_config]
                   2. DISA(no-password,features)                 [pbx_config]

-= 1 extension (2 priorities) in 1 context. =-

By: Jared Smith (jsmith) 2010-04-07 19:17:15

Jamie and I took a fresh look at this in his lab this evening.  It's definitely not working, and let me see if I can explain what we're seeing.

First of all, Jamie is calling into a DID (via DAHDI on a PRI) from 8045551212, which gets routed to extension 6101 in his [disa] context.  From there, we're setting the Caller ID number to 6101 just to prove a point, and then calling the DISA application.  Jamie then dials 94126101, and that gets routed to the [features] context, where we print out the CallerID information before calling the number via another DAHDI channel.


Here's the flow when we call DISA without the third parameter:

   -- Executing [6101@disa:1] Set("DAHDI/23-1", "CALLERID(num)=6101") in new stack
   -- Executing [6101@disa:2] Verbose("DAHDI/23-1", "2,Caller ID information is ["" <6101>]") in new stack
 == Caller ID information is ["" <6101>]
   -- Executing [6101@disa:3] DISA("DAHDI/23-1", "no-password,features") in new stack
[Apr  7 19:47:31] WARNING[13186]: chan_dahdi.c:2683 dahdi_enable_ec: Unable to enable echo cancellation on channel 23 (No such device)
   -- Executing [94126101@features:1] NoOp("DAHDI/23-1", "CallerID is: "STAPLETON JAMIE" <8045551212>") in new stack
   -- Executing [94126101@features:2] Dial("DAHDI/23-1", "DAHDI/g1/4126101") in new stack

As you can see, the outbound caller ID was the original CallerID number (8045551212), not the new caller id (6101) that was set on the channel before calling DISA.  The DISA application is obviously *not* looking at the CallerID number on the channel set via the CALLERID dialplan function.

By: Tilghman Lesher (tilghman) 2010-04-13 16:29:18

Does the problem disappear if you set "usecallerid=no" in chan_dahdi.conf for the associated channel?  I'm thinking this is simply a case of the callerid number appearing after the initial setup.  Another workaround would be to make the initial step "Wait(2)" to give the callerid time to completely propagate.

By: Jared Smith (jsmith) 2010-04-13 18:30:23

No, that's not the case.  As you should be able to see from the logs above, the CallerID information on the call was there.  (The wait happens before the call ever enters the dialplan.)  I'll try to get Jamie to test without CallerID enabled or with a wait(2) before calling DISA, but I really don't think that's going to fix the problem yet.

By: jstapleton (jstapleton) 2010-04-14 09:04:57

Wait(2) made no difference at all.

By: Tilghman Lesher (tilghman) 2010-04-14 09:06:14

jsmith:  the issue with PRI circuits is that the callerid could appear on the circuit multiple times (first time, number only; second time, name and number).

By: Tilghman Lesher (tilghman) 2010-04-14 10:18:22

Okay, so I've created a patch which should prevent the PRI circuit from setting callerid after it's been set by the user (as it turns out, the TNS value is rather unused in 1.4).  This patch is 1.4 only, so don't expect it to work on other versions.

By: Jared Smith (jsmith) 2010-04-14 11:33:08

I'm not sure a 1.4 version of the patch helps much, as Jamie is now running the latest 1.6.2 release.

By: Tilghman Lesher (tilghman) 2010-04-15 15:46:41

1.6.2 version of the patch uploaded.

By: Tilghman Lesher (tilghman) 2010-05-18 14:15:50

It has now been a month since the last patch was uploaded.  Is there any further feedback on this?

By: Tilghman Lesher (tilghman) 2010-05-24 13:11:04

No response from reporter.

By: jstapleton (jstapleton) 2010-05-27 23:33:56

I have tested.  Looks to be working fine.  Sorry for the delay.

By: Digium Subversion (svnbot) 2010-08-03 15:49:09

Repository: asterisk
Revision: 280811

U   branches/1.4/channels/chan_dahdi.c
U   branches/1.4/funcs/func_callerid.c

------------------------------------------------------------------------
r280811 | tilghman | 2010-08-03 15:49:09 -0500 (Tue, 03 Aug 2010) | 9 lines

Prevent DAHDI channels from overriding the callerid, once it's been set by the user.

(closes issue ASTERISK-15480)
Reported by: jstapleton
Patches:
      20100414__issue16661.diff.txt uploaded by tilghman (license 14)
      20100415__issue16661__1.6.2.diff.txt uploaded by tilghman (license 14)
Tested by: jstapleton

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280811

By: Digium Subversion (svnbot) 2010-08-03 15:52:19

Repository: asterisk
Revision: 280812

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_dahdi.c
U   branches/1.6.2/funcs/func_callerid.c

------------------------------------------------------------------------
r280812 | tilghman | 2010-08-03 15:52:18 -0500 (Tue, 03 Aug 2010) | 16 lines

Merged revisions 280811 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r280811 | tilghman | 2010-08-03 15:49:10 -0500 (Tue, 03 Aug 2010) | 9 lines
 
 Prevent DAHDI channels from overriding the callerid, once it's been set by the user.
 
 (closes issue ASTERISK-15480)
  Reported by: jstapleton
  Patches:
        20100414__issue16661.diff.txt uploaded by tilghman (license 14)
        20100415__issue16661__1.6.2.diff.txt uploaded by tilghman (license 14)
  Tested by: jstapleton
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280812

By: Digium Subversion (svnbot) 2010-08-03 17:18:48

Repository: asterisk
Revision: 280878

_U  branches/1.8/

------------------------------------------------------------------------
r280878 | tilghman | 2010-08-03 17:18:47 -0500 (Tue, 03 Aug 2010) | 22 lines

Blocked revisions 280812 via svnmerge

................
 r280812 | tilghman | 2010-08-03 15:52:20 -0500 (Tue, 03 Aug 2010) | 16 lines
 
 Merged revisions 280811 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r280811 | tilghman | 2010-08-03 15:49:10 -0500 (Tue, 03 Aug 2010) | 9 lines
   
   Prevent DAHDI channels from overriding the callerid, once it's been set by the user.
   
   (closes issue ASTERISK-15480)
    Reported by: jstapleton
    Patches:
          20100414__issue16661.diff.txt uploaded by tilghman (license 14)
          20100415__issue16661__1.6.2.diff.txt uploaded by tilghman (license 14)
    Tested by: jstapleton
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280878