On Thu, 14 May 2009, James A. Shigley wrote:
> Yeah it would be great to have it log a cdr style DB for sip calls with all 
> the usual CDR information along with SIP specific information like IP of the 
> user, codec being used, login, ect ,ect for tracking these type things and 
> also for other reporting I can see doing if I had that data.

So why not add this to your dialplan?  You could then stuff the value into 
the userfield of the cdr record.


Example from: http://www.voip-info.org/wiki/view/Asterisk+func+sip_header
=========================================================================
To get Ip address of From (takes into account no caller id info i.e. no 
[email protected] in the header):


exten => 1,1,Set(TESTAT=${CUT(SIP_HEADER(From),@,2)})
exten => 1,n,GotoIf($["${TESTAT}" != ""]?hasat)
exten => 1,n,Set(FROM_IP=${CUT(CUT(SIP_HEADER(From),>,1),:,2)})
exten => 1,n,Goto(gotip)
exten => 1,20(hasat),Set(FROM_IP=${CUT(CUT(CUT(SIP_HEADER(From),@,2),>,1),:,1)})
exten => 1,n(gotip),NoOp(Gateway IP is ${FROM_IP})
=========================================================================


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-biz mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-biz

Reply via email to