[Home]

Summary:ASTERISK-04120: [patch] DNID is empty on incoming "immediate" calls
Reporter:Thomas (thomas andrews)Labels:
Date Opened:2005-05-09 10:23:34Date Closed:2011-06-07 14:10:34
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 4220.stable.patch.txt
( 1) dnid-immediate-incoming.patch
Description:The ${DNID} variable is always empty on "immediate" incoming ISDN calls. I have attached the patch (I'm using CVS 05/03/05)

I am assuming that ${DNID} is not reserved for outgoing calls only. The patch simply copies e->ring.callednum into pri->pvts[chanpos]->dnid. This is done elsewhere in the code, but not for "immediate" calls.

I have only been able to test this with a BRI (Using HFC).

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

--- asterisk-orig/channels/chan_zap.c   2005-05-09 16:39:28.000000000 +0200
+++ asterisk/channels/chan_zap.c    2005-05-09 16:41:06.000000000 +0200
@@ -8390,6 +8390,7 @@
                           ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of immediate=yes\n");
                       pri->pvts[chanpos]->exten[0] = 's';
                       pri->pvts[chanpos]->exten[1] = '\0';
+                       pri_make_callerid(pri, pri->pvts[chanpos]->dnid, sizeof(pri->pvts[chanpos]->dnid), e->ring.callednum, sizeof(e->ring.callednum),  e
                   } else if (ast_strlen_zero(e->ring.callednum)) {
                       /* called party number is empty */
                       if ((pri->nodetype == BRI_NETWORK_PTMP) || (pri->nodetype == BRI_NETWORK)) {
~                                                                                                                                                          
Comments:By: Michael Jerris (mikej) 2005-05-09 10:27:28

Do you have a disclaimer on file?

By: Thomas (thomas andrews) 2005-05-09 13:28:08

Disclaimer sent to markster@digium.com (and receipt acknowledged)

By: Matthew Fredrickson (mattf) 2005-05-10 18:35:23

I think this will NOT work with stock libpri (unless I am seriously mistaken).  The function pri_make_callerid is not defined anywhere within stock libpri and stock asterisk.

By: Thomas (thomas andrews) 2005-05-11 00:58:07

Correct my mistake, sorry! This patch uses code derived from Junghanns' HFC patches. Perhaps we should just close this bug report. I can either submit the patch to Junghanns, or write a patch using native code.

By: Matthew Fredrickson (mattf) 2005-05-11 09:50:45

Ok, if you find another way to do it, open up another bug.

By: Matthew Fredrickson (mattf) 2005-05-11 10:58:36

Closed, put patch in CVS

By: Michael Jerris (mikej) 2005-05-30 21:54:45

Drumkilla... a patch for you :) Disclaimer on file blah blah...

By: Russell Bryant (russell) 2005-05-30 22:33:50

fixed in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:34:03.000-0600

Repository: asterisk
Revision: 5630

U   trunk/channels/chan_zap.c

------------------------------------------------------------------------
r5630 | mattf | 2008-01-15 15:34:03 -0600 (Tue, 15 Jan 2008) | 2 lines

Set DNID for immediate calls (Bug ASTERISK-4120)

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

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

By: Digium Subversion (svnbot) 2008-01-15 15:36:26.000-0600

Repository: asterisk
Revision: 5792

U   branches/v1-0/channels/chan_zap.c

------------------------------------------------------------------------
r5792 | russell | 2008-01-15 15:36:25 -0600 (Tue, 15 Jan 2008) | 2 lines

set DNID on incoming calls (bug ASTERISK-4120)

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

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