[Asterisk-Dev] r option issue in app_dial
Gil Kloepfer
astr-dev at kloepfer.org
Tue Dec 13 12:23:50 MST 2005
I normally don't send along info to the list when I find a new bug (I
suppose I should), but this one may catch some of you off-guard:
I discovered the other day that if Dial is used WITHOUT option 'r'
Asterisk still provides ring progress tones to the caller. Additionally,
it does so without muting the channel audio (what happens when 'r' is used).
By itself, this is a bug, but unfortunately I suspect many people have:
exten => 1234,1,Dial(SIP/1234)
instead of
exten => 1234,1,Dial(SIP/1234||r) -or- Dial(SIP/1234,,r)
inside their extensions.conf file and have depended on the fact that
the ring progress happened to be provided even though they didn't
specify 'r'.
I have provided a patch to fix app_dial (see bug ID #0005979) so that
ring progress is handled as documented. When this is committed (I hope
it is) many people will likely report that callers aren't hearing ringing
which will be due to ommissions in the dial plan (like demonstrated above).
I discovered the bug since I have two Asterisk boxes between our SIP
phones and the telco. If I specify 'r' the line has the ringing feedback,
but users never hear the telco informational progress messages (like 'the
number you have reached has been disconnected'). All they hear is
endless ringing.
If I properly remove 'r', then Asterisk still was generating the ringing
sound (bug), but the channel was unmuted (as it should be) and the telco
ringing and Asterisk ringing were mixing together to form a very odd
ring sound which was confusing our users.
The "r" option for Dial() should only be specified on the terminal
Dial application -- that is, the Dial that actually addresses a physical
phone. All other Dial() in between should not have "r" so the caller
can hear the actual progress tones generated by the last PBX or switch
in the chain that drives the physical device. This is a very subtle
point that I don't think many people understand.
Anyhow, I hope this isn't too much for the -dev list, and that it
helps give the developers a heads-up on this. The proper use of
Dial(tech||r) should probably be in the docs or in the sample
extensions.conf somewhere.
---
Gil Kloepfer
astr-dev at kloepfer.org
More information about the asterisk-dev
mailing list