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