On Monday 03 December 2007, David Villasmil Govea wrote:
thanks for the heads-up.. but i didn't type a
thing, its all in the tar
file... so there's a typo there.
so THIS should be the correct /usr/local/etc/openser/openser.pl file, which
comes with the tar ball:
There's no openser.pl in the tar ball. You are right, though: the README
contains a broken documentation, though.
push @INC, '/usr/local/lib/openser/perl/';
This is not required, as the module parameter "modpath" (set in openser.cfg)
can be used to include the required directory.
use OpenSER::Utils::PhoneNumbers;
Correct.
OpenSER->import;
What is that supposed to do?
my $phonenumber = new OpenSER::Utils::PhoneNumbers(
publicAccessPrefix => "0",
internationalPrefix => "+",
longDistancePrefix => "0",
areaCode => "761",
pbxCode => "456842",
countryCode => "49"
);
$canonical = canonicalForm("07612034567");
$number = dialNumber("+497612034567");
You will need to use the object methods:
$canonical = $phonenumber->canonicalForm(...);
and
$number = $phonenumber->dialNumber("+497612034567");
I just updated the documentation in the SVN tree; upcoming releases will
contain an updated README.
If you are looking for test scripts and similar, look into the module's
doc/samples directory. The code in that subdirectory is expected to work.
There's even a phonenumbers.pl sample.
Bastian
--
Collax GmbH . Burkheimer Straße 3 . 79111 Freiburg . Germany
p: +49 (0) 761-45684-24
f: +49 (0) 761-45684-10
www.collax.com
Geschäftsführer: William K. Hite / Boris Nalbach
AG München HRB 158898 . Ust.-IdNr: DE 814464942
\ "Ummm, Trouble with grammar have I! Yes!" -Yoda-