[asterisk-users] VoIP Information in CDRs
Costa Tsaousis
costa at tsaousis.gr
Sat Feb 21 09:30:01 CST 2009
Hi,
I am trying to find a way to add the following info in CDRs (with
asterisk 1.4.23.1):
1. Codec used
2. RTP QoS statistics
3. RTP IP of remote host
4. For answered calls, the peer that requested to end the conversation
I have managed to get 1 and 2 for the caller, like that:
exten => h,1,Set(CDR(userfield)=RIP=${SIPCHANINFO(recvip)}
Codec=${CHANNEL(audioreadformat)}/${CHANNEL(audiowriteformat)}/${CHANNEL(audionativeformat)}/${SIPCHANINFO(t38passthrough)}
QOS=${RTPAUDIOQOS})
The problems I have so far:
*1. CODEC
*Codec is reported only for A-Leg.
When transcoding asterisk logs the above line as: slin for read / slin
for write / the codec of A-Leg / 0 for t.38.
Is there a way to get the codec for both legs of a call?
*2. RTP Qos is reported only for A-Leg.
*Also, asterisk seems to ignore the RTP statistics reports by B-Leg
after the BYE:
-- Executing [h at core-dialplan:3] Hangup("SIP/401-08231540", "") in
new stack
== Spawn h extension (core-dialplan, h, 3) exited non-zero on
'SIP/401-08231540'
Scheduling destruction of SIP dialog
'0aa4f73f5c9715b7661b50080a66901f at 10.11.12.1' in 6656 ms (Method: INVITE)
set_destination: Parsing <sip:422 at 10.11.12.43:5060;transport=udp> for
address/port to send to
set_destination: set destination to 10.11.12.43, port 5060
Reliably Transmitting (no NAT) to 10.11.12.43:5060:
*BYE sip:422 at 10.11.12.43:5060;transport=udp SIP/2.0
*Via: SIP/2.0/UDP 10.11.12.1:5060;branch=z9hG4bK3077b703;rport
From: "Office Line 1" <sip:401 at 10.11.12.1>;tag=as1d9352fe
To:
<sip:422 at 10.11.12.43:5060;transport=udp>;tag=0009b7aa1aaa51eb2c767e13-7fb3b34a
Call-ID: 0aa4f73f5c9715b7661b50080a66901f at 10.11.12.1
CSeq: 103 BYE
User-Agent: home.tsaousis.gr
Max-Forwards: 70
Content-Length: 0
---
== Spawn extension (core-dialplan, 422, 1) exited non-zero on
'SIP/401-08231540'
box*CLI>
<--- SIP read from 10.11.12.43:50539 --->
*SIP/2.0 200 OK
*Via: SIP/2.0/UDP 10.11.12.1:5060;branch=z9hG4bK3077b703;rport
From: "Office Line 1" <sip:401 at 10.11.12.1>;tag=as1d9352fe
To:
<sip:422 at 10.11.12.43:5060;transport=udp>;tag=0009b7aa1aaa51eb2c767e13-7fb3b34a
Call-ID: 0aa4f73f5c9715b7661b50080a66901f at 10.11.12.1
Date: Sat, 21 Feb 2009 14:29:42 GMT
CSeq: 103 BYE
Server: Cisco-CP7960G/8.0
Content-Length: 0
_*RTP-RxStat: Dur=4,Pkt=180,Oct=28800,LatePkt=0,LostPkt=0,AvgJit=0
RTP-TxStat: Dur=4,Pkt=183,Oct=29280
*_
These SIP messages are being exchanged after the dialplan has executed
the h extension.
Is there a way to have RTP statistics for both legs?
*3. RTP IP is not reported anywhere.
*The RIP= variable I have above, reports the SIP IP, and again only for
A-Leg.
Is it possible to find out the RTP (not SIP) IPs for both legs?
*4. Find out who hangedup an answered call.
*I have not found any way to determine the peer that requested to hangup
the call.
Is it possible to find who of the two legs requested the hangup?
Any help is appreciated.
Costa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090221/ac82abd6/attachment-0001.htm
More information about the asterisk-users
mailing list