diff --git a/telephony/p5-Asterisk-AMI/Makefile b/telephony/p5-Asterisk-AMI/Makefile new file mode 100644 index 00000000000..d9ff513d9f9 --- /dev/null +++ b/telephony/p5-Asterisk-AMI/Makefile @@ -0,0 +1,22 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2013/04/26 16:09:30 sthen Exp $ + +COMMENT= interact with Asterisk Manager Interface from perl + +DISTNAME= Asterisk-AMI-v0.2.8 +PKGNAME= p5-${DISTNAME:S/-v/-/} +CATEGORIES= telephony perl5 + +HOMEPAGE= https://github.com/rrb3942/perl-Asterisk-AMI/ + +MODULES= cpan +CPAN_AUTHOR= GREENBEAN + +# Artistic 2.0 +PERMIT_PACKAGE_CDROM= yes + +RUN_DEPENDS= devel/p5-AnyEvent>=5.2 + +MODCPAN_EXAMPLES= Yes +MODCPAN_EXAMPLES_DIR= ${PREFIX}/share/examples/p5-Asterisk-AMI + +.include diff --git a/telephony/p5-Asterisk-AMI/distinfo b/telephony/p5-Asterisk-AMI/distinfo new file mode 100644 index 00000000000..b115a6bec95 --- /dev/null +++ b/telephony/p5-Asterisk-AMI/distinfo @@ -0,0 +1,2 @@ +SHA256 (Asterisk-AMI-v0.2.8.tar.gz) = B1/UQq+Z34uwrxlFsP4vRcFqAcZFEcNfQo/2XLa46vY= +SIZE (Asterisk-AMI-v0.2.8.tar.gz) = 35283 diff --git a/telephony/p5-Asterisk-AMI/patches/patch-lib_Asterisk_AMI_pm b/telephony/p5-Asterisk-AMI/patches/patch-lib_Asterisk_AMI_pm new file mode 100644 index 00000000000..57acff45640 --- /dev/null +++ b/telephony/p5-Asterisk-AMI/patches/patch-lib_Asterisk_AMI_pm @@ -0,0 +1,16 @@ +$OpenBSD: patch-lib_Asterisk_AMI_pm,v 1.1.1.1 2013/04/26 16:09:30 sthen Exp $ + +from 0.2.9 (on github, not on CPAN yet) + +--- lib/Asterisk/AMI.pm.orig Fri Apr 26 10:41:51 2013 ++++ lib/Asterisk/AMI.pm Fri Apr 26 10:43:00 2013 +@@ -1163,7 +1163,8 @@ sub _build_action { + $timeout = $actionhash->{$key} unless (defined $timeout); + next; + #Exception of Orignate Async +- } elsif ($lkey eq 'async' && $value == 1) { ++ } elsif ($lkey eq 'async' && ($value == 1 || $value eq 'true')) { ++ $value = 'true'; + $async = 1; + #Clean out user ActionIDs + } elsif ($lkey eq 'actionid') { diff --git a/telephony/p5-Asterisk-AMI/pkg/DESCR b/telephony/p5-Asterisk-AMI/pkg/DESCR new file mode 100644 index 00000000000..cc126197087 --- /dev/null +++ b/telephony/p5-Asterisk-AMI/pkg/DESCR @@ -0,0 +1,6 @@ +This module provides an interface to the Asterisk Manager Interface. +Its goal is to provide a flexible, powerful, and reliable way to +interact with Asterisk upon which other applications may be built. +It utilizes AnyEvent and therefore can integrate very easily into +event-based applications, but still provides blocking functions for use +with standard scripting. diff --git a/telephony/p5-Asterisk-AMI/pkg/PLIST b/telephony/p5-Asterisk-AMI/pkg/PLIST new file mode 100644 index 00000000000..4564fe731fb --- /dev/null +++ b/telephony/p5-Asterisk-AMI/pkg/PLIST @@ -0,0 +1,13 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2013/04/26 16:09:30 sthen Exp $ +${P5SITE}/Asterisk/ +${P5SITE}/Asterisk/AMI/ +${P5SITE}/Asterisk/AMI.pm +${P5SITE}/Asterisk/AMI/Common/ +${P5SITE}/Asterisk/AMI/Common.pm +${P5SITE}/Asterisk/AMI/Common/Dev.pm +@man man/man3p/Asterisk::AMI.3p +@man man/man3p/Asterisk::AMI::Common.3p +@man man/man3p/Asterisk::AMI::Common::Dev.3p +share/examples/p5-Asterisk-AMI/ +share/examples/p5-Asterisk-AMI/cmd_server.pl +share/examples/p5-Asterisk-AMI/event_proxy.pl