[SOLVED] Linksys SPA-9XX + paging puts calls on hold

We are having an issue with our asterisk system and paging. We currently use a mix of Linksys SPA-942 and SPA-962 phones all running firmware version 6.1.3(a). When somebody makes an announcement using the paging, all current calls are placed on hold.

According to the Linksys phone manual this is a “Feature”. Also, according to http://www.voip-info.org/wiki/view/SPA-941, this “feature” was fixed as of firmware version 5.1.15(a).

We have found this http://www.voip-info.org/wiki/view/Script+to+page+mixed+SIP+%252F+SCCP+system, but cannot get the AGI script to work properly. It seems that the GREP command is not working.

We are running linux kernel 2.6.22.13-0.1.gcc3.4.x86.i686 and asterisk version 1.4.18.1.

What we are looking for is an AGI script similar to the one I posted above. We need to be able to check the hints for all idle phones, and then check it against a list of phones in our paging group, and then output a list of extensions to use.

As I said above, my company is willing to pay to get this issue taken care of. The sooner we get an answer the better!

I’m sure if I was more familiar with linux commands and perl, I would have no issue doing this myself, but alas I am not that good.

Anyways,

Thanks in advance! I eagerly await any responses.

So I played around with that script all morning and managed to get it working!!

So now I can define page groups and current calls will not be put on hold when I page.

Here is my page.agi file (Perl AGI interface required):

#!/usr/bin/perl
#
# page.agi - Original file was allpage.agi by Rob Thomas 2005.
#               With parts of allcall.agi Original file by John Baker
#               Modified by Adam Boeglin to allow for paging sccp phones
#Modified/Updated by Jeremy Betts 6/1/2006 for improved efficiency..
#               We now use AGI to set the dialplan variable.. much smarter!
#
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of Version 2 of the GNU General
# Public License as published by the Free Software Foundation
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# page.agi will find all available sip & sccp phones
# it then sets the dialplan variable PAGE_GROUP to allow
# the phones to be paged with the Page cmd.
#
# This works with both my aastra, polycom, sipura/linksys and cisco sccp phones.
# It should be easily modified for other sip phones
#
# Documentation:
#  Add something similar to your dialplan,arguments are extensions to
#  to be excluded from the page. Use just the extension numbers.
#
#exten => *61,1,Set(TIMEOUT(absolute) = 15)
#exten => *61,n,AGI(page.agi|EXT1&EXT2&EXT3)
#exten => *61,n,Set(_ALERT_INFO="Ring Answer")
#exten => *61,n,SIPAddHeader(Call-Info: answer-after=0)
#exten => *61,n,Page(${PAGE_GROUP})
#exten => *61,n,Hangup()
#
#
#
#use Asterisk::AGI;
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
# set our array of phones that we will NOT be paging
@included = @ARGV;
# Get our needed info for idle sip & sccp phones
@sips = grep(/^\s+\d+.*/, `asterisk -rx "show hints"`);
# Now check each phone to see if it's in use and also
# against our exclude list.  If it passes both, it's
# added to our array of calls to make
# Then set the dialplan variable thru AGI

foreach $sipline (@sips) {
        my ($junk0, $exten, $junk1, $chan, $state, $junk2) = split(/ +/, $sipline,6);
        my ($type, $extension) = split(/\//,$chan,2);
        if (grep(/$extension/, @included)) {
        unless (($state ne "State:Idle")) {
                if ($type eq "SCCP") {
                        my $SCCP = $chan . "/aa=1wu/ringer=outside";
                        push(@mypage,$SCCP);

                } else {
                        push(@mypage,"$chan");

                }
        }
}
}
$page = join("&",@mypage);

$AGI->set_variable("PAGE_GROUP", "$page");

exit;

And here is what I added to my extensions.conf file:

exten => *61,1,Set(TIMEOUT(absolute) = 15) exten => *61,n,AGI(page.agi|0201&0202&0203) exten => *61,n,Set(_ALERT_INFO="Ring Answer") exten => *61,n,SIPAddHeader(Call-Info: answer-after=0) exten => *61,n,Page(${PAGE_GROUP}) exten => *61,n,Hangup()

I’m having a similar issue trying to get this feature to work with SPA942 phones. Can you clarify a few questions I have? Do you have to manually add all your SIP extensions to page or just the extensions you DON’T want to page?

exten => *61,1,Set(TIMEOUT(absolute) = 15)
exten => *61,n,AGI(page.agi|0201&0202&0203)
exten => *61,n,Set(_ALERT_INFO=“Ring Answer”)
exten => *61,n,SIPAddHeader(Call-Info: answer-after=0)
exten => *61,n,Page(${PAGE_GROUP})
exten => *61,n,Hangup()

Also, any idea how to page half-duplex? So the person paging cannot hear the receiving end?