[OpenSIPS-Users] Perl Script

spady spady77 at gmail.com
Mon Oct 15 15:30:50 CEST 2012


Hi all, I am trying to use the perl script that is present under tutorial
section of opensips web site but i have and error on opensips logs and i
don't know why, here is the log:

*Oct 15 15:11:14 opensips /usr/local/opensips_proxy/sbin/opensips[28780]:
ERROR:core:XS_OpenSIPS__Message_log: perl error: Can't locate object method
"new" via package "IO::Socket::INET" (perhaps you forgot to load
"IO::Socket::INET"?) at
/usr/local/opensips_proxy/etc/opensips/perlfunctions.pl line 134.#012 *

and here is the snippet of code involved :

*ub sendSipMessage {
    my $ip = shift;
    my $port = shift;
    my $msg = shift;
    my $sock = new IO::Socket::INET (
        PeerAddr  => $ip, 
        PeerPort  => $port,
        Proto     => 'udp',
        LocalPort => '5060',
        ReuseAddr => '1'
    );
*

Have i to modify the line "my $sock = new IO::Socket::INET" ?? or i really
missed to load something?
Sorry, for dummy question, but i searched on forum but there is nothing that
give me a clue.

Thanks



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Perl-Script-tp7582291.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list