Configuration Dialplan

Hello I registered my trunk sip correctly. Now I need to configure the extensions.conf file. I would like external calls to arrive on my queue that I called [technical support] for that I created a context [queues]. [from-external] is the context of my sip trunk. As soon as the person arrives on my trunk sip. I would like them to see a welcome message then a message telling them that this call can be listened to or recorded, to refuse type # otherwise the call is recorded automatically then the person arrives on the queue with music until you have someone on the line. I also tried to set my opening or closing hours to send calls directly to voicemail but suddenly the result is not good I had GoToIfTime . then at the end of the call I would like to put an IVR to receive a note infact I ask the person on a scale of 1 to 5 how was the call the person answers for example 5 and the waiter answers with thank you and See you then hang up. I also have a problem with incoming calls. I’m using context [from-internal] jet can’t call outside. Can anyone help me find solutions?

[from-external]
exten => _100X,1,Answer
same => n,Set(CHANNEL(tonezone)=fr)
same => n,Set(CHANNEL(language)=fr)
same => n,MixMonitor(/var/spool/asterisk/monitor/${UNIQUEID}.wav,b)
same => n,Set(CDR(recordingpath)=/var/spool/asterisk/monitor/${UNIQUEID}.wav)
same => n,Dial(PJSIP/${EXTEN})
same => n,Voicemail(${EXTEN})
same => n,Hangup

exten => 888,1,Answer
same => n,Set(CHANNEL(tonezone)=fr)
same => n,Set(CHANNEL(language)=fr)
same => n,VoicemailMain(${CALLERID(num)})
same => n,Hangup

exten => 1188,1,Answer()
same => n,Wait(1)
same => n,ChanSpy(PJSIP/,q)
same => n,Hangup
include => queues

[queues]
exten => 1000,1,Answer
exten => 1000,2,agi(googletts.agi,“Bonjour et bienvenue chez XXXX !”,fr,any)
exten => 1000,3,agi(googletts.agi,“Un de nos conseillers va prendre votre appel.”,fr,any)
exten => 1000,n,Queue(support-technique|t|||30)
exten => 1000,n,Voicemail(101)
exten => 1000,n,Hangup

[from-internal]
exten => _100X,hint,PSIP/${EXTEN}
exten => _100X.,1,Set(CALLERID(num)=XXXXXXXXXXXX)
same => n,Dial(PJSIP/${EXTEN}@register,)
same => n,Hangup
include => queues

exten => s/0XXXXXXXXX,1,GotoIfTime(09:00-12:30|mon-fri||?open,s,(dial1))
exten => s/0XXXXXXXXX,s,Goto(support-technique,1000,2)
exten => s,n,GotoIfTime(13:30-17:30|mon-fri||?open,s,1)
exten => s,n,Goto(closed,s,1)

In regards to your problems dialing out of your system, the context from-internal, only contains rules for numbers 1000-1009, you’ll need to setup a route/rule for calls to your external numbers. I live in Denmark, all our numbers are 8 digits, beginning with 2-9. A simple dialplan handling these calls could be

exten => _NXXXXXXX,1,Dial(PJSIP/${EXTEN}@SIPProviderEndpointName)

For handling inbound calls, I assume you have a fully valid public phone number, that people dials. Lets say I have the number 37112233, as my public inbound number, I would need something like this, in my “from-external” context.

exten => 37112233,1,Answer()
 same => n,Playback(tt-weasels)

Your current “from-external” context allows calls to the numbers 1000-1009, 888 and 1188, all of which, are usually either internal extensions (1000-1009) or public service numbers (888 and 1188).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.