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

Olle E. Johansson oej at edvina.net
Wed Nov 18 07:49:58 CST 2009


Please check the SIPCHANNEL() dialplan function, as well as the CHANNEL() dialplan function.

/O

18 nov 2009 kl. 14.25 skrev marek cervenka:

> 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
> =======================================
> 
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev

---
* Olle E Johansson - oej at edvina.net
* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden






More information about the asterisk-dev mailing list