How to interpret and bill calls forwarded for external calls?


#1

I use Asterisk Realtime and is with problem to bill a call forwarded for a external number. A sample call inside a network that was forwarded generate 7 rows in CDR table of Realtime database.

I don’t know if anyone can understand it but the called party number is 1901003 to 4701006 and the 4701006 forwarded to the number 019999901569 (external number of asterisk).

I need to bill it but I cand understand what exactly the server was registred.

# id, calldate, clid, src, dst, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, userfield, enviado
'88', '2018-03-06 15:03:42', '\"\" <1901003>', '1901003', '4701006', 'saidaSolaris', 'SIP/1901003-00000045', 'SIP/saida-solaris-00000047', 'Dial', 'SIP/4701006,90,tT', '17', '17', 'ANSWERED', '3', '', '', 'N'
'87', '2018-03-06 15:03:40', '\"\" <1901003>', '1901003', '4701006', 'saidaSolaris', 'SIP/1901003-00000045', 'Local/019999901569@saidaSolaris-00000002;1', 'Dial', 'SIP/4701006,90,tT', '2', '2', 'ANSWERED', '3', '', '', 'N'
'86', '2018-03-06 15:03:07', '\"\" <1901003>', '1901003', '4701006', 'saidaSolaris', 'SIP/1901003-00000045', 'SIP/4701006-00000046', 'Dial', 'SIP/4701006,90,tT', '16', '13', 'ANSWERED', '3', '', '', 'N'
'85', '2018-03-06 15:03:42', '\"\" <551935139078>', '551935139078', '', 'solaris', 'SIP/saida-solaris-00000047', '', 'AppDial', '(Outgoing Line)', '17', '17', 'ANSWERED', '3', '', '', 'N'
'84', '2018-03-06 15:03:40', '\"\" <551935139078>', '551935139078', '019999901569', 'saidaSolaris', 'Local/019999901569@saidaSolaris-00000002;1', '', '', '', '2', '2', 'ANSWERED', '3', '', '', 'N'
'83', '2018-03-06 15:03:23', '\"\" <1901003>', '1901003', '019999901569', 'saidaSolaris', 'Local/019999901569@saidaSolaris-00000002;2', 'SIP/saida-solaris-00000047', 'Dial', 'SIP/saida-solaris/00111025519999901569,90/nj,tT', '19', '9', 'ANSWERED', '3', '', '', 'N'
'82', '2018-03-06 15:03:23', '\"\" <4701006>', '4701006', '', 'saidaSolaris', 'SIP/4701006-00000046', 'Local/019999901569@saidaSolaris-00000002;1', 'AppDial', '(Outgoing Line)', '17', '17', 'ANSWERED', '3', '', '', 'N'

#2

You don’t seem to be logging all the fields in the CDR, and there is no concept of realtime CDR, only database backends for CDRs.

I think I’m probably seeing some 302 redirects, but without seeing the details of dialplan, the full CDRs with proper start answer and end times, and having an idea of what SIP/4701006 was expected to do, its going to be too much work to interpret your logs.

If you are doing anything complex, use CEL, rather than CDR.


#3

@david551, Can we use CEL and CDR both simultaneously In Astrisk 11?


#4

Yes, you can. They are independent.


#5

@jcolp, Sorry I have raised this question here


#6

@jcolp If they are independent so is there any settings to achieve this?


#7

I know of no settings and I know of people using both at the same time. I’d suggest looking at console output at startup to see if anything stands out.


#8

It worked, I just simply restarted my server :slight_smile: Thanks Anyways