[asterisk-dev] [asterisk-users] asterisk cdr - remote ip address (fwd)

marek cervenka cervajs at fpf.slu.cz
Wed Nov 18 07:25:52 CST 2009


hi,

i want advice for remote ip address cdr logging

i'm thinking about SIPHOST varible in chan_sip.c

like this
tmp->priority = 1;
         if (!ast_strlen_zero(i->uri))
                 pbx_builtin_setvar_helper(tmp, "SIPURI", i->uri);
--added--
         if (!ast_strlen_zero(peer->tohost))
                 pbx_builtin_setvar_helper(tmp, "SIPHOST", peer->tohost);
--added--
         if (!ast_strlen_zero(i->domain))
                 pbx_builtin_setvar_helper(tmp, "SIPDOMAIN", i->domain);
         if (!ast_strlen_zero(i->callid))
                 pbx_builtin_setvar_helper(tmp, "SIPCALLID", i->callid);
         if (i->rtp)
                 ast_jb_configure(tmp, &global_jbconf);

do you think that this is possible?
do you think that similiar solution can be accepted to the trunk?

after this i can save remote ip address to the cdr 
exten => s,x,Set(CDR(ip) = "${SIPHOST}")

---------- Forwarded message ----------
Date: Mon, 16 Nov 2009 17:39:30 +0100 (CET)
From: marek cervenka <cervajs at fpf.slu.cz>
To: Asterisk Users Mailing List - Non-Commercial Discussion
     <asterisk-users at lists.digium.com>
Subject: Re: [asterisk-users] asterisk cdr - remote ip address

> - exten => s,x,Set(CDR(userfield) = "information") - replace "information"
> with the information like ${remoteip}

${remoteip} variable doesnt exist in asterisk (for remote voip phone)
SIPURI=sip:6666 at 192.168.1.184:5061 doesnt have public ip

i'm only found way
- check ${CHANNEL} for name
- check astDB SIP/Registry
- set some variable

really doesnt exist some "cleaner" way?

> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of marek cervenka
> Sent: Monday, November 16, 2009 8:50 AM
> To: asterisk-users at lists.digium.com
> Subject: [asterisk-users] asterisk cdr - remote ip address
> 
> hi,
> 
> i want add info about remote party ip address to the asterisk cdr table
> 
> can you recommend me "the system way"?

---------------------------------------
Marek Cervenka
=======================================




More information about the asterisk-dev mailing list