Re: Anyone have an example of a perl script which sends commands to the status port?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Robert,

GnuGk includes 2 examples Perl scripts in contrib/statusport/,

Regards,
Jan

Robert Kulagowski wrote:
> I'm experimenting with vqueue's.
> 
> Does someone have an example script of sending a command via perl?  If
> I'm connected locally via telnet to the status port, I can send the
> command correctly, but the same commands run by my script aren't
> working.
> 
> It even works using "nc", but I guess I'm doing something wrong with
> my perl.  A working example would be a great starting point.
> 
> I have:  (the variables are all correct up to this point, so it
> doesn't appear to be a syntax error, because if I cut and paste the
> line which prints to STDOUT and paste it into a telnet session /
> status port the command succeeds.
> 
> my $sendsock = IO::Socket::INET->new(PeerAddr => $gk_host,PeerPort =>
> $gk_port,proto => 'tcp');
> print "routetogateway $destinationAlias $destinationIP $c $d\n";
> print $sendsock "routetogateway $destinationAlias $destinationIP $c $d\n";
> close ($sendsock);
> 

-- 
Jan Willamowius, jan@xxxxxxxxxxxxxx, http://www.gnugk.org/

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________________

Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: http://www.gnugk.org/


[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux