Cisco 7940 intercom AGI

Hello -

I’m trying to follow the instructions at this link:
specifically the instructions with the heading: “Here is a much improved version of the paging function” toward the bottom of the page.

I’ve added in the portion for extensions.conf to my extensions.conf file and made the changes needed for my setup.
Went ahead and created the bash script file “callall” and also customized that for my setup.

Asterisk appears to want the “callall” script to live in /var/lib/asterisk/agi-bin/ so it put it there and made sure the permissions were consistent with other asterisk files I had in those folders.

The bash script when run on it’s own works fine. I can actually see on my Cisco 7940 phone that it is initiating the page and playing the beep through the speaker.

The problem I’m having is that when I try to dial *30 from a phone to make an actual page, asterisk is telling me it can’t find the file and it is mistaking the filename for “callall|5555||8103|8103” instead of “callall.”

Here’s the messages asterisk shows when trying:

    -- Executing [*30@phones:1] Goto("SIP/102-000002fb", "intercom,*30,1") in new stack
    -- Goto (intercom,*30,1)
    -- Executing [*30@intercom:1] AGI("SIP/102-000002fb", "callall|5555||8103|8103") in new stack
[Aug 30 10:38:25] WARNING[519][C-00000257]: res_agi.c:1851 launch_script: Failed to execute '/var/lib/asterisk/agi-bin/callall|5555||8103|8103': File does not exist.
    -- Executing [*30@intercom:2] Hangup("SIP/102-000002fb", "") in new stack
        == Spawn extension (intercom, *30, 2) exited non-zero on 'SIP/102-000002fb'
    -- Executing [h@intercom:1] Hangup("SIP/102-000002fb", "") in new stac
        == Spawn extension (intercom, h, 1) exited non-zero on 'SIP/102-000002fb'

The first portion of the script for the “intercom” context as show here…

exten => *30,1,**AGI(callall|5555|${CALLERIDNUM}|8103|8103)** ; Change to match the range of extensions you want to page
exten => *30,2,Hangup
exten => h,1,Hangup

I’ve bolded the portion that seems to be holding things up. Has anyone ever tried this method or has any further info about this on how to get it working?

Would appreciate the advice, thanks.

The method of separating arguments using ‘|’ has been deprecated for many, many, many years. You need to use ‘,’ instead. It is trying to use the entire string, including arguments, as the filename.

1 Like

Ah. Makes sense.

Can you explain what it is you are trying to do?

You may not need AGI at all for your solution.

1 Like

I would like to get an intercom working with Cisco 7940 phones running SIP.
The link to the solution I posted before is actually exactly the scenario I want, but I’m finding that it’s outdated and full of depreciated commands and options. Alas, it doesn’t work since I’m running Asterisk 13.10.

Basically I want one way paging through the Cisco 7940g’s speakers. Someone would pick up their phone, dial an extension and page to multiple phones.

I’ve set up the 7940’s so they have two lines/extensions. One is 100’s range, and the other is +8000, so 8100. The 8100 extension is set to auto answer in order to accept the page.

I’m guessing there is a new way to do this since the link from I posted was last updated in…2008. Lol.

I would just use the Page() Command then.

exten => *30,1,Page(SIP/8100&SIP/8101&SIP/8102,i)

1 Like

Exactly what I needed. Just configured it and it works!
Thanks a ton.

1 Like