Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options


by l3nz (Friar)
on Mar 19, 2004 at 17:19 UTC ( #338056=perlquestion: print w/replies, xml ) Need Help??

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";

Replies are listed 'Best First'.
Re: iPBX, SOAP and VoIP
by Thelonius (Priest) on Mar 19, 2004 at 17:35 UTC
    Searching for keepalive on the SOAP::Lite manpage, I found:

    SOAP::Lite's HTTP Transport module attempts to provide a simple patch to LWP::Protocol to enable HTTP Keep Alive. By default, this patch is turned off, if however you would like to turn on the experimental patch change the constant like so:

      $SOAP::Constants::PATCH_HTTP_KEEPALIVE = 1;
      Thank you. I missed this one completely.... :-)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://338056]
Approved by sunadmn
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2022-08-12 06:49 GMT
Find Nodes?
    Voting Booth?

    No recent polls found