<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-flowed"
 style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">
<br>
i have a requirement for sending AMI events to a Commercial CRM server
<br>
for things like&nbsp; inbound call notification and data push to the client.
<br>
<br>
there 2 approaches the invasive and non invasive approach the non
<br>
invasive is a simple daemon/soap client that fires off a packet when
one
<br>
is received
<br>
a rather trivial task ..the invasive approach will be to compile the
<br>
bindings for a predefined WSDL file into a shared lib with gSOAP this
<br>
will be linked to
<br>
asterisk and any manager event will be sent to to the current AMI and
<br>
fired off in a soap envelope to the configured server.
<br>
<br>
wether it is done as a standalone daemon or integrated the generation
of
<br>
the WSDL is the key i have one that im using on apache/php for sending
<br>
CLI commands and reading responces from a drop down list of servers
<br>
uptime/show chan/sip show peer .... im extending this to sending events
<br>
and prehaps this should be hooked into the webserver on asterisk
instead
<br>
of apache running on the box ...to make asterisk 100% SOAP ... allowing
<br>
for some some interesting&nbsp; possibilities ...Email&nbsp; integration&nbsp; more
<br>
consoles with wider features ....
<br>
<br>
if you got so far you might be asking about licencing ...
<br>
<br>
gSOAP is released under 3 licences allowing for commercial use
alongside
<br>
the GPL
<br>
<br>
The gSOAP Public License 1.3
<br>
<a class="moz-txt-link-rfc2396E"
 href="http://www.cs.fsu.edu/%7Eengelen/license.html">&lt;http://www.cs.fsu.edu/%7Eengelen/license.html&gt;</a>
is based on MPL1.1
<br>
<a class="moz-txt-link-rfc2396E" href="http://www.opensource.org">&lt;http://www.opensource.org&gt;</a>
(Mozilla Public License 1.1).
<br>
<br>
The license allows for commercial and non-commercial use of gSOAP
<br>
without fees or royalties. It also allows products to be built on top
<br>
and distributed under any license (including commercial). Products
<br>
developed with gSOAP should include a notice of copyright and a
<br>
disclaimer of warranty in the product's documentation (License Exhibit
B).
<br>
<br>
The gSOAP public license requires modifications that are distributed as
<br>
part of an open source product based on gSOAP to be submitted back to
us.
<br>
<br>
Note that the wsdl2h tool, UDDI code, Web server, and sample
<br>
applications are NOT covered by the gSOAP public license. These are
<br>
offered under a choice of GPL or commercial licensing.
<br>
<br>
this does get a bit murky as the code generated from the parser is done
<br>
so under the GPL or there own 195$ comercial licence.there is no need <br>
for concern if the parser is not used and the header file is programed<br>
correctly (this is prefered as the WSDL file can be generated from this<br>
header saving the pain of setting up a WSDL file)<br>
<br>
<a class="moz-txt-link-freetext"
 href="http://www.genivia.com/Products/gsoap/GeniviaGSoapLicense.pdf">http://www.genivia.com/Products/gsoap/GeniviaGSoapLicense.pdf</a>
<br>
<br>
prehaps this is a problem for digium ??
<br>
<br>
gSOAP consists of a WSDL parser and header file generator (wsdl2h) this
<br>
is a code generator in a similar way to flex/bison there is then a soap
<br>
skeleton/stub compiler that generates the C code
<br>
(dont be mislead by cpp it does both C/C++) once this is done it is a
<br>
matter of compiling the stub with a distributed file to buld the lib to
<br>
be linked to a application
<br>
<br>
here is a example to build a base lib to interface with amazon ...
<br>
<br>
wsdl2h -c -o amazon.h <a class="moz-txt-link-freetext"
 href="http://soap.amazon.com/schemas2/AmazonWebServices.wsdl">http://soap.amazon.com/schemas2/AmazonWebServices.wsdl</a>
<br>
soapcpp2 -c -pamazon amazon.h
<br>
gcc -fPIC -shared -o libamazon.so
<br>
&lt;PATH_TO_GSOAP_SRC&gt;/soapcpp2/stdsoap2.c amazonC.c
amazonClientLib.c
<br>
gcc -o amazon amazon.c -L. -lamazon
<br>
./amazon &lt;DEVKEY free from <a class="moz-txt-link-abbreviated"
 href="http://www.amazonaws.com">www.amazonaws.com</a>&gt; &lt;SEARCH
KEY&gt;
<br>
<br>
if any one wants if a 46 line program that does a search on amazon and
<br>
lists the first 10 books matching the key word that links to this lib
<br>
.... of witch &lt; 10 lines are the business bit 2 includes and the
<br>
function call / error check.
<br>
<br>
the idea will be to
<br>
<br>
#ifdef SOAP_AMI
<br>
#include ...
<br>
#endif
<br>
<br>
in manager.c in manager_event???&nbsp; ... fire off a soap measage
<br>
<br>
#ifdef SOAP_AMI
<br>
send message/check for error ...
<br>
#endif
<br>
</div>
</body>
</html>