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

Olle E. Johansson oej at edvina.net
Thu Nov 19 10:50:13 CST 2009


19 nov 2009 kl. 17.46 skrev marek cervenka:

>> Please check the SIPCHANNEL() dialplan function, as well as the CHANNEL() dialplan function.
> 
> it's SIPCHANINFO but it's only for caller(phoneA)
> 
> phoneA --nat--> asterisk --nat--> phoneB
> 
> i need info about ip address of phoneB too
You can use the internal interface that CHANNEL() is using for any channel.

/O
> 
>>> 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"?
>>> 
> 
> 
> _______________________________________________
> --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