Page() paging application problem

Hi all,

I am using Asterisk 1.2.12.1. The problem I’m about to describe was also apparent in 1.2.10, so I know it has nothing to do with the fact that I upgraded.

I am using the Page() along with Page.agi (AGI used to find SIP channels that are available and not in use using hints). I have setup 2 extensions to do an office intercom, *0 and *00.

*0 : Office Intercom in Half Duplex mode (Meaning Page() is being used without the ‘d’ option)

*00 : Office Intercom in Full Duplex mode (Meaning Page() is being used with the ‘d’ option)

My problem is this: When users dial *0, all the availible SIP phones are added to a MeetMe, as intended by the Page application. When the page is initiated, users hear the “beep” and their Linksys SPA942’s pickup. After this beep, however, they hear no sound.

I did a test. I added a channel playing MusicOnHold to the MeetMe, and users can only hear a buzzing sound in the background. Without the MusicOnHold, users hear nothing.

When users dial *00, sound is actually transmitted, in both directions. However, due to the fact that the phones are near each other, there is an extreme echo. After 4 seconds, however, the audio transmission stops. Even though the audio stops, the MeetMe is still in progress until the user who initiated the page hangs up.

When using *00, whether I added the extension that plays MusicOnHold to the page group, or not, audio stops being transmitted after 4 seconds. However, when looking on the CLI, I notice the MusicOnHold stops right at that 4-second mark.

If anyone has any similar experience, or knows how to help, I could really use it. Below are snippets of my config files and CLI.

