http://qs1969.pair.com?node_id=338056

l3nz has asked for the wisdom of the Perl Monks concerning the following question:

Fellow monks,
I am banging my head against the wall while trying to remotely control an Innovaphone VoIP BPX using the iPBX API, that is based on SOAP. I'd like to remotely control my VoIP telephones, so that I can - for instance - start a call from my own telephone by launching a script on a server.

I succeed in making a connection to the PBX by using an authenticated HTTP connection, so I get the versioning data of my particular PBX. When I try to create a session, though, my PBX will always return '0' as failure no matter what I enter as the first parameter of the Initialize call.... anybody has ever tried this in Perl?

By the way, the docs for iPBX state that "Some SOAP libraries may per default always close the HTTP connection and reconnect on subsequent SOAP calls, which will not work. The SOAP library should be configured to keep at least one HTTP connection alive.".
Can I do this with SOAP::Lite or with any other module? And how does it happen: does a socket stay connected all of the time?

Thanks for any help you may offer.

My code is as follows:

use strict; use SOAP::Lite; my $service = SOAP::Lite -> service( 'file:c:\pbx.wsdl' ); my ($codice, $gkid, $location, $firmware, $serial) = $service->Version +(); print "$codice, $gkid, $location, $firmware, $serial\n"; my ($sess, $key) = $service->Initialize( "xcept-lenz", ""); print "Session: $sess - Key: $key\n\n";