[asterisk-bugs] [JIRA] (ASTERISK-26774) Playback URL fails after some time

Igor Gamayunov (JIRA) noreply at issues.asterisk.org
Thu Feb 23 07:21:10 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235405#comment-235405 ] 

Igor Gamayunov commented on ASTERISK-26774:
-------------------------------------------


I have uploaded the required log level file without protocol-level trace since I believe it is not involved in the issue. 

This log shows playbacks started failing at some point. 

You can follow one sample  *8773190376 at redirect*   starting from the *Feb 20 16:05:39* time stamp which was successfully played the greeting file +customer/63601/greeting.wav+  and then take a look  at the log entries starting from *Feb 20 16:23:14* time stamp. 

Media cache module assumes using _/tmp/bucket-AF2Ool_ cached local file and fails to read it because this file IS NOT EXIST ANYMORE since it was DELETED by the system tmpwatch cron application. It seems that the code does not check if the file exist and just trying to open it.

I think that the issues caused by situation when a cached media bucket file has been deleted and the Playback media cache modules fails to verify if the file is exist.

_It is very easy  to reproduce the failure by simply removing the corresponding cached file  */tmp/bucket-xxx* after the first successful playback._

# Here are steps and our dial plan
- Call comes in 
- Retrieves a greeting file URL and a destination IP address to direct the call from a database table
- Playback(URL)
- Redirect call to a conference server
{noformat}
[redirect]
exten => _X.,1,Answer
 same => n,Set(TDID=1110)    ; set the common part of the transfer number
 same => n,Set(ARRAY(GFILE,IPAddress)=${ODBC_CGRET_SQL(SELECT ... where DID='${EXTEN}')})
 same => n,GotoIf($[!${EXISTS(${IPAddress})}]?error)
 same => n,Playback(silence/1&${GFILE}) ; play greeting
 same => n,ExecIf($["${PLAYBACKSTATUS}" != "SUCCESS"]?Playback(silence/1&${DFILE}))
 same => n,Dial(PJSIP/trk_conf/sip:${TDID}-${EXTEN}@${IPAddress},30,g)
 same => n,Hangup
 same => n(error),Playback(has-been-disconnected)
 same => n,Hangup
{noformat}

# https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Project+-+URI+Media+Playback
# Playback starts failing after some time



> Playback URL fails after some time
> ----------------------------------
>
>                 Key: ASTERISK-26774
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26774
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_playback
>    Affects Versions: 14.2.1
>         Environment: Amazon Linux AMI release 2016.09
>            Reporter: Igor Gamayunov
>            Assignee: Igor Gamayunov
>            Severity: Critical
>         Attachments: http_playback_failed_full.log
>
>
> We have a custom greeting server which runs a dial plan context to  Playback a URL based greeting files to customers before redirecting calls elsewhere.
> We see consistently that after couple of hundreds  successful playbacks the Playback application starts failing.
> Basically, we have to restart the asterisk to recover. 
> We are sure that the files at URL are valid and accessible all the time, because when we see errors we can do 'wget' of the file from the same server without any issues and only way to get back playback is to restart asterisk
> The following log  entrees show normal playbacks:
> {noformat}
> pbx.c: Executing [NNNNNNN at DDDDD:5] Playback("PJSIP/TTT-00000000", "silence/1&https://s3-us-west-1.amazonaws.com/xx/yyy.wav") in new stack
> file.c: <PJSIP/TTT-00000000> Playing 'silence/1.gsm' (language 'en')
> file.c: <PJSIP/trk_conf-000006ab> Playing 'https://s3-us-west-1.amazonaws.com/xx/yyy.wa.slin' (language 'en')
> {noformat}
> The following  log entries show when it starts failing:
> {noformat}
> pbx.c: Executing [NNNNNNN at DDDDD:5] Playback("PJSIP/TTT-00000000", "silence/1&https://s3-us-west-1.amazonaws.com/xx/yyy.wav") in new stack
> file.c: <PJSIP/TTT-00000000> Playing 'silence/1.gsm' (language 'en')
> file.c: File https://s3-us-west-1.amazonaws.com/xx/yyy.wav does not exist in any format
> file.c: Unable to open https://s3-us-west-1.amazonaws.com/xx/yyy.wav (format (ulaw|gsm)): No such file or directory
> app_playback.c: Playback failed on PJSIP/TTT-00000000 for silence/1&https://s3-us-west-1.amazonaws.com/xx/yyy.wav
> {noformat}
> This happens to all Asterisk 14 version since we discovered it can play URLs.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list