Where is the file with the dialplan?

Hi everyone, i need your kindly advice. i set up a structured IVR via web interface, and i see there are contexts of IVR i created in the file extensions_additional.conf.
but this context is temporary as after reboot it is not saved.
where is the file with that contexts? i think it should be in some file before going to extensions_additional.conf.

thanks in advance

The extensions_additional.conf is generated on the fly. As the heading at the top of the file says you should not edit that file as all edits will be lost. If you wish to hand write dialplan you should use extensions_custom.conf

Look in MySQL’s asterisk.ivr_details and asterisk.ivr_entries tables. Those entries are used to populate extensions_additional.conf.

There is generally no reason to ever go in to the database. Poking around in things you lack understanding of leads to random issues. If someone changes something without a full grasp of what they are changing or lacking a understanding of the bigger picture they can find them selves in trouble.

If this is a toy system you can nuke at any time go hog wild. If this is something you need to put your name or reputation on please keep to official means.

We provide module documentation at http://wiki.freepbx.org .

James is 100% correct. And just to clarify… I wasn’t recommending tinkering with MySQL internals. I was merely explaining where “the file” was housed that is used to generate the IVR contexts in extensions_additional.conf.

Another reason editing MySQL is bad is because it is not the only thing FreePBX modifies. For example, you’d never want to just add an Extension to the database using something like phpmyadmin. Sure your extension will show up in the GUI, however, there are many internal Asterisk Database commands that are run to setup the extension “inside” of Asterisk (not through mysql). This is why you can’t add extensions when Asterisk is off as FreePBX needs to talk directly to Asterisk’s Database (not to be confused with mysql). If you end up adding an extension directly into FreePBX through mysql you’d have all sorts of various issues starting from the fact that your CID would be broken on to worse things.

This same idea applies to other modules in freepbx as well that not only use MySQL but also use the Asterisk Internal Database. This is why we heavily advise people to not modify mysql directly.

so, is there any file before going to extensions_additional.conf?
a new question:
how to route from IVR to a custom context? i created some simple dialplan at extensions_custom.conf.
also, have ext 8 in IVR entries pointing to custom context i created before.
but it is not working, Verbose i showing hanging up.
Thanks

Then you jiust did it wrong, if you want help you probably need to be a little more open as to what “didn’t work” and show a call trace of of it “not working” there are no mind readers here :slight_smile:

