You have a "use" line at the top of your PERL script For that module?
-Brett On Oct 15, 2012, at 8:32 AM, spady <[email protected]> wrote: > 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. > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
