[Home]

Summary:ASTERISK-01185: Caller ID Name is not Available via CALLERIDNAME variable...
Reporter:opsys (opsys)Labels:
Date Opened:2004-03-09 17:37:08.000-0600Date Closed:2011-06-07 14:10:03
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk.log.gz
Description:But it dows show up in the cdr record.  

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

If I do a simple line like this in extensions.conf.
exten => s,1,SetCIDName(${CALLERIDNAME})
exten => s,2,Dial(Zap/5.....)

On the console I get
-- Executing SetCIDName("Zap/23-1", "3055551212") in new stack

As you see I get a number not the Name. However in the cdr Master file I see the Name...

Comments:By: James Golovich (jamesgolovich) 2004-03-09 17:41:12.000-0600

In order to do anything with this we will need to know what your callerid started as.  Since there is just one field holding callerid and then its seperated into name and number.  Add some apps before your 2 that do:
exten => s,1,NoOp(${CALLERID})
exten => s,2,NoOp(${CALLERIDNUM})
exten => s,3,NoOp(${CALLERIDNAME})
and post the CLI results of those commands

By: opsys (opsys) 2004-03-09 18:01:36.000-0600

After more discovery, I have seen some strange things.  If I answer the call by placing a s,1,Answer. The Caller ID info DOES NOT Appear in the CDR!!


Shows up in CDR.  
Add Answer as the first priority and increase valuse by one and it does not log into CDR!!
extensions.conf:
[alex]
exten => s,1,Answer
exten => s,2,NoOp,${CALLERID}
exten => s,3,NoOp,${CALLERIDNAME}
exten => s,4,NoOp,${CALLERIDNUM}
exten => s,5,Playback(vm-goodbye)
exten => s,6,Hangup

output from CLI>

   -- Executing Answer("Zap/23-1", "") in new stack
   -- Accepting call from '3052164945' to '6674422' on channel 23, span 1
   -- Executing NoOp("Zap/23-1", "3052164945") in new stack
   -- Executing NoOp("Zap/23-1", "3052164945") in new stack
   -- Executing NoOp("Zap/23-1", "3052164945") in new stack
   -- Executing Playback("Zap/23-1", "vm-goodbye") in new stack
   -- Playing 'vm-goodbye' (language 'en')
   -- Executing Hangup("Zap/23-1", "") in new stack
 == Spawn extension (alex, s, 6) exited non-zero on 'Zap/23-1'
   -- Hungup 'Zap/23-1'

Line in cdr-csv/Master.csv:
With ANSWER
"","3052164945","s","alex","3052164945","Zap/22-1","IAX2[asterisk3]/1","Dial","IAX2/asterisk3/3055037698@opsys-in|20","2004-03-09 17:20:30","2004-03-09 17:20:30","2004-03-09 17:20:41",11,11,"ANSWERED","DOCUMENTATION"

WithOUT Answer
"","3052164945","s","alex","""LOPEZ, ALEXANDE"" <3052164945>","Zap/22-1","IAX2[asterisk3]/2","Dial","IAX2/asterisk3/3055037698@opsys-in|20","2004-03-09 17:21:23",,"2004-03-09 17:21:29",6,0,"NO ANSWER","DOCUMENTATION"


The Console shows no errors, There is no difference between both output except the additional output from the answer app.

By: James Golovich (jamesgolovich) 2004-03-09 21:16:33.000-0600

Is that callerid coming from the telco, or is that something you have configured in your zapata.conf?

By: opsys (opsys) 2004-03-09 22:56:03.000-0600

This is how the call comes in:

Telco PRI goes into t1000.
All of the PRI is configued in the default context in zapata.conf
as the calls come in I mach the DID as an extension, then do a goto like this:

exten => 3055551212,1,Goto(context,s,1)

There is no custom CID application, nor AGI, all of the caller ID info is comming from the Telco.

I know that they are sending it b/c it is in the CDR.

Would it help if I run any other debugging info???

By: James Golovich (jamesgolovich) 2004-03-09 23:06:20.000-0600

It looks like somewhere the callerid is getting rewritten in a way that isn't proper.  Are you using SetCallerid somewhere (instead of using SetCIDNum)?

See how the callerid you received from the telco looked like:
""LOPEZ, ALEXANDE"" <3052164945>"

Thats the format its supposed to be in, but its getting changed.
When you did NoOp(${CALLERID}) it should have showed up exactly the same as that

By: opsys (opsys) 2004-03-10 23:23:16.000-0600

I do not have a rewrite statmen anywhere in my dialplan.  I have attached a gziped file of 'pri intense debug span 1' It shows the caller's name fine!!

By: James Golovich (jamesgolovich) 2004-03-11 00:09:28.000-0600

Try making your first priority call Wait,1
It looks like your receiving the callerid name in a facility message after the call has been answered.

Most of the times I've seen callerid name passed over ISDN its in the SETUP message

By: opsys (opsys) 2004-03-11 01:44:39.000-0600

Funny, but that fixed it!!  Placed a Wait,1 as the first step and bamm!!

Would it be better to have libpri make sure that all the info is there before answering a call.  The wait seems such a cludge..

By: James Golovich (jamesgolovich) 2004-03-11 01:47:12.000-0600

That wouldn't work at all.  We never know if the other side is going to send the name FACILITY message so always waiting for it would delay a lot of calls.

At least now this is documented in the bugtracker so if someone runs into the same problem and searches on it they will find something.

Ok to close out?

By: opsys (opsys) 2004-03-11 02:02:24.000-0600

Lets go ahead and close it.

I'll recap...

Seams that if the CallerID information is sent as part of a FACILITY message instead of a SETUP message. Asterisk does not pick it up in time to pass it along within the dialplan. Since it gets it after the call is answered it updates the information for the purpose of the CDR.  This explains why if I pick up the call with a hard answer it never gets to the CDR.  

Fix:  Place a Wait,1 in the start of the context handling the call.