Can't execute Gotoif in realtime dataBase?

when i dial an extension 03111308308 it should execute monitor then dial and then perform time check if the time is from 09:00- 17:00 it should play an IVR saved with the name 2 but it is not doing so. call is being recorded and dialed but an IVR is not being played. any help would be much appreciated.

You need to provide the actual console output for an attempt. This shows what is actually being executed.

== Using SIP RTP CoS mark 5
> 0x3347110 – Strict RTP learning after remote address set to:
– Executing [03111308308@my-sip:1] MixMonitor(“SIP/4000-0000008f”, “recording.wav, b”)
– Executing [03111308308@my-sip:2] Dial(“SIP/4000-0000008f”, “SIP/03111308308,30,Ttr”)
== Using SIP RTP CoS mark 5
== Begin MixMonitor Recording SIP/4000-0000008f
– Called SIP/03111308308
– SIP/03111308308-00000090 is ringing
> 0x7f3f0c00fb00 – Strict RTP learning after remote address set to:
– SIP/03111308308-00000090 answered SIP/4000-0000008f
– Channel SIP/03111308308-00000090 joined ‘simple_bridge’ basic-bridge <46f7582b-4c71-476f-abbc-7e3b04c8c525>
– Channel SIP/4000-0000008f joined ‘simple_bridge’ basic-bridge <46f7582b-4c71-476f-abbc-7e3b04c8c525>
> 0x7f3f0c00fb00 – Strict RTP switching to RTP target address as source
> 0x3347110 – Strict RTP switching to RTP target address as source
> 0x3347110 – Strict RTP learning complete - Locking on source address
– Channel SIP/03111308308-00000090 left ‘simple_bridge’ basic-bridge <46f7582b-4c71-476f-abbc-7e3b04c8c525>
– Channel SIP/4000-0000008f left ‘simple_bridge’ basic-bridge <46f7582b-4c71-476f-abbc-7e3b04c8c525>
== Spawn extension (my-sip, 03111308308, 2) exited non-zero on ‘SIP/4000-0000008f’
== MixMonitor close filestream (mixed)
== End MixMonitor Recording SIP/4000-0000008f

The Dial application will not continue in the dialplan after the call is ended unless an option is passed to it, and then only the calling channel will continue.

1 Like

so what should i add other then dial. Dial must be used as you have to make a call. what can be done done to not let that end

dear @jcolp i want to take your advise on something. the thing is that i am configuring my sip users through real-time Database but i am having problem writing dial-plans in SQL. i want to write dial-plans in extension.conf for the real time sip users. how can i achieve that?

Configure Asterisk so it doesn’t use extensions from realtime. It is NOT the default to do so, so you must have had to configure it to do that.

1 Like

will the sip users still be called from the real-time database?

Asterisk does what you tell it to do. Dialplan doesn’t care where SIP users are stored. Same vice versa.

1 Like

i got it. thanks a lot @jcolp. you are a life saver.

this is very helpful.

Dear @jcolp please review this, i will be very thank full. Following are my files configurations please tell me how to change it to fetch dial-plan from extension.conf. it will be a great help.





I’m not going to tell you outright. You need to learn on your own, not just the details but also how to find information and where. The wiki is a great source.

The community site is great for very specific questions but if you find yourself here constantly asking question after question then you aren’t learning how to figure stuff out yourself.

the information there is very general. when you are stuck in little things it doesn’t provide any help.

but you are very right. i need to study more. Thank for your very kind advise