Call hangs up in IVR menu

I have a simple IVR configuration
Main menu with options for 1 Office hours 2 Phone directory 3 for reception
When I press 1 for office hours it works but then once office hours are done playing it hangs up. But I have the office hours IVR set to return to the main menu.
Any idea why?

how are you playing the office hours? via an announcement? if yes, set the announcement destination

Yes playing them via announcement. I set the return to announcement and created a new anoucement and still it does the same, hang up

Here is the verbose logging of what takes place when it hangs up

-- <PJSIP/> Playing 'custom/main.slin' (language 'en')
    -- Executing [[email protected]:1] Goto("PJSIP/", "play-system-recording,2,1") in new stack
    -- Goto (play-system-recording,2,1)
    -- Executing [[email protected]:1] Answer("PJSIP/", "") in new stack
    -- Executing [[email protected]:2] Playback("PJSIP/", "custom/office_hours") in new stack
    -- <PJSIP/> Playing 'custom/office_hours.slin' (language 'en')
    -- Executing [[email protected]:3] Hangup("PJSIP/", "") in new stack
  == Spawn extension (play-system-recording, 2, 3) exited non-zero on 'PJSIP/'
    -- PJSIP/ Internal Gosub(crm-hangup,s,1) start
    -- Executing [[email protected]:1] NoOp("PJSIP/", "Sending Hangup to CRM") in new stack
    -- Executing [[email protected]:2] NoOp("PJSIP/", "HANGUP CAUSE: 16") in new stack
    -- Executing [[email protected]:3] ExecIf("PJSIP/", "0?Set(__CRM_VOICEMAIL=)") in new stack
    -- Executing [[email protected]:4] NoOp("PJSIP/", "MASTER CHANNEL: 1512760940.38 = 1512760940.38") in new stack
    -- Executing [[email protected]:5] GotoIf("PJSIP/", "0?return") in new stack
    -- Executing [[email protected]:6] Set("PJSIP/", "__CRM_HANGUP=1") in new stack
    -- Executing [[email protected]:7] AGI("PJSIP/", "sangomacrm.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
    -- <PJSIP/>AGI Script sangomacrm.agi completed, returning 0
    -- Executing [[email protected]:8] Return("PJSIP/", "") in new stack
  == Spawn extension (play-system-recording, 2, 3) exited non-zero on 'PJSIP/'
    -- PJSIP/ Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

i ask again - on the announcement screen there is a destination field. where is it pointing?

I do not have an announcement configured. I use an IVR for the office hours. It should work once the office hours are done playing return to the main IVR but it hangs up. It would be just like any other IVR that I want to return to another IVR

in your previous post you told me you are playing an announcement. and i am trying tell you that when you created the announcement you must also specify what happens to the call once the announcement is played. my guess is that destination is set to hang up

From the log lines provided, we can see that you’ve configured your IVR with option 1 assigned to “Play System Recording” which is not what you want. You want to send option 1 to an “Announcement”. When you configure an Announcement, it allows to you toggle the option to return to IVR.

Ok so I’m using an announcement but how can I have one IVR lead to another one. For example press 1 for English and 2 for French. Then the English and French menus would be the same in thier respective lenguagaes


Another IVR is one of the the destination you can give when you create an IVR. This is how you would usually do it…

If you want to offer switching languages that way then I would suggest create another IVR with those choices in it.

When there are only two languages you can also have a toggle (9 for example) which switches between them and which is present in the IVR English and French IVRs.

Since you actually want to switch languages and not simply have a hierarchy of IVRs I suggest you create a Language application and point the IVR that prompts you for a language to it. A Language application allows you to change the language of the call flow.

Tell that Language application which language should be used and the IVR to branch to once the language of the call flow has been changed.

Good luck and have a nice day!



I would suggest for efficiency, that the first IVR has only two option, “Press 1 for English, 2 for French . . .
Appuyez sur 1 pour l’anglais, 2 pour le français)”

each one goes to a “language” option and then continues to an IVR that is multilingual, set the invalid and timeout contexts to go some where sensible.