For codecs use CHANNEL function, but you will only get CallLegA codecs.
Without hacking Asterisk, you will not be able to get CallLegB codecs.

Patch for Asterisk 1.4.33.1 attached to get such info.

Retrieve such info with variables:

RTPAUDIOQOS
BRTPAUDIOQOS

And even more:

LEG1DATA
LEG2DATA

In format: 

uniqueid|accountcode|chan_type|audionativeformat|audioreadformat|audiowritef
ormat|language|hangupcause|peerip|recvip|from|uri|useragent|

example:

LEG2DATA:
1277817284.0|7|SIP|alaw|alaw|alaw|en|16|192.168.0.148|192.168.0.148|sip:1003
@173test|sip:[email protected]:5061|X-PRO build 1082

Regards,
Mindaugas Kezys

Kolmisoft UAB 
VoIP Billing Solutions
e-mail: [email protected]
URL: http://www.kolmisoft.com


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Philipp von
Klitzing
Sent: Tuesday, June 29, 2010 6:20 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] peer IP address in CDR

Hi!

> Do you already have script to capture user's IP address? If not, check
> it here how I am capturing it:
>
> http://www.ilovetovoip.com/2010/05/getting-users-ip-address-remaining-
> within-the-dialplan

Or simply use one fo these:

  ${SIPCHANINFO(peerip)}
  ${SIPCHANINFO(recvip)}
  ${SIPCHANINFO(uri)}

More details with "show function SIPCHANINFO" on the CLI.

But: Anyone has an idea how to store the codec(s) that were employed for
the call in the CDR (or access it during hangup in the dialplan)?

The Wiki has a suggested patch to enhance SIPCHANINFO, but I wonder if 
there is a cleaner and built-in way to do it:
http://www.voip-info.org/wiki/index.php?page=Asterisk+func+sipchaninfo

Philipp


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Attachment: chan_sip.c.patch
Description: Binary data

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to