1

We have a phone system created on pure Asterisk (no web GUI) and there are the usual Day/Night mode. In the day mode it calls a ring group. However we have a call centre that we use to pick up our calls when we can not for some reason.

To redirect the incoming calls to this call centre I'm currently send them all to my extension and from my phone I set a forward to the call centre.

The code is:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;This one is to send anyone who rings main line
;to [dial-groups] context
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
exten => 999999999990000,1,Goto(dial-groups-daynight,daynight,1)
exten => 999999999990000,n,Voicemail(7000,u)
exten => 999999999990000,n,Hangup
;;;;;;;;;;;;;;;;;;;;;;;;;;END;;;;;;;;;;;;;;;;;;;;;;;

Then:

[dial-groups-daynight]
exten => daynight,1,Set(COUNT=${DB(mir/daynight)})
exten => daynight,2,Set(CALLERID(name)=${CALLERID(num)} to:${CALLERID(dnid):-8})
exten => daynight,n,Gotoif($["${COUNT}" = "0"]?day)
exten => daynight,n,Gotoif($["${COUNT}" = "1"]?night)

;exten => daynight,n(day),Dial(${RINGGROUP600},6)
;exten => daynight,n,Dial(${RINGGROUP601},10)
;exten => daynight,n,Voicemail(7000,b)
;exten => daynight,n,Hangup()
exten => daynight,n(day),Dial(SIP/7006,6)
exten => daynight,n,Dial(SIP/7006,10)

So I just comment the lines that makes the call go to the ring group and force it to go to my extension and from my phone I set the forward call.

How could I make it instead of call my extension to call the external number? For example, a number such as: +44 77 8900 899890

I mean the: "exten =>" line to do that.

Adonist
  • 267
  • 1
  • 2
  • 10
  • 1
    Since you don't use a configuration generator (GUI) it's hard to answer with specifics. If you have created your own dial macro use MicelV69's answer below. If not, use roid's answer. (It's common for larger/sophisticated Asterisk users to not use a config generator - so that's not a criticism - just that if you roll your own dialplan you can only get a generic answer unless you share more details of your dialplan) – TSG May 29 '17 at 13:19

2 Answers2

0

You have to use DAHDI channel:

exten => daynight,n,Dial(DAHDI/0044778900899890)
Roid
  • 184
  • 7
0

Presuming you have a dial-plan with all your outgoing call stuff in a context called [outgoing] you could do something like this:

exten => daynight,n,Dial(LOCAL/0044778900899890@outgoing)

This takes advantage of whatever LCR you have, TOD routing, fail-over routes, etc.

Recommended reading: https://wiki.asterisk.org/wiki/display/AST/Local+Channel

MichelV69
  • 249
  • 1
  • 6