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