[asterisk-users] peer IP address in CDR
Mindaugas Kezys
mkezys at gmail.com
Wed Jun 30 02:07:17 CDT 2010
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:1003 at 192.168.0.148:5061|X-PRO build 1082
Regards,
Mindaugas Kezys
Kolmisoft UAB
VoIP Billing Solutions
e-mail: info at kolmisoft.com
URL: http://www.kolmisoft.com
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chan_sip.c.patch
Type: application/octet-stream
Size: 2794 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20100630/919e998d/attachment.obj
More information about the asterisk-users
mailing list