ok, let me draw the picture:
there is a FreePBX, with a SIP channel, purpose of FreePBX is to act as IVR for external “dialers”.
for exapmle: anyone outside, when calling the number of SIP channel, is greeted with IVR`s welcome menu. then is offered to choose submenu: dial 1 to send congratulation, dial 2 to send anecdotes, dial 3 to send love declaration.
if he dials 1, then he hear : pres 1 to listen the first congratulation content, dial 2 ot listen to previos, dial 3 to listen to next.
after listening, he is offered to send the content listened, pressing 8.
when pressing 8, he should dial the tel number to send the congratulation.
afterwards, the receiver must receive the call from FreePBX and listen to the congratulation.

i created IVR, but am stuck at sending this content.

as i wrote b4, there is ext 8 in IVR entries, which point to a custom context:

extensions_custom.conf [----] 18 L:[ 1+12 13/ 13] *(407 / 407b)

[afterpressing8_tabrik]
exten=>s,1,Set(home="/var/lib/asterisk/sounds/custom")
exten=>s,n,Wait(2)
exten=>s,n,Answer()
exten=>a,n,Wait(1)
exten=>s,n,Background(${home}/ivr_tabrik5)
exten=>s,n,Read(digits, ,12)
exten=>s,n,Set(CHANNEL(language)=ru)
exten=>s,n,Background(${home}/ivr_tabrik6)
exten=>s,n,Saydigits(${digits})
exten=>s,n,Read(digit, ,1)
exten=>s,n,Gotoif($[${digit=1}?10:20])
exten=>s,10,Dial()

so, when pressing 8, the call is hanged, by Verbose the error is in last rows of:

-- Executing [t@ivr-12:2] Goto("SIP/sip-in-00000056", "ivr-16,s,1") in new stack
    -- Goto (ivr-16,s,1)
    -- Executing [s@ivr-16:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-16:2] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-16:3] Set("SIP/sip-in-00000056", "_IVR_CONTEXT_ivr-16=ivr-12") in new stack
    -- Executing [s@ivr-16:4] Set("SIP/sip-in-00000056", "_IVR_CONTEXT=ivr-16") in new stack
    -- Executing [s@ivr-16:5] Set("SIP/sip-in-00000056", "__IVR_RETVM=") in new stack
    -- Executing [s@ivr-16:6] GotoIf("SIP/sip-in-00000056", "1?skip") in new stack
    -- Goto (ivr-16,s,9)
    -- Executing [s@ivr-16:9] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_menu") in new stack
    -- Executing [s@ivr-16:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-16:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_menu)") in new stack
    -- <SIP/sip-in-00000056> Playing 'custom/ivr_menu.slin' (language 'en')
    -- Executing [1@ivr-16:1] Goto("SIP/sip-in-00000056", "ivr-13,s,1") in new stack
    -- Goto (ivr-13,s,1)
    -- Executing [s@ivr-13:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-13:2] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-13:3] Set("SIP/sip-in-00000056", "_IVR_CONTEXT_ivr-13=ivr-16") in new stack
    -- Executing [s@ivr-13:4] Set("SIP/sip-in-00000056", "_IVR_CONTEXT=ivr-13") in new stack
    -- Executing [s@ivr-13:5] Set("SIP/sip-in-00000056", "__IVR_RETVM=") in new stack
    -- Executing [s@ivr-13:6] GotoIf("SIP/sip-in-00000056", "1?skip") in new stack
    -- Goto (ivr-13,s,9)
    -- Executing [s@ivr-13:9] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_tabrik1") in new stack
    -- Executing [s@ivr-13:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-13:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_tabrik1)") in new stack
    -- <SIP/sip-in-00000056> Playing 'custom/ivr_tabrik1.slin' (language 'en')
    -- Executing [s@ivr-13:12] WaitExten("SIP/sip-in-00000056", "1,") in new stack
    -- Timeout on SIP/sip-in-00000056, going to 't'
    -- Executing [t@ivr-13:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=1") in new stack
    -- Executing [t@ivr-13:2] GotoIf("SIP/sip-in-00000056", "0?final") in new stack
    -- Executing [t@ivr-13:3] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_tabrik2") in new stack
    -- Executing [t@ivr-13:4] Goto("SIP/sip-in-00000056", "s,start") in new stack
    -- Goto (ivr-13,s,10)
    -- Executing [s@ivr-13:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-13:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_tabrik2)") in new stack
    -- <SIP/sip-in-00000056> Playing 'custom/ivr_tabrik2.slin' (language 'en')
    -- Executing [s@ivr-13:12] WaitExten("SIP/sip-in-00000056", "1,") in new stack
  == CDR updated on SIP/sip-in-00000056
    -- Executing [1@ivr-13:1] Goto("SIP/sip-in-00000056", "ivr-17,s,1") in new stack
    -- Goto (ivr-17,s,1)
    -- Executing [s@ivr-17:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-17:2] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-17:3] Set("SIP/sip-in-00000056", "_IVR_CONTEXT_ivr-17=ivr-13") in new stack
    -- Executing [s@ivr-17:4] Set("SIP/sip-in-00000056", "_IVR_CONTEXT=ivr-17") in new stack
    -- Executing [s@ivr-17:5] Set("SIP/sip-in-00000056", "__IVR_RETVM=") in new stack
    -- Executing [s@ivr-17:6] GotoIf("SIP/sip-in-00000056", "1?skip") in new stack
    -- Goto (ivr-17,s,9)
    -- Executing [s@ivr-17:9] Set("SIP/sip-in-00000056", "IVR_MSG=custom/pozdrav01") in new stack
    -- Executing [s@ivr-17:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-17:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/pozdrav01)") in new stack
    -- <SIP/sip-in-00000056> Playing 'custom/pozdrav01.slin' (language 'en')
    -- Invalid extension '1' in context 'ivr-17' on SIP/sip-in-00000056
  == CDR updated on SIP/sip-in-00000056
    -- Executing [i@ivr-17:1] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=1") in new stack
    -- Executing [i@ivr-17:2] GotoIf("SIP/sip-in-00000056", "0?final") in new stack
    -- Executing [i@ivr-17:3] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_tabrik3") in new stack
    -- Executing [i@ivr-17:4] Goto("SIP/sip-in-00000056", "s,start") in new stack
    -- Goto (ivr-17,s,10)
    -- Executing [s@ivr-17:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-17:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_tabrik3)") in new stack
    -- <SIP/sip-in-00000056> Playing 'custom/ivr_tabrik3.slin' (language 'en')
    -- Executing [3@ivr-17:1] Goto("SIP/sip-in-00000056", "ivr-18,s,1") in new stack
    -- Goto (ivr-18,s,1)
    -- Executing [s@ivr-18:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-18:2] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-18:3] Set("SIP/sip-in-00000056", "_IVR_CONTEXT_ivr-18=ivr-17") in new stack
    -- Executing [s@ivr-18:4] Set("SIP/sip-in-00000056", "_IVR_CONTEXT=ivr-18") in new stack
    -- Executing [s@ivr-18:5] Set("SIP/sip-in-00000056", "__IVR_RETVM=") in new stack
    -- Executing [s@ivr-18:6] GotoIf("SIP/sip-in-00000056", "1?skip") in new stack
    -- Goto (ivr-18,s,9)
    -- Executing [s@ivr-18:9] Set("SIP/sip-in-00000056", "IVR_MSG=custom/pozdrav02") in new stack
    -- Executing [s@ivr-18:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-18:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/pozdrav02)") in new stack
    -- <SIP/sip-in-00000056> Playing 'custom/pozdrav02.slin' (language 'en')
    -- Executing [s@ivr-18:12] WaitExten("SIP/sip-in-00000056", "2,") in new stack
    -- Timeout on SIP/sip-in-00000056, going to 't'
    -- Executing [t@ivr-18:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=1") in new stack
    -- Executing [t@ivr-18:2] GotoIf("SIP/sip-in-00000056", "0?final") in new stack
    -- Executing [t@ivr-18:3] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_tabrik3") in new stack
    -- Executing [t@ivr-18:4] Goto("SIP/sip-in-00000056", "s,start") in new stack
    -- Goto (ivr-18,s,10)
    -- Executing [s@ivr-18:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-18:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_tabrik3)") in new stack
    -- <SIP/sip-in-00000056> Playing 'custom/ivr_tabrik3.slin' (language 'en')
    -- Executing [s@ivr-18:12] WaitExten("SIP/sip-in-00000056", "2,") in new stack
  == CDR updated on SIP/sip-in-00000056
    -- Executing [8@ivr-18:1] Goto("SIP/sip-in-00000056", "afterpressing8_tabrik,8,1") in new stack
    -- Goto (afterpressing8_tabrik,8,1)
    -- Executing [h@afterpressing8_tabrik:1] Macro("SIP/sip-in-00000056", "XMPPSend,") in new stack
    -- Executing [h@afterpressing8_tabrik:2] Macro("SIP/sip-in-00000056", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/sip-in-00000056", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("SIP/sip-in-00000056", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("SIP/sip-in-00000056", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/sip-in-00000056' in macro 'hangupcall'
  == Spawn extension (afterpressing8_tabrik, h, 2) exited non-zero on 'SIP/sip-in-00000056'

i changed extension from s to 8, it is routing to the custom context now.

i need to be able to send the content now, first dialer should dial the number of receiver of the content, then to send.

I would suggest you investigate the Asterisk native AGI interface if you are trying to spawn a separate independent call, you can’t easily do it on your active channel.

thanks, for reply
is it a separate&