own dialplan – File does not exist in any format

VitalPBX Community Support General Discussion own dialplan – File does not exist in any format

  • Post
    mo10
    Moderator
    none

    This Dialplan:
    [cos-all-custom](+)
    exten => *251,1,NoOp(FEATURE: Record Ansage)
    same => n,Answer
    same => n,NoCDR()
    same => n,Wait(1)
    same => n,Playback(vm-rec-temp)
    same => n,Record(/tmp/ansage2.wav)
    same => n,Playback(/tmp/ansage2.wav)
    same => n,Hangup()

    Will record a file to /tmp/ansage2.wav
    It will NOT playback with the error (see below)
    File /tmp/ansage2.wav does not exist in any format
    Unable to open /tmp/ansage2.wav (format (ulaw)): No such file or directory
    app_playback.c: Playback failed on SIP/11-00000123 for /tmp/ansage2.wav

    If i download the file it will playback just fine.

    [2019-05-18 19:01:39] VERBOSE[10211][C-000000e1] file.c: <SIP/11-00000123> Playing 'vm-rec-temp.ulaw' (language 'de')
    [2019-05-18 19:01:44] VERBOSE[10211][C-000000e1] pbx.c: Executing [*251@cos-all-post:6] Record("SIP/11-00000123", "/tmp/ansage2.wav") in new stack
    [2019-05-18 19:01:44] VERBOSE[10211][C-000000e1] file.c: <SIP/11-00000123> Playing 'beep.ulaw' (language 'de')
    [2019-05-18 19:01:48] VERBOSE[10211][C-000000e1] pbx.c: Executing [*251@cos-all-post:7] Playback("SIP/11-00000123", "/tmp/ansage2.wav") in new stack
    [2019-05-18 19:01:48] WARNING[10211][C-000000e1] file.c: File /tmp/ansage2.wav does not exist in any format
    [2019-05-18 19:01:48] WARNING[10211][C-000000e1] file.c: Unable to open /tmp/ansage2.wav (format (ulaw)): No such file or directory
    [2019-05-18 19:01:48] WARNING[10211][C-000000e1] app_playback.c: Playback failed on SIP/11-00000123 for /tmp/ansage2.wav
    [2019-05-18 19:01:48] VERBOSE[10211][C-000000e1] pbx.c: Executing [*251@cos-all-post:8] Hangup("SIP/11-00000123", "") in new stack
    [2019-05-18 19:01:48] VERBOSE[10211][C-000000e1] pbx.c: Spawn extension (cos-all-post, *251, 8) exited non-zero on 'SIP/11-00000123'
    [2019-05-18 19:01:48] VERBOSE[10211][C-000000e1] pbx.c: Executing [h@cos-all-post:1] NoOp("SIP/11-00000123", "Ending Outbound Call") in new stack
    [2019-05-18 19:01:48] VERBOSE[10211][C-000000e1] pbx.c: Executing [h@cos-all-post:2] Hangup("SIP/11-00000123", "") in new stack
    [2019-05-18 19:01:48] VERBOSE[10211][C-000000e1] pbx.c: Spawn extension (cos-all-post, h, 2) exited non-zero on 'SIP/11-00000123'
    0
Viewing 4 replies - 1 through 4 (of 4 total)
  • Replies
    Up
    0
    Down

    You must create a folder who has as owner and group “asterisk”, what the asterisk is telling you is that is not able to read the file due to permissions.

    0
    mo10
    Moderator
    none
    Up
    0
    Down

    mkdir /tmp/ansage
    chown asterisk:asterisk -R /tmp/ansage

    but still not working.
    drwxr-xr-x 2 asterisk asterisk 4096 18. Mai 19:47 ansage

    Which commands should i use?

    Thanks

    0
    Up
    0
    Down

    Use this dialpan, I already tested

    [cos-all-custom](+)
    exten => *251,1,NoOp(FEATURE: Record Ansage)
    same => n,Answer
    same => n,NoCDR()
    same => n,Wait(1)
    same => n,Playback(vm-rec-temp)
    same => n,Record(${ASTSPOOLDIR}/tmp_sounds/ansage2.wav,5,120)
    same => n,Wait(2)
    same => n,Playback(${RECORDED_FILE})
    same => n,Hangup()

    0
    mo10
    Moderator
    none
    Up
    0
    Down

    Thank you, here comes the important part:

    Delete the .wav when trying to PLAYBACK:
    Playback(${ASTSPOOLDIR}/tmp_sounds/ansage2)

    What does the ,5,120 do?
    Max silence 5 seconds and Max Duration 120 seconds?

    0
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.