Fortunately we're not in a hurry yet... so Monday/next week is no problem

Here's my latest Response:
As you can see i'm not using any "\n"s anymore and the mentioned values are escaped.
I did some digging in the wide & deep CUCM logs. All i have found was this line in the CCM SDI log:
15:42:01.193 |ConnectionFailureToPDP - A connection request from Unified CM to the policy decision point failed Policy Decision Point:http://<IP>:80/_test_eccp.php The cause of the connection failure:No response from PDP App ID:Cisco CallManager Cluster ID:StandAloneCluster Node ID:<NODE>|Alarm^*^*
So CUCM did not get a response...
Strange thing about this line:
i can NOT reproduce it...
even if i test my script 10 times, wait 5mins and grab the new logfile via RTMT, this line does not appear anymore.
======================
Did set up my Apache with mod_python & interpreter and uploaded the samplePolicyApp (with minor changes to test).
Works!!
But for dynamical reasons and me being absolute beginner with python (especially when challenging a MySQL-D

i would rather stick to PHP.
Most curious. Your formatted response looks pretty much like what the Python script is composing. In the error you received, the "PDP" is actually your Web service, and I would interpret that error to mean that UCM couldn't even establish the TCP connection to your service. Do the logs on your Web server show the connection? Are you getting output from your service?
In the trace line, I see <IP>:80. Did you redact your IP address? If no, then, yep, I could see why there might be a problem, as the ECC Profile needs to actually have a routable IP address or domain name.
Just ruling out some other possible issues: especially with the <divert> option and <continue> option, you'll need to have defined some sort of directory number or pattern to actually receive the call in question. And, to be honest, I think it will be a good idea at some point to remove the <reason>chaperone</reason> stuff from the diversion reply--that's a niche feature--but I don't want to tweak that until we can determine exactly what's up with the connection.
No worries about using PHP--I mean, all UCM cares about is that the HTTP connection is working and that the headers and body responses are conforming to the expected schema. The server side could be any Web service infrastructure.
Chris Pearce
Cisco Distinguished Engineer