Soap Request \ Response via asterisk

Hi All

General question, someone have an example how to send a soap request via asterisk context when we need to add a different variables to the request and how to retrieve from the response of this request into the separate variables back.

Please advise,

There’s nothing built into Asterisk to do this, so you’d likely have to use an AGI - which means you can use any example for doing such a thing using a language you are familiar with.

You can use PHPAGI class and Edit Report a Bug

SoapClient::SoapClient

Hi Guys,
Thank you for tip.
Another question, maybe less related to Asterisk itself but somehow can be very helpful for rest.
Since we have no direct command line for SOAP request, we have option do that like :

curl --header “Content-Type: text/xml;charset=UTF-8” --header “SOAPAction: XXXXXMETHOD” --data /tmp/request.xml http://YYYYY:80/wsdv/ZZZZZZ.pgm

My limitation is that I need someone to assist to show a sample how do below scenario.
I need during asterisk session, execute a SHELL request to BASH script, which will use above CURL, but in the same time I need to send in the request.xml which include the SOAP request also two variables which dynamically are changed during each request (usually they are some ID, and MSISDN).

I thank about something like exten => _X.,n,Set(tmpResAPI={SHELL(/la/SOAP.sh "{msisdn}" “${ID}”)})

The help that I need is about the correct structure of the bash script to allow this variable go through and the parsing of the response after to retrieve an answer from specific row.

Someone met such flow and can share a script that may help for this particular scenario ?

Your issue is a programming issue outside Asterisk once you got that part solved, We can help you to integrate it with Asterisk