[asterisk-dev] why is src field in Master.csv showing the outgoing callerid ?

Dinesh Nair dinesh at alphaque.com
Wed Mar 8 12:36:35 MST 2006


[bear with me, this may sound like a user question, but it's the behaviour 
of writing CDRs that i'm asking about]

diagram is as follows:

SIP <--> Asterisk <-- E1 PRI --> Provider

with the following dialplan,

exten => _9X.,1,Set(CALLERID(num)=0088)
exten => _9X.,2,Dial(zap/g1/${EXTEN:1},60,CtT)

and calling '90182224444' from an internal SIP phone (6262), we get the 
following line in /var/log/asterisk/cdr-csv/Master.csv:

"SIP_ACCTCODE","0088","90182224444","phones","""Test User"" 
<0088>","SIP/6262-fc01","Zap/1-1","Dial","zap/g1/0182224444|60|tT","2006-03-09 
03:14:22",,"2006-03-09 03:14:29",7,0,"NO ANSWER","DOCUMENTATION","1141845262.0"

of importance here is the second field, src, according to cdr.c. it's 
currently showing 0088, which is the outgoing CALLERID(num) we've set it to 
in the dialplan.

we need to set CALLERID(num)=0088 because our PRI provider requires us to 
use this number to have the display correctly displayed on the called 
number's lcd panel. without this Set(CALLERID(num)=0088), the provider will 
use 0070 as our CLID to be displayed on the caller's side, and this is not 
what we want.

the question is, why is the (second) src field in Master.csv showing 0088 
when it should be 6262 since the call originated from internal SIP 
extension 6262 ? short of parsing the local channel field of Master.csv, 
how would we set src to the callernum of the originating channel ?

i'm wondering if this is the normal behaviour or is there a bug in how the 
src field in Master.csv is derived. i've noticed that it's set in cdr.c's 
ast_cdr_init based on calls from pbx.c and various other places.

also, setting values for callerid in zapata.conf dont seem to work either, 
only a dialplan CALLERID(num) works. any explanation for this ?

we're on asterisk 1.2.5/libpri 1.2.2/FreeBSD 6.0

--- zapata.conf ---
[channels]
signalling=pri_cpe
context=from_tm
group=1
callgroup=1
pickupgroup=1
callerid=ABCD <0088> # <-- this doesnt work at all in setting clid
priindication=outofband
switchtype=euroisdn
context=from_tm
accountcode=TM_E1_TRUNK
amaflags=default
busycount=4
callwaiting=no
transfer=no
useincomingcalleridonzaptransfer=no
threewaycalling=no
callreturn=yes
relaxdtmf=no
busydetect=no
usecallerid=yes
hidecallerid=no
usecallingpres=yes
echocancel=no
echocancelwhenbridged=no
echotraining=no
immediate=no
overlapdial=yes
pridialplan=unknown
prilocaldialplan=unknown
channel => 1-15
channel => 17-31

-- 
Regards,                           /\_/\   "All dogs go to heaven."
dinesh at alphaque.com                (0 0)    http://www.alphaque.com/
+==========================----oOO--(_)--OOo----==========================+
| for a in past present future; do                                        |
|   for b in clients employers associates relatives neighbours pets; do   |
|   echo "The opinions here in no way reflect the opinions of my $a $b."  |
| done; done                                                              |
+=========================================================================+



More information about the asterisk-dev mailing list