Paging Loudspeaker via ATA and Viking Paging Box

In our house we have overhead speakers in the ceiling that are used via a Viking ZPI-4 Paging Interface.
We have that connected to a Cisco ATA SPA112.

(FreePBX 12; Asterisk 11)

We have the ATA configured as a chan_sip extension (and is even mapped in the commercial Endpoint Manager), and it is registering fine. I can see it in ‘sip show peers’.

Now, when I call the extension (1000), I can see that the ATA was touched, but I get this in the console:

[2014-12-06 13:27:13] WARNING[2496][C-000006e6]: ccss.c:1000 ast_set_cc_callback_macro: Usage of cc_callback_macro is deprecated. Please use cc_callback_sub instead.
[2014-12-06 13:27:13] WARNING[2496][C-000006e6]: ccss.c:1000 ast_set_cc_callback_macro: Usage of cc_callback_macro is deprecated. Please use cc_callback_sub instead.
[2014-12-06 13:27:13] ERROR[2496][C-000006e6]: pbx.c:4387 ast_func_write: Function PJSIP_HEADER not registered
[2014-12-06 13:27:13] ERROR[2496][C-000006e6]: pbx.c:4387 ast_func_write: Function PJSIP_HEADER not registered
[2014-12-06 13:27:13] WARNING[2496][C-000006e6]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown
[2014-12-06 13:27:13] WARNING[2496][C-000006e6]: app_macro.c:309 _macro_exec: No such context ‘macro-dialout-one-predial-hook’ for macro ‘dialout-one-predial-hook’. Was called by s@macro-dial-one

Asterisk 11 does not use pjsip, and I’ve never enabled it on this system (which is a fresh install of version 12 - no upgrades). I have no custom contexts, and have not messed in the dialplan files, so I don’t know why it’s giving those warnings.

Also, I believe that in order for the Viking to answer any calls, we have to send the DTMF tone for 5. How can I do that? It needs to be sent before anyone begins speaking.

I ended up having to use a custom context with custom code to handle the sending of the DTMF tone. The ATA will auto-answer if you provide the correct settings on the ATA’s web interface.

If anyone comes here a-lookin’, here is a macro to send DTMF tone for the number 5.

[macro-PageDTMF]                                
exten => s,1,Playtones(!0/250,!770+1336/150,0)    
exten => s,n,Wait(.3)                            
exten => s,n,StopPlaytones()

good that you got it working, for simplicity, perhaps:-

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_SendDTMF

Dicko! Thanks! I like that better.

Here is another part that may be useful, concerning originating the call.

you can also use the “w” (pause) and “D” (send dtmf) options directly in a dial command.

Here is an easy-to-understand reference for it:
http://the-asterisk-book.com/1.6/applikationen-senddtmf.html

directly in dialplan? like this?:

exten => s,n(DIAL),Dial(${PA},,D(5,300))

Say I want to play a bell sound over the loudspeaker by dialing a number. (See my question here)

  1. So I dial the number,
  2. The extension I’m using should hang up
  3. Then rest of the call should proceed on its own (the loudspeaker’s extension originates a call to the sound-playing macro)

Problem is, I can’t figure out step #2.

You probably need to impliment an instance of AGI for that. A hungup channel is hungup and can’t do much but be hungup :slight_smile:

What if I called the extension via a FreePBX “Misc Application”? Wouldn’t that remove the call from the phone?

If I add my custom extension as a “Misc Destination”, then I can add a “Misc Application” to point to it.
I’ll try it.

No, when you hangup a channel, then it is hungup and can’t do anything more, as I said , look into calling AGI to do what you want, you can call it in you “h” (hangup) extension.

Ah, I understand. I’ve never worked with AGI before, so I’ll have to go research.
Thanks!

[TK]D-Fender in irc helped me out and came up with a non-AGI, fully dial-plan solution that works beautifully.
The code is over on Stack Exchange.

1 Like