Jump to content

Help On CDR Downloads


rickyjperez

Recommended Posts

Hi,

I need to download CDRs on extension basis and I am sending the xml to the endpoint URL as per the document available on Wiki. But i am redirecting to the login page every time. I hope there is some parameter must be missing in the code and i am not able to find out where is the problem. I have pasted the code below :

 

set xmldoc = server.createObject("MSXML2.DOMDocument.4.0")

Set xpre = Server.CreateObject("Msxml2.XMLHTTP")

 

ts = DateDiff("s", "01/01/1970 00:00:00","02/26/2009 00:00:00")

tse = DateDiff("s", "01/01/1970 00:00:00",Now())

ss = ss & "<?xml version='1.0'?>"

ss = ss & "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:sns='http://www.pbxnsip.com/soap/pbx'><env:Body>"

ss = ss & "<sns:CDR>"

ss = ss & "<FromUser>1021</FromUser>"

'ss = ss & "<TimeStart>"& ts &"</TimeStart>"

'ss = ss & "<TimeConnected>"& ts &"</TimeConnected>"

'ss = ss & "<TimeEnd>" & tse & "</TimeEnd>"

'ss = ss & "<CallID></CallID>"

ss = ss & "<Type>extcall</Type>"

ss = ss & "<Domain>sipc.globaltelelinks.com</Domain>"

ss = ss & "</sns:CDR>"

ss = ss & "</env:Body>"

ss = ss & "</env:Envelope>"

 

xmldoc.loadXML ss

xpre.open "POST", "http://pbx.optonetwork.com/cdr.xml", False

xpre.setRequestHeader "SOAPAction", "http://pbx.optonetwork.com/CDR"

xpre.setRequestHeader "Content-Type", "text/xml"

xpre.setRequestHeader "Content-Length", Len(ss)

xpre.send xmldoc.xml

 

'Response.write ss

res = xpre.responseText

 

Response.write res

 

Set xpre = Nothing

Set xmldoc = Nothing

 

Please help me to download the CDRs based on the extension

 

Thanks & Regards

Ramesh

Link to comment
Share on other sites

I assume you put the source IP address in the list of SOAP trusted IP addresses? Do you see this in the LOG "[5] SOAP: Need a professional license" or "[2] SOAP: Request from untrusted IP address"?

 

 

Thanks for your reply. Please let us knwo where we can see the SOAP Log. Is it the same log where we can see the sip log n the PBX.

 

Regards

Link to comment
Share on other sites

Yes, in the regular log.

 

Thanks for your reply and we have added the trusted IP and now it is not redirecting for login, but we are not getting proper response means we are not able to download the CDRs. we have searched in this forum and we found some altration like file:cdr.txt instead of CDR URL. We tried that also but we are not getting cdrs it is retruning blank response. Please help us to resolve the issue.

 

Regards

Ramesh

Link to comment
Share on other sites

Thanks for your reply and we have added the trusted IP and now it is not redirecting for login, but we are not getting proper response means we are not able to download the CDRs. we have searched in this forum and we found some altration like file:cdr.txt instead of CDR URL. We tried that also but we are not getting cdrs it is retruning blank response. Please help us to resolve the issue.

 

Regards

Ramesh

 

CDRs are PUSHed from the PBX and not pulled the way you wanted.

What you can do though, set the SOAP address on the PBX(probably already done) and receive all the CDRs and then filter it in your program.

Link to comment
Share on other sites

CDRs are PUSHed from the PBX and not pulled the way you wanted.

What you can do though, set the SOAP address on the PBX(probably already done) and receive all the CDRs and then filter it in your program.

 

Thanks for your reply, still we dont know how to download CDRs. Can you please put some sample codes so we can understand easily and integrate the same with our application. We required to find the users online can We use the same SOAP technic to send request for the same, if possible please explain how to do it.

 

Regards,

Ramesh

Link to comment
Share on other sites

Thanks for your reply, still we dont know how to download CDRs. Can you please put some sample codes so we can understand easily and integrate the same with our application. We required to find the users online can We use the same SOAP technic to send request for the same, if possible please explain how to do it.

 

Regards,

Ramesh

 

All you have to do is set the SOAP CDR Url to "cdr:192.168.1.2:10000", where 192.168.1.2:10000 is your SOAP server's ip:port. PBX will send the SOAP CDRs in the format explained in http://wiki.pbxnsip.com/index.php/Simple_CDR_Format and http://wiki.pbxnsip.com/index.php/Processi...DR_from_the_PBX

Link to comment
Share on other sites

All you have to do is set the SOAP CDR Url to "cdr:192.168.1.2:10000", where 192.168.1.2:10000 is your SOAP server's ip:port. PBX will send the SOAP CDRs in the format explained in http://wiki.pbxnsip.com/index.php/Simple_CDR_Format and http://wiki.pbxnsip.com/index.php/Processi...DR_from_the_PBX

 

Can you please provide some working samples as the SOAP URL Change is not working for me and i am not able to findout the issue. still i am getting the blank response.

 

 

Thanks and Regards

Ramesh

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...