Extensions.conf (Note: Local/555@features is the MusicOnHold channel

;Office Intercom
exten => *0,1,Set(TIMEOUT(absolute) = 25)
exten => *0,n,AGI(page.agi)
exten => *0,n,Set(CALLERID(name)="PAGE: ${CALLERIDNAME}")
exten => *0,n,Set(CALLERID(number)=${CALLERIDNUM})
exten => *0,n,Set(_ALERT_INFO="Ring Answer")
exten => *0,n,SIPAddHeader(Call-Info:<sip:${IPADDR}>\;answer-after=0)
exten => *0,n,NoOp(PAGE GROUP IS: ${PAGE_GROUP})
exten => *0,n,Page(${PAGE_GROUP}&Local/555@features)
exten => *0,n,Hangup()

exten => *00,1,Set(TIMEOUT(absolute) = 25)
exten => *00,n,AGI(page.agi)
exten => *00,n,Set(CALLERID(name)="PAGE: ${CALLERIDNAME}")
exten => *00,n,Set(CALLERID(number)=${CALLERIDNUM})
exten => *00,n,Set(_ALERT_INFO="Ring Answer")
exten => *00,n,SIPAddHeader(Call-Info:<sip:${IPADDR}>\;answer-after=0)
exten => *00,n,NoOp(PAGE GROUP IS: ${PAGE_GROUP})
exten => *00,n,Page(${PAGE_GROUP}&Local/555@features,d)
exten => *00,n,Hangup()

CLI Output when *0 is dialed (Note: *0 Dialed from SIP/30)

pbx*CLI>
    -- Executing Set("SIP/30-08fd96b8", "TIMEOUT(absolute) = 25") in new stack
    -- Executing AGI("SIP/30-08fd96b8", "page.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/page.agi
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
    -- AGI Script page.agi completed, returning 0
    -- Executing Set("SIP/30-08fd96b8", "CALLERID(name)="PAGE: Michael"") in new stack
    -- Executing Set("SIP/30-08fd96b8", "CALLERID(number)=30") in new stack
    -- Executing Set("SIP/30-08fd96b8", "_ALERT_INFO="Ring Answer"") in new stack
    -- Executing SIPAddHeader("SIP/30-08fd96b8", "Call-Info: <sip:192.168.16.50>;answer-after=0") in new stack
    -- Executing NoOp("SIP/30-08fd96b8", "PAGE GROUP IS: SIP/22&SIP/18&SIP/17&SIP/16&SIP/13&SIP/12&SIP/11") in new stack
    -- Executing Page("SIP/30-08fd96b8", "SIP/22&SIP/18&SIP/17&SIP/16&SIP/13&SIP/12&SIP/11&Local/555@features") in new stack
    -- Playing 'beep' (language 'en')
    -- Executing Answer("Local/555@features-3efc,2", "") in new stack
    -- Executing Wait("Local/555@features-3efc,2", "1") in new stack
    -- Launching MeetMe(964896525d|mqxdw(5)) on Local/555@features-3efc,1
    -- Created MeetMe conference 1023 for conference '964896525d'
    -- Launching MeetMe(964896525d|mqxdw(5)) on SIP/17-08ff8cb8
    -- Launching MeetMe(964896525d|mqxdw(5)) on SIP/18-08ff3778
    -- Launching MeetMe(964896525d|mqxdw(5)) on SIP/16-08ffea90
    -- Launching MeetMe(964896525d|mqxdw(5)) on SIP/22-08f81540
    -- Launching MeetMe(964896525d|mqxdw(5)) on SIP/13-08f9d718
    -- Launching MeetMe(964896525d|mqxdw(5)) on SIP/11-08fa9ad8
    -- Launching MeetMe(964896525d|mqxdw(5)) on SIP/12-08fa38f8
    -- Executing MusicOnHold("Local/555@features-3efc,2", "default") in new stack
    -- Started music on hold, class 'default', on Local/555@features-3efc,2
    [b]-- Stopped music on hold on Local/555@features-3efc,2[/b]
  [b]== Spawn extension (features, 555, 3) exited non-zero on 'Local/555@features-3efc,2'[/b]
    -- Hungup 'Zap/pseudo-531090772'
  == Spawn extension (internal-admin, *0, 8) exited non-zero on 'SIP/30-08fd96b8'
    -- Executing Hangup("SIP/30-08fd96b8", "") in new stack
  == Spawn extension (internal-admin, h, 1) exited non-zero on 'SIP/30-08fd96b8'
pbx*CLI>

Notice: The part I bolded is when the MusicOnHold stopped playing automatically.

CLI output when dialing *00

pbx*CLI>
    -- Executing Set("SIP/30-08f7ec20", "TIMEOUT(absolute) = 25") in new stack
    -- Executing AGI("SIP/30-08f7ec20", "page.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/page.agi
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
    -- AGI Script page.agi completed, returning 0
    -- Executing Set("SIP/30-08f7ec20", "CALLERID(name)="PAGE: Michael"") in new stack
    -- Executing Set("SIP/30-08f7ec20", "CALLERID(number)=30") in new stack
    -- Executing Set("SIP/30-08f7ec20", "_ALERT_INFO="Ring Answer"") in new stack
    -- Executing SIPAddHeader("SIP/30-08f7ec20", "Call-Info: <sip:192.168.16.50>;answer-after=0") in new stack
    -- Executing NoOp("SIP/30-08f7ec20", "PAGE GROUP IS: SIP/22&SIP/18&SIP/17&SIP/16&SIP/13&SIP/12&SIP/11") in new stack
    -- Executing Page("SIP/30-08f7ec20", "SIP/22&SIP/18&SIP/17&SIP/16&SIP/13&SIP/12&SIP/11&Local/555@features|d") in new stack
    -- Playing 'beep' (language 'en')
    -- Executing Answer("Local/555@features-2254,2", "") in new stack
    -- Executing Wait("Local/555@features-2254,2", "1") in new stack
    -- Launching MeetMe(1591753623d|qxdw(5)) on Local/555@features-2254,1
    -- Created MeetMe conference 1023 for conference '1591753623d'
    -- Launching MeetMe(1591753623d|qxdw(5)) on SIP/12-08ff6058
    -- Launching MeetMe(1591753623d|qxdw(5)) on SIP/18-08fa5020
    -- Launching MeetMe(1591753623d|qxdw(5)) on SIP/13-08ff0b18
    -- Launching MeetMe(1591753623d|qxdw(5)) on SIP/22-08f8b688
    -- Launching MeetMe(1591753623d|qxdw(5)) on SIP/11-08ffbe30
    -- Launching MeetMe(1591753623d|qxdw(5)) on SIP/17-08faa560
    -- Launching MeetMe(1591753623d|qxdw(5)) on SIP/16-08feb5d8
    -- Executing MusicOnHold("Local/555@features-2254,2", "default") in new stack
    -- Started music on hold, class 'default', on Local/555@features-2254,2
  [b]  -- Stopped music on hold on Local/555@features-2254,2
  == Spawn extension (features, 555, 3) exited non-zero on 'Local/555@features-2254,2'
    -- Hungup 'Zap/pseudo-480533203'[/b]
  == Spawn extension (internal-admin, *00, 8) exited non-zero on 'SIP/30-08f7ec20'
    -- Executing Hangup("SIP/30-08f7ec20", "") in new stack
  == Spawn extension (internal-admin, h, 1) exited non-zero on 'SIP/30-08f7ec20'
pbx*CLI>

Notice: The part I bolded is when the MusicOnHold stopped on its own (4 seconds). At this point, all audio transmission stops.

sounds like it might be a timing issue. Did you upgrade zaptel along with *? Did you try downgrading it?

also try zttest and see what you get…

[root@pbx zaptel-1.2.9.1]# ./zttest
Opened pseudo zap interface, measuring accuracy…
100.000000% 100.000000% 100.000000% 100.000000% 99.987793% 100.000000% 100.000000%
100.000000% 100.000000% 99.987793% 100.000000% 100.000000% 100.000000% 100.000000% 99.987793%
100.000000% 100.000000% 100.000000%
— Results after 18 passes —
Best: 100.000000 – Worst: 99.987793 – Average: 99.997965

[root@pbx]# ztcfg -vvvv

Zaptel Configuration

Channel map:

Channel 01: FXO Kewlstart (Default) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Slaves: 03)
Channel 04: FXO Kewlstart (Default) (Slaves: 04)
Channel 05: FXS Kewlstart (Default) (Slaves: 05)
Channel 06: FXS Kewlstart (Default) (Slaves: 06)
Channel 07: FXS Kewlstart (Default) (Slaves: 07)
Channel 08: FXS Kewlstart (Default) (Slaves: 08)
Channel 09: FXS Kewlstart (Default) (Slaves: 09)
Channel 10: FXS Kewlstart (Default) (Slaves: 10)
Channel 11: FXS Kewlstart (Default) (Slaves: 11)
Channel 12: FXS Kewlstart (Default) (Slaves: 12)
Channel 13: FXS Kewlstart (Default) (Slaves: 13)
Channel 14: FXS Kewlstart (Default) (Slaves: 14)
Channel 15: FXS Kewlstart (Default) (Slaves: 15)
Channel 16: FXS Kewlstart (Default) (Slaves: 16)

16 channels configured.

If I run lsmod |grep zap, here is what I get

[root@pbx /]# lsmod |grep zap
zaptel 208388 31 wctdm24xxp
crc_ccitt 6337 1 zaptel
[root@pbx /#

Just to give an update on the problem, I tried the following:

exten => 100,1,Page(SIP/10&SIP/30)

This is a bare as the process can get. I didn’t add any SIP headers, or run any AGI scripts.

I was calling from SIP/30, and this caused SIP/10 to ring. The user picks up, and can hear me for 4 seconds, and then it cuts out. Therefore, I can isolate the problem to the Page() application.

Any ideas?

-Michael

sort of.

what if you dial() that exten? what if you both dial a meetme room? what if you dial an exten thats just MusicOnHold()?

I have a feeling that dial will work fine but meetme and MOH wont. Thus the problem is not with Page() but with MeetMe. I’d still guess that its somehow timing related (although you do have great accuracy)… not sure atm. But imho the problem could definatly be part of zaptel or timing.

Thanks for the reply.

I should have mentioned, I made sure its not timing. I created a MusicOnHold channel, which worked perfectly. I also set up a MeetMe between a few people and it worked flawlessly.

-Michael

what about dial()? do the phones generally work as they are supposed to?

Yes. The Dial application works fine. Users are able to place and receive calls, both internally, and externally over IAX and SIP using the ULAW, GSM, or G726 codecs.

do a sip debug for both the calling and called phones. Make one call that works (dial()), and one that doesn’t. Post the resulting CLI output and the sip debug…

Here is the pastebin with the output:

pastebin.ca/171101

I just noticed, as I was going through the debuging information, that there is a line that says Scheduling destruction of call ‘c5f7d681-78806c14@192.168.0.248’ in 15000 ms

What does that mean?

the scheduling destruction of call and destroying call stuff can usually be ignored, they relate to timed stuff like sip registration and qualify.

I think i may know your problem… it is NAT related. I am assuming all this stuff (phones+server) is behind the same NAT on a 192.168 IP? If so, there are a few points where it is using your external IP. That would cause a problem like you have experienced- one way audio which dies after 5sec.

I assume your network is inside a NAT, and both * box and phones are inside NAT. If this is wrong please update me :smile:

Paste your sip.conf, removing any passwords of course…

Actually, I am working on this from my home, and the PBX is located in an office.

I thought it was NAT at first too, but I am able to speak to the extensions directly with no problems. If I dial extension 10, and Ext 10 picks up, I can have a full conversation with them.

Even if the page is initiated from within the same network as the * box, the same thing happens.

On a different note, I started thinking that it could be a probem with the phone. I proved myself wrong after the following test:

I am able to use SIPAddHeader (for autoanswer) to Dial() an extension directly. For example

;Direct Intercom exten => _*[1-3]X,1,ChanIsAvail(Sip/${EXTEN:1},s) exten => _*[1-3]X,n,SIPAddHeader(Call-Info: <sip:${IPADDR}>\;answer-after=0) exten => _*[1-3]X,n,Dial(${AVAILORIGCHAN},15) exten => _*[1-3]X,n+101,Playback(pbx-invalid) exten => _*[1-3]X,n,Hangup()

The call sustains itself when placed like this. Therefore, it isn’t an incompatability with the SIPAddheader.

ah okay so much for that bright idea.

do you use canreinvite=no everywhere? that could still be causing a problem… if canreinvite is on then a call between two ends would be a direct connection but a call involving meetme or page would be straight to the server… Try setting canreinvite=no everywhere and see if that does anything.

Also you might try a gremlin flush-
shut off asterisk and unload zaptel. Wipe out the asterisk modules directories. Move or erase the asterisk and zaptel source folders.
Run yum update (or equivalent for your distro). Update your kernel and kernel-devel packages. reboot.
Download latest asterisk and zaptel fresh off asterisk.org. make, make install, etc. Start asterisk and zaptel again.

This sometimes kills ‘odd’ bugs…

Well, canreinvite was already set to no. That was a good idea though…but unfortunately, wasn’t the solution.

I just did as you said. I shut down Asterisk, unloaded zaptel. Wiped out asterisk modules directory. Deleted the Asterisk & Zaptel source directories, and downloaded the SVN trunk version of Zaptel and Asterisk. I ./configured it, made it, and installed it. After, I rebooted the machine.

I dialed the extension, and the same thing is still happening. After 4 seconds, I notice the following happen:

  1. I initated the extension from the CLI by typing ‘dial *00@features’.
  2. Page is initiated and sound is being transmitted for 4 seconds
  3. Handsets hangup after 4 seconds, but I have to type “Hangup” in the CLI in order for it to hang up.

I guess this is normal since I’m initiated the call from the CLI, however, even if I initiate the call from SIP/30, the same problem occurs.

hmmm this is still quite confusing. sorry i havent come up with a useful answer…

lets try the destination side. The last sip debug you sent was for the source side (your phone). Try turning sip debug on for the phone being paged, and post the output… to keep the output shorter just do one call, you page the phone, wait until the call dies, wait another 5sec, then hang up your end…

I just want to add that i’m using the page fuction since asterisk 1.2.1 and everything is working fine even on asterisk 1.2.11 using Polycom phone.

So it’s really look like the problem is maybe coming from the phone. Anyone has been sucessfull using this phone with page() ?

Ok, I did a Sip debug on peer 10 and I placed the call from SIP/30. Here is the output: pastebin.ca/171639

Just wanted to thank you guys for helping me out with this one. Its a very odd problem, seeing as no one else has it.

I’m experiencing a very similar problem. Whenever I use the Page() command to initiate a page, the paged parties join the created Meetme conference, and can hear audio from the pagee (is that a word?), but then the paged extensions drop from the conference after 3-4 seconds, while the pagee remains in the conference.

Normal dialing from extenstion to extension works fine, and intercoming to a single extension works fine using SipAddHeader and AutoAnswer.

I’m running Trixbox 1.1.1, upgraded to Asterisk 1.2.12.1 and Zaptel 1.2.9.1, all my phones are Linksys SPA-XXX series (but I’ve also tried paging from eyeBeam with the same results).

Here’s my CLI output:

-- Executing Goto("SIP/232-0a142d98", "intercom|s|1") in new stack
-- Goto (intercom,s,1)
-- Executing Answer("SIP/232-0a142d98", "") in new stack
-- Executing Playback("SIP/232-0a142d98", "beep") in new stack
-- Playing 'beep' (language 'en')
-- Executing Goto("SIP/232-0a142d98", "intercom|s|1") in new stack
-- Goto (intercom,s,1)
-- Executing Answer("SIP/232-0a142d98", "") in new stack
-- Executing Playback("SIP/232-0a142d98", "beep") in new stack
-- Playing 'beep' (language 'en')
-- Executing Set("SIP/232-0a142d98", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5
-- Executing WaitExten("SIP/232-0a142d98", "10") in new stack
-- Executing Set("SIP/232-0a142d98", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5
-- Executing WaitExten("SIP/232-0a142d98", "10") in new stack

== CDR updated on SIP/232-0a142d98
– Executing Set(“SIP/232-0a142d98”, “TIMEOUT(absolute) = 15”) in new stack
– Executing AGI(“SIP/232-0a142d98”, “page.agi|211|221|231|232|233|235|241|251|265”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/page.agi
== CDR updated on SIP/232-0a142d98
– Executing Set(“SIP/232-0a142d98”, “TIMEOUT(absolute) = 15”) in new stack
– Executing AGI(“SIP/232-0a142d98”, “page.agi|211|221|231|232|233|235|241|251|265”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/page.agi
– Remote UNIX connection
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection disconnected
– AGI Script page.agi completed, returning 0
– Executing SetCallerID(“SIP/232-0a142d98”, ““Page:Rob-Home” <232>”) in new stack
– Executing Set(“SIP/232-0a142d98”, “_ALERT_INFO=“Ring Answer””) in new stack
– Executing SIPAddHeader(“SIP/232-0a142d98”, “Call-Info:=; answer-after=0”) in new stack
– Executing Page(“SIP/232-0a142d98”, “SIP/275&SIP/270&SIP/260&SIP/250&SIP/245&SIP/240&SIP/230&SIP/225&SIP/220&SIP/215&SIP/210”) in new stack
– Playing ‘beep’ (language ‘en’)
– AGI Script page.agi completed, returning 0
– Executing SetCallerID(“SIP/232-0a142d98”, ““Page:Rob-Home” <232>”) in new stack
– Executing Set(“SIP/232-0a142d98”, “_ALERT_INFO=“Ring Answer””) in new stack
– Executing SIPAddHeader(“SIP/232-0a142d98”, “Call-Info:=; answer-after=0”) in new stack
– Executing Page(“SIP/232-0a142d98”, “SIP/275&SIP/270&SIP/260&SIP/250&SIP/245&SIP/240&SIP/230&SIP/225&SIP/220&SIP/215&SIP/210”) in new stack
– Playing ‘beep’ (language ‘en’)
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/275-0a14c1f8
– Created MeetMe conference 1023 for conference ‘1697718024d’
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/275-0a14c1f8
– Created MeetMe conference 1023 for conference ‘1697718024d’
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/250-0a15c1b8
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/245-0a1616f8
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/260-0a156c78
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/240-0a166c38
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/270-0a151738
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/250-0a15c1b8
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/245-0a1616f8
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/260-0a156c78
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/240-0a166c38
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/270-0a151738
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/210-b77173d8
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/220-b770bea8
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/230-b7700978
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/215-b7711940
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/210-b77173d8
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/220-b770bea8
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/230-b7700978
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/215-b7711940
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/225-b7706410
– Launching MeetMe(1697718024d|mqxdw(5)) on SIP/225-b7706410
– Hungup ‘Zap/pseudo-554612528’
== Spawn extension (intercom, *, 6) exited non-zero on ‘SIP/232-0a142d98’
– Hungup ‘Zap/pseudo-554612528’
== Spawn extension (intercom, *, 6) exited non-zero on ‘SIP/232-0a142d98’

When using the code:

exten => *,1,Set(TIMEOUT(absolute) = 15)
exten => *,n,AGI(page.agi|211|221|231|232|233|235|241|251|265)
exten => *,n,SetCallerID(“Page:${CALLERIDNAME}”<${CALLERIDNUM}>)
exten => *,n,Set(_ALERT_INFO=“Ring Answer”)
exten => *,n,SIPAddHeader(Call-Info:=; answer-after=0)
exten => *,n,Page(${PAGE_GROUP})
exten => *,n,Hangup

i’ll check out that pastebin in a bit…

One other thing to try- disable your firewalls. I was working on a system yesterday which had the oddest problem- IP phone calling * always worked fine, but ip phone calling IP phone would always get either one way audio or no audio. Turns out the problem was only part of the RTP range in rtp.conf was opened in the firewall. I updated rtp.conf and everything started working.

So try disabling the firewall and see if that makes it work.

Also watch an rtp debug while it happens and check if anything interesting happens…