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

In reply to iPBX, SOAP and VoIP by l3nz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.