I am not proxying the media, but never the less I am forced to store the source media IP in my CDR, for regulatory reasons. Asterisk gets that information when the reinvite comes, but how do I store it? If I don't figure this out my next email will be from Federal Prison. Kindly help me stay away from those guys. Eventually we all need to save that information or we shall not be able to stay in business.
On Fri, Oct 11, 2013 at 9:05 PM, CDR <venefax at gmail.com> wrote:> I am not proxying the media, but never the less I am forced to store > the source media IP in my CDR, for regulatory reasons. Asterisk gets > that information when the reinvite comes, but how do I store it? > If I don't figure this out my next email will be from Federal Prison. > Kindly help me stay away from those guys. Eventually we all need to > save that information or we shall not be able to stay in business. > >You can add custom fields to your CDR records using Set(CDR(customfieldname)=foobar). I don't know the name of the variable you want that specifically contains the source media IP, but I imagine you can pull it with the SIP_HEADER function, or possibly the CHANNEL(recvip) function. -- Thanks, Warren Selby, dCAP http://www.SelbyTech.com <http://www.selbytech.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20131011/4bb077be/attachment.html>
hi, you have not mentioned which cdr backend you are using. peer ip is saved in variable CHANNEL(peerip). if you are using mysql for cdr backend you can create a field in cdr table (field name can b any of your choice) in dialplan assign the value of CHANNEL(peerip) to you ip field and asterisk will fill ip field. if you name ip feild "Peer_ip" you can use this example. same,n,Set(CDR(Peer_ip)=${CHANNEL(peerip)}) On Sat, Oct 12, 2013 at 4:05 AM, CDR <venefax at gmail.com> wrote:> I am not proxying the media, but never the less I am forced to store > the source media IP in my CDR, for regulatory reasons. Asterisk gets > that information when the reinvite comes, but how do I store it? > If I don't figure this out my next email will be from Federal Prison. > Kindly help me stay away from those guys. Eventually we all need to > save that information or we shall not be able to stay in business. > > -- > _____________________________________________________________________ > -- 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 -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20131012/89976c81/attachment.html>
The CHANNEL() function has no idea about the media IP, and also SIP_HEADER(), since the media IP is not known until the call has been established and a reinvite has been received and dispatched. I am using of course, directmedia=yes and directrtpsetup=yes. Hence my question to the group.
On 10/11/2013 10:05 PM, CDR wrote:> I am not proxying the media, but never the less I am forced to store > the source media IP in my CDR, for regulatory reasons. Asterisk gets > that information when the reinvite comes, but how do I store it? > If I don't figure this out my next email will be from Federal Prison. > Kindly help me stay away from those guys. Eventually we all need to > save that information or we shall not be able to stay in business. >Federal Prision v.s. hiring an Asterisk Programmer to write a patch to suit your needs. I think the choice is clear. -- Technical Support http://www.cellroute.net
Right now,there is no way know to capture the Media IP. The channel variable does not know about it. It requires adding anew variable to CHANNEL(), and also it entails to force every channel to update that variable. New channels like PJSIP do not even update the known variables like CHANNEL(recvip). So this is not trivial and in my opinion, only Digium may do this. Also, please remember that this IP can change dynamically along the way, via re-invites. More than once? Don't now the answer. If that is the case, then let's create a large variable and keep adding to it via concatenation and a field separator. I am not an officer, but I can see clearly when this patch will save maybe hundreds of lives. A crucial call will come and if we know where it came from, somebody is going to walk back home safe.