rickyjperez Posted March 11, 2009 Report Share Posted March 11, 2009 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 Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted March 11, 2009 Report Share Posted March 11, 2009 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"? Quote Link to comment Share on other sites More sharing options...
rickyjperez Posted March 11, 2009 Author Report Share Posted March 11, 2009 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 Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted March 11, 2009 Report Share Posted March 11, 2009 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. Yes, in the regular log. Quote Link to comment Share on other sites More sharing options...
rickyjperez Posted March 12, 2009 Author Report Share Posted March 12, 2009 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 Quote Link to comment Share on other sites More sharing options...
pbx support Posted March 12, 2009 Report Share Posted March 12, 2009 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. Quote Link to comment Share on other sites More sharing options...
rickyjperez Posted March 13, 2009 Author Report Share Posted March 13, 2009 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 Quote Link to comment Share on other sites More sharing options...
pbx support Posted March 13, 2009 Report Share Posted March 13, 2009 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 Quote Link to comment Share on other sites More sharing options...
rickyjperez Posted March 16, 2009 Author Report Share Posted March 16, 2009 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.