Auto fallthrough playback gave no sound

Hi guys,

I need some help understanding an error that I come across.

I have these in the extensions.conf:
(simplified)

[general]
static=yes
writeprotect=yes
autofallthrough=yes
clearglobalvars=yes
[globals]

[globals]
[default]
[Gateway]
include => hangup
exten => 1,1,Playback(vm-goodbye)

[hangup]
exten => h,1,Playback(vm-goodbye)
exten => h,n,Hangup()

I called into the context through x-lite , i dialed ‘1’ expecting to hear “vm-goodbye” once on the [Gateway] context, and once more on the [hangup] context when it falls through. however I found out that the “vm-goodbye” from the [hangup] context is not heard. Here is the log that is shown:

    -- Executing [1@Gateway:1] Playback("SIP/199-04b80b30", "vm-goodbye") in new stack
    -- <SIP/199-04b80b30> Playing 'vm-goodbye' (language 'en')
  == Auto fallthrough, channel 'SIP/199-04b80b30' status is 'UNKNOWN'
    -- Executing [h@Gateway:1] Playback("SIP/199-04b80b30", "vm-goodbye") in new stack
[Jul  7 18:30:26] WARNING[3168]: file.c:677 ast_readaudio_callback: Failed to write frame
    -- <SIP/199-04b80b30> Playing 'vm-goodbye' (language 'en')
[Jul  7 18:30:26] WARNING[3168]: app_playback.c:439 playback_exec: ast_streamfile failed on SIP/199-04b80b30 for vm-goodbye
    -- Executing [h@Gateway:2] Hangup("SIP/199-04b80b30", "") in new stack
  == Spawn extension (Gateway, h, 2) exited non-zero on 'SIP/199-04b80b30'

As you can see, the second “vm-goodbye” received warning:

WARNING[3168]: file.c:677 ast_readaudio_callback: Failed to write frame

then followed by

WARNING[3168]: app_playback.c:439 playback_exec: ast_streamfile failed on SIP/199-04b80b30 for vm-goodbye.

From what i see, the asterisk are capable of playing “vm-goodbye” from the [gateway] context, only after the auto fallthrough the problem occurred. I do not see such behaviour on my other older asterisk test machine.

Please help me figure out:

  • what cause the sound “vm-goodbye” not to be heard
    -what does the warning means?
  • what causes the warning
  • is there a solution to this

Thank you

Installed on the current machine:

asterisk 1.4.21.1
libpri 1.4.4
zaptel 1.4.11

The machine do not have any zaptel card (no hardware for timing source), so I used ztdummy. (lsmod will show that ztdummy is loaded)

This is because the h extension is called once the call is hung up on. It’s like talking to some one on the phone, hanging up, you keep speaking and you want to know why they cant hear you.

Hi,

thanks for the quick reply, but I think I missed the point here.

I understand that after the extension ‘1’ in [gateway] context is called, asterisk will auto fall through to ‘h’ extension in the [hangup] context, but from my understanding, ‘h’ extension suppose to instruct asterisk to play “vm-goodbye” before executing hangup().

It is stated in the log that asterisk actually tried to playback “vm-goodbye” on the ‘h’ extension, but some warning pops up, and there is no audio played; then it hang up. So I should hear another “vm-goodbye” before it hang up.

I have tested this same flow on my older asterisk machine, and I heard 2 “vm-goodbye” (one from gate way, and one from ‘h’ extension) before hanging up.

In particular, what does :
ast_readaudio_callback: Failed to write frame
and
playback_exec: ast_streamfile failed on SIP/199-04b80b30 for vm-goodbye.
actually means? Please kindly guide me.

It could be it was a bug with the older version. AGAIN the h extension is only called ONCE YOU HANG UP A CALL. So there is no way for the caller to hear it. The error that you have there is simply that the system can not play the file and the reason is very understandable.

Thank you for your patience in explaining that to me, after further experiments, you are right, most likely my older asterisk is bugged :blush:

So in conclusion, h extension is called WHEN hangup occurred, caused by autofallthrough.

However, I am still interest to find a way to have “vm-goodbye” automatically played before caller is hung up, as stated in voip-info.org:

from http://www.voip-info.org/wiki/view/Asterisk+standard+extensions

any idea?

Again, thanks :smile:

The only real way to do it would be to inject a sound when you know the call will end. I don’t know your exact set up so it would be hard to say. You can include it in the end of a dial plan or have one of the parties key in a DTMF sequence that would play a file (set in features.conf). An idea might be to bridge the calls and monitor both of them. Should one fall inject a sound into the other one (this is just a guess and if possible I am unsure on how to implement it).

Thanks for your help :smile: