The problem arrives when outbound or whatever call is made to the subscriber who is out of service at the moment, or when dialing wrong number.
In this case normally caller should hear service messages from the asterisk or carrier of the problem contents.
Instead of this, BEEEP BEEEP rings are online.
The ‘r’ dial-option on the trunk and in the Advanced Settings is off*.
(* Inbound dial-option, as well as trunk dial option, too.)
According to Logs, ‘silence’ and ‘cannot-complete-as-dialed’ sounds are played on the line, but in fact only BEEEEEEP BEEEEEP is heared when dialing wrong number. And BEEP BEEP BEEP after that.
When dialing subscriber who is out of service, it’s just the same.
The part of the problem was solved by putting this in extensions_custom.conf:
[from-internal-custom]
exten => _X./_XX,1,Background(silence/2)
exten => _X./_XXX,1,Background(silence/2)
exten => _X./_XXXX,1,Background(silence/2)
exten => _X./_XXXXX,1,Background(silence/2)
exten => _X./_XXXXXX,1,Background(silence/2)
The idea of this is that media channel is not created properly at the moment when start playing “cannot-complete-as-dialed” sound.
Playing background before that surprisely make it work, and “cannot-complete-as-dialed” sound is heard on the line instead of BEEEEPs, as normal.
With this extension addon, everything works almost fine.
BUT. This creates another problem. When Queue with Music on Hold is called from internal by it’s extension, this doesn’t work properly. No Music on Hold played, BEEPs instead of this D)))))) Seems like Background app makes some troubles to Queue Music on Hold playing. Also, for instance, if we try to call 7777 (simulate incoming call), the Queue doesn’t work fine, because Background app abuses it in some way.
But at the same time, the Queue app works fine when calling from outbound, because the script above has a restriction on outbound caller number (by the number of digits in caller number). So, if number of digits is more then 6, this is outbound caller, so we don’t play Background because there’s no need. That is why Queue starts and works fine for this caller.
Can anyone suggest how to fix it to work properly anyway. ^)))
Thanks.