string inside “datistringa” often contains spaces and arrives at the php file cut at the first spaces …
Is there a way to call the php file and make it take the spaces as well?
Spaces have never been allowed in HTTP URLs. The client should escape them as “%20”, or, in parameters only, as “+”, and the server should un-escape them before using them. (Many web browsers do this automatically at the client end, although the theory behind it was to ensure that URLs could be reliably read from printed versions, so the original expectation was that spaces be ignored, by the client.
There is a dialplan function to encode spaces and other problem characters, although some experimentation may be needed as Asterisk tends to handle protection of special characters in individual applications and funtions, rather than consistently across everything.