Forward calls to gsm when office is closed

Hi all , :smile:
I need help how to configure the ivr how to forward calls to a mobile phone when the office hours have closed!
-How to forward calls to your mobile

Regards,

GotoIfTime, or time dependent contexts. See the sample configuration for the latter.

There is nothing special about dialing a mobile phone as compared with any other PSTN call.

hi ,

hi have ivr , context - open and close i wanted to set when the closed send the calls to mobile phone.

Thanks

Hi, all

he is sending to the context of closed my problem and not able to do the commando force that make the call to gsm! :frowning:
How would the commando?

Regards

Please show us your dialplan and the verbose level 5 output from a call that is going wrong. As long as the dialplan indicates a realistic attempt to implement a solution based on the documentation, I’ll try to point out any remaining errors.

Hi ,

My ivr and this very simple and my problem and put the systema to resend the call to a mobile company !

[open]
exten => _.,1,Answer()
exten => _.,n,WaitExten(0.5)
;exten => _.,n,MusicOnHold(gsm)
exten => _.,n,WaitExten(5)
exten => _.,n,Background(bemvindo)
exten => fax,1,Dial(IAX2/iaxmodem)
exten => fax,n,Wait(2)
exten => fax,n,Hangup()
exten => _.,n,Dial(SIP/20014,60,tr)
exten => _.,n,Dial(SIP/20094,60,tr)

[from-pstn]
include => from-zaptel
exten => _.,1,Goto(ivr,s,1)

[ivr]
exten => _.,1,Answer()
exten => _.,n,WaitExten(0.5)
exten => _.,n,Set(CHANNEL(language)=pt_BR)
exten => _.,n,Set(TIMEOUT(digit=2))
exten => _.,n,Set(TIMEOUT(response=4))
exten => _.,n,GotoIfTime(09:00-13:00,mon-fri,,?open,s,1)
exten => _.,n,GotoIfTime(13:00-14:00,mon-fri,,?closed,s,1)
exten => _.,n,GotoIfTime(14:00-22:00,mon-fri,,?open,s,1)
exten => _.,n,GotoIftime(22:01-08:59,mon-fri,,?closed,s,1)
exten => _.,n,GotoIfTime(09:00-13:00,sat,,?open,s,1)
exten => _.,n,GotoIftime(13:00-00:00,sat,,?closed,s,1)
exten => _.,n,GotoIftime(00:00-23:59,sun,,?closed,s,1)

[closed]
exten => _.,1,Answer()
exten => _.,n,WaitExten(0.5)
exten => fax,1,Dial(IAX2/iaxmodem)
exten => fax,n,Wait(2)
exten => fax,n,Hangup()
exten => _.,n,Background(bemvindo)
exten => _.,n,WaitExten(0.5)
exten => _.,n,Background(encerrados)
exten => _numbergsm,n,Dial(DAHDI/7/${EXTEN},60)
exten => _.,n,VoiceMail(20014@default,u)
exten => _.,n,Hangup()

I’m fairly sure the documentation makes it clear that _. is a bad idea (it matches h, i, s, t, etc.)

Your open context contains two different priority 4s and 5s for the pattern “_.”. That should have produced an error message when the dialplan was loaded.

You use WaitExten but don’t seem to have any normal extensions in the same context to which it could direct the call - you will get a loop because “_.” will match anything that is dialed.

There is no priority 3 for “_.” in the night context. (n works relative to the previous line and does not take account of the pattern used.

I assume “numbergsm” means the digits of the GSM number. There is no need to use “_”.

For this line to execute, the missing priority 3 must be fixed, the caller must key in the exact number and must wait through all the second pass of all the announcements otherwise the call will be dropped without going to voice mail.

Voicemail will only be reached if the GSM call is attempted and failed. If any other number is entered, there will be no priority 7 in the dialplan and the call will stop after the second call to Background.

The Hangup is redundant.

Your original problem description didn’t call for the user to enter any numbers at all.

The second call to Answer is redundant. The first one may be needed due to not being able to use early media.

You have no from_zaptel context.

I don’t understand why you are delaying 2 seconds before hanging up an incoming failed fax call.

There may be errors of up to two minutes in the timing of your transitions, but I’d needed to refresh my understanding of time patterns, to be sure.

hi ,

Now i try to change to these one ! how do you thing ?
but now i have another problem hhen i call from my gsm i try press 1 but the call doesn´t go to extencion ?:frowning:

[open]
exten => s,n,Answer()
exten => _.,1,Answer()
exten => s,n,Background(bemvindo)
exten => s,n,WaitExten(0.5)
exten => 1,1,Goto(default,20015,1)
exten => 2,1,Goto(default,20094,1)
exten => 3,1,Goto(default,20093,1)
exten => 4,1,Goto(default,20014,1)
exten => 5,1,Goto(default,20093,1)
exten => 6,1,Goto(default,20091,1)
exten => 9,1,Directory(default,default,e)
exten => *,1,Goto(s,1)
exten => t,1,Playback(Voltesempre)
exten => t,n,Hangup()
exten => i,1,Payback(pbx-invalid)
exten => i,n,Goto(s,1)

[from-pstn]
exten => _.,1,Goto(ivr,s,1)

[ivr]
exten => _.,1,Answer()
exten => s,n,Set(CHANNEL(language)=pt_BR)
exten => s,n,Set(TIMEOUT(digit=2))
exten => s,n,Set(TIMEOUT(response=4))
exten => s,n,GotoIfTime(09:00-13:00,mon-fri,,?open,s,1)
exten => s,n,GotoIfTime(13:00-14:00,mon-fri,,?closed,s,1)
exten => s,n,GotoIfTime(14:00-22:00,mon-fri,,?open,s,1)
exten => s,n,GotoIftime(22:01-08:59,mon-fri,,?closed,s,1)
exten => s,n,GotoIfTime(09:00-12:59,sat,,?open,s,1)
exten => s,n,GotoIftime(13:00-00:00,sat,,?closed,s,1)
exten => s,n,GotoIftime(00:01-20:00,sun,,?open,s,1)
exten => s,n,GotoIftime(20:01-00:00,sun,,?closed,s,1)

[closed]
exten => s,1,Answer()
exten => s,n,WaitExten(0.5)
exten => s,n,Background(encerrados)
exten => s,n,WaitExten(0.5)
exten => s,1,Playback(Voltesempre)
exten => 939490061,Dial(DAHDI/7/${EXTEN},60)
exten => s,n,VoiceMail(20014@default,u)
exten => s,n,Hangup()

hi all,

Now i do these but the call hungup :frowning:

[closed]
exten => s,1,Answer()
exten => s,n,Wait(0.5)
exten => s,n,Background(encerrados)
exten => s,n,Wait(0.5)
exten => fax,n,Dial(IAX2/iaxmodem)
exten => fax,n,Hangup()
exten => 1,1,Goto(default,20015,1)
exten => 2,1,VoiceMail(20015@default,u)
exten => s,n,WaitExten(5)
exten => gsmnumber,Dial(DAHDI/7/${EXTEN})
exten => *,1,Goto(s,1)
exten => t,1,Playback(Voltesempre)
exten => t,n,Hangup()
exten => i,1,Payback(pbx-invalid)
exten => i,n,Goto(s,1)

regards,