FreePBX 101 v14 Part 11 – Outbound Routes


Welcome to crosstalk solutions: my name is Chris, and this is free. Pbx, 101 version. 14. Video 11. I think 11, where we’re gon na be talking about outbound routes.

First and foremost, sometimes I’m gon na say routes. Sometimes I’m gon na say routes. I get those mixed up. I use them very interchangeably, so just just deal with that, but in our last video we talked about all the different types of SIP trunking. Now in this video I can’t go through and show you how to set up all of the various types of SIP trunking available.

But what I can do is show you how to set up vitality, which is the one that I use. So we personally here at crosstalk use vitality for all of our business phones. My main phone here is on a vitality, sip trunk, they’re, very, very good, and if you guys are interested in signing up for vitality, I will have a link down in the comments below you can sign up for vitality, SIP trunking and if you sign up for Vitality, SIP, trunking and then email me at info at crosstalk solutions com. I will send you a PDF that shows you exactly how to set up either sip based or IP based authentication with vitality, SIP trunking. So it takes all of the guesswork out of it, because one of the hardest things that you can do in free PBX is try to figure out how to properly implement a SIP trunk, because there’s so many little options.

You’Ll see what I’m talking about when we actually set up the vitality trunk and the problem is that a lot of SIP trunking providers, including vitality, actually don’t give really great documentation on how to set up their systems, their SIP trunks, with free PBX or even with Asterisk in general, so once you find a provider that does give good documentation that regard or if you figure out how to set it up for the SIP provider that you’re using that’s always a really really good thing. So I love vitality and again, I’ve set them up with IP based authentication. I’Ve set them up with user password authentication. For our example. Here we’re going to be doing a vitality, sip trunk with username, slash, password, authentication, okay.

Before we get into that, though, I did want to talk about the other two types of trunking and where you can set those up. If you have a PSTN card in your server, so that’s either a pots card and fxo pots card or a card for a PRI PRI line. So to get to those you want to go to connectivity and then dot e config. Now I don’t have any cards in my system, however, if you did a digital card, such as a PRI card, should show up in this list here and then an analog card that has FX, o or FX s. Ports is going to show up here in the analog hardware tab it’s a little weird the set up, but basically what you have to do is you have to come over here.

What I like to do is just click on global settings and then hit save, and when you do that, you don’t have to actually change any of the settings. But you’ll get this thing here. That says, for your changes to take effect, click the restart dot e & asterisk button. Below now, dot e is the analog and digital card driver that works in conjunction with asterisk in the backend. So what we do now is we hit, apply, config and then again it reminds us don’t forget to restart dot Ian asterisk after this completes, so we’re gon na, say: ok, it’s gon na restart configs or apply the configuration and then once that completes we can click.

The restart dotty an asterisk button right here and then that sort of resets all of the backend services, with the new configuration for what free PBX detected in your server. So again, if you had a PRI card, it’s gon na set up the dotty drivers for that PRI card, and then this reset right now is going to apply those drivers so that that PRI card will be in use. Ok, so that’s how you would set up an analog or digital trunk in the system. Let’S now set up our SIP trunk in the system and to start we’re gon na pop over to my vitality web interface, so it for most SIP providers. There’S gon na be a web login.

Where you can log in you can set up your 11-1 address. Typically, you can initiate number porting you can set up, you know, call forwarding settings and things of that nature. The documentation that I have for tality covers all of those types of things again sign up through vitality. I will send you a PDF that has all of that information. So what I’ve done here is I’ve added a sub-account so in vitality terms, a sub-account is basically a different, registered username and password.

So you can set up multiple sub accounts, with a single vitality account, for instance, if you had multiple locations and you wanted each location to have their own phone numbers and their own billing, you can do that separately in vitality. It’S a really nice portal, so I’ve set up this sub-account here cross underscore free PBX, 101, and so we’re going to use the username and password for that sub account over in our free PBX and here’s a look at the the vitality sip trunk setup that we’re Going to be basing this off of so this is vitality, sip trunk registration method and then here’s. How do you create the sub account set up international dialing set up your auto fill right. So when you run low on credit, it’ll automatically deduct from your credit card. Another 20 bucks or whatever, how to add phone numbers etc.

But if you scroll all the way down, we get down here to setup, vitality, SIP trunks with free, PBX, okay. So the first thing we want to do is go back to the free PBX dashboard and we want to go to connectivity, and then we want to click on trunks. We’Re gon na. Add a trunk and we’re gon na add a new chance if trunk, okay, so for the trunk name, we’re gon na call this vitality inbound, so we’re gon na set up an inbound and outbound trunk, but we’re actually only going to set up an outbound route in This video, the next video we’ll do the inbound route. Okay, so outbound caller ID.

Let’S go back to vitality and let’s grab my phone number here we go so I’ve got this number two, eight three: zero, six, five one! Now I’m putting this here, even though this is the inbound trunk, I’m still putting an outbound caller ID just because if you don’t put the outbound caller ID you’re gon na get an error message which might confuse some people. So I’m gon na go ahead and put the outbound caller ID, even though Technic this particular outbound, caller Ids never going to be used with vitality and every sip trunk provider is is different, but with vitality you set up a separate SIP trunk for the inbound side And for the outbound side of your calls, some sim providers have that combined where there’s just one SIP trunk for both inbound and outbound and again, vitality is just a little bit different in that way. It doesn’t really matter. It’S just a little bit just one extra step as far as the setup goes so for the rest of the stuff down.

Here we are just going to leave this default. We’Re also not going to change anything in the dial number manipulation rules, tab, we’re gon na be setting up our dial plan later when we actually create our outbound route. But then, if we click on sip settings here we have two tabs outgoing and incoming. So for the truck name, we’re gon na say if I tell inbound that can actually be whatever you want it to be, but it should be one sort of string right, so I’m doing by towel inbound. It keeps that as one string, you can’t have a space in there and then for the pure details, I’m gon na pop back over here and we’re going to copy all of this information under peer details.

So again, this is my full documentation. It shows you everything that you need to type in. All of these fields makes your life super easy. We’Re gon na hit paste there, and so we have two things to replace the sub-account name, which is cross underscore free, PBX. 101.

That’S the sub-account name that I set up in my vitality portal: that’s my user name and then for the password. I’Ve got it over here copy that and then we’re going to paste that over here. So I’m gon na show the password in this video because I’m going to change the password as soon as I’m done filming this video. So don’t try to use my password and then for the host right now it says: inbound 17 dot, byte ality net. That’S going to be dynamic based on your own vitality account.

So if you go back to vitality over here and if I go back to my sub accounts here, we can see that my register server is found. Eight, that vitality net, that’s for inbound or for registering, and then my outbound server, where I’m sending calls to on the outbound side we’ll get to that in a second is outbound dot by talonnet. But the important thing here is inbound: eight dot vitality net. I’M gon na copy that come back to free PBX and I’m gon na replace this host with inbound eight dot by tality net and then, if I click on the incoming tab, I can get rid of all of the junk. That’S in the user details and now I need to create a register string, which is basically a string that says, use this username and this password to register to this fully qualified domain name, which is the inbound eight.

Whatever was that byte ality net so use its username cross, underscore free PBX 101 colon password paste that in there at inbound, eight dot might allottee net 5060 because we’re gon na be telling it use port 5060. Okay, once you’ve entered the register, string, go ahead and click Submit and then apply. Config, okay and now we’re gon na do the same thing. We’Re gon na create another trunk. This time we’re gon na, create our outbound trunk, so we’re gon na say add trunk chance.

If trunk we’re gon na call this vitality, outbound caller ID is gon na be the same caller ID. Let me copy that number now, this time we are going to use the caller ID. So what you put in this field here is what is actually going to be out pulsed, along with your SIP trunk. It should typically be a phone number that is ringing inbound on that SIP trunk, but in a lot of cases you can actually set this outbound car ID to whatever you want and it it’ll work. I don’t remember if it works with vitality or not, but in a lot of cases you can spoof whatever phone number you want, okay, so for maximum channels.

This is how many concurrent calls you want on this channel. Now I’m just gon na say ten and the reason that I’m putting anything in here at all is that I know for my purposes. I’M never gon na go over ten concurrent calls and I don’t ever want a situation where someone potentially compromises the server and then blasts a whole bunch of calls out at once. So it’s more like a safety net where I’m saying look, that’s more than I’ll ever use, but I want to set something there so that someone can’t compromise the server and then you know flooded outbound with calls costing me money. It sort of puts a little bit of a limiter in place.

Okay, so we’re also gon na skip the dialed number of manipulation rules here, we’re gon na go over to sip settings and then for trunk name, we’re gon na say if I tell outbound and then for the peer details once again, I’m gon na copy and paste From my handy-dandy document here copy that come over here and paste that, and then we have a couple of fields that we need to replace. So the host is already good, we’re sending calls to outbound vitality net, but we need to set our sub-account name, which is our username cross, underscore free, PBX 101 copy vex. I need to put that in in one more place, which is right here, the from user and then the secret is once again going to be our vitality, password. Okay, on the incoming side, we can just delete all of this out, and now we can click Submit and apply config. Now after we apply config, we’re gon na check the status of these trunks, just to make sure that they’re registered we’re only gon na see a registration on the inbound trunk, because that’s the one that we actually use the registration string and the username password at fqdn.

However, the outbound truck is going to show up as a peered connection, meaning that we’re appearing with that we’re just sending all calls to this vitality peer, okay, so that is done now. We’Ve created our trunk, but keep in mind that we actually haven’t done anything with the trunk. Yet right so we’ve created the trunk. That’S part one: now we need to actually tell the system to use that trunk, both inbound and outbound, and that’s what we’re gon na do next, which is setting up the outbound route okay, to check if that trunk is registered, we’re gon na go to reports asterisk Info and then we’re gon na click on registries, and here we can see inbound eight talonnet is registered, so we are good to go next, we’re going to create our outbound route. So let’s go to connectivity and outbound routes.

So basically, what we’re creating now is we’re. Taking that SIP trunk that we set up and we’re saying here’s how we’re gon na use that SIP trunk outbound right. So these are the rules that we’re putting in place so that when a phone dials certain dial patterns, it’s gon na use that trunk going outbound. Now this is gon na be a very, very simple setup to keep in mind that you can get incredibly granular with your outbound routes. You can have local calls, go down, one SIP trunk or out your poss lines or something like that and then long-distance calls go out.

You know different SIP trunks or the PRI, or something like that right. You can also have primary secondary and tertiary outbound routes for every single one of your dial patterns. So what we’re gon na do is a very simple dial pattern. This is going to consist of two things. It’S can consist of an emergency route which is going to be for 911 sea dialing, and it’s going to consist of our standard outbound dialing patterns.

Anything beyond that. You know you can contact us for assistance with more complicated dial patterns. Okay, so connectivity outbound routes, and then we want to click on, add outbound route. So for the route name. This is going to be our emergency route first, so we’re gon na call this emergency and I always recommend creating an emergency route, because you want to make sure that any calls that someone dials, you know picks up the phone and dials 911.

You always want to be very, very sure that that 9-1-1 call is going out with a very specific caller ID that has an e 9-1-1 address associated with it, meaning that, when someone calls 911, the authorities that respond are gon na come to the correct location. Now, there’s a lot that you can do in free PBX. If, for instance, you have people that work at home, that might have different 9-1-1 addresses, or if you have multiple branch offices, where each branch office has different 9-1-1 addresses, there’s a lot of different things that you can do here to mitigate that and to make sure That when someone calls 911 any phone in your entire infrastructure, the police or the fire department or whomever, are going to show up to the correct address. It’S very very important that you spend the time to get that right, because in an emergency, if someone calls 911, the cops don’t show up, it could be a life-and-death situation, so take the time to do emergency be 9, 1, 1 dialing correctly. Okay!

So for our route, caller ID we’re gon na grab our phone number, it’s easy in this case, since I only have this one phone number that I’m putting on the system and then we’re gon na set this to an emergency route. Now the reason that we do that is that this allows this allows the outbound route to take advantage or to be flagged if you will as an emergency outbound route. And now, if you go to an extension details. So let’s say I have this extension and when I dial out of this extension, I’m dialing with a completely different phone number than my main phone number. Then my 9 1 1 number.

So if I set this as an emergency route, it doesn’t matter what caller ID is out pulse from the phone. When I dial nine-one-one it’s going to take the emergencies caller ID right. So that’s very important that you set the emergency flag. So then we’re gon na scroll down it says truck sequence for matched routes and we’re just gon na choose our vitality, outbound trunk. Now for a 911, I would certainly recommend you have a backup trunk if possible.

In our case, we only have one trunk that we’ve set up for outbound, so we’re just gon na choose the one outbound trunk, next, we’re going to click on dial patterns and then we’re just gon na use the dial patterns wizard. So if you click on this, it gives you a bunch of different wizards that you can pre-populate we’re gon na uncheck, the 7 digit and the 10 digit, and we’re only gon na leave us emergency. So we’re gon na go ahead and generate routes, and now we have a whole bunch of different routes. We’Ve got nine one, one, nine three, three, nine three three is actually a test: 9-1-1 phone number that’s used in a lot of places in the country, but not everywhere, so I usually just delete that one and then we have a whole bunch of different dialing variations Of nine one, so these are all prefixes one, nine hundred nine nine, eleven or nine one nine eleven right. So if anyone does any of those things, the prefix is going to be stripped out and is just gon na, send the digits nine one one.

So, let’s stop for a second and let’s take a look at all of these different fields that we have here. So the main three that we need to deal with are the match: pattern: the prefix and the prepend. Okay. So four match pattern: if you just want to say, if someone dials 911 one send it out and match it and send it out, then that’s what you just put right here. The prepend is four digits that you are stripping off of the dial string.

So, in this case, if someone picks up the phone and they dial one 9-1-1 well, we know that you don’t dial one 911 one, so we’re gon na strip off the one and we’re just gon na push through 9-1-1 same thing, with nine and same thing, with Nine one because a lot of people, you know they use nine to dial out something like that and they might you know: emergency dial, nine, nine one one right. So we wanted to strip out the extra nine prepend we’ll get to in our next style pattern. We’Ll be using that a little bit more, but basically, prefix is stuff that you want to pull off of a dialed number and prepend is stuff that you want to add to a dial number okay. So we have I’m happy with this dial pattern. The other thing that I always do when I’m setting an emergency route is, I come over here to additional settings and I force call recording on any 9-1-1 call because you always want to have that call recorded okay, so we’re gon na say, submit and apply config Now we’re gon na add another outbound route.

I’M gon na call this one our default outbound route. This is basically the outbound route. That’S going to be used if it doesn’t really match anything else right, so we haven’t specifically diverted dial patterns, one way or another. This is going to be the default dial pattern in the system, so the route name we’re gon na call this default. The route caller ID is going to be that same phone number.

We don’t need to set any sort of emergency flag on this one, since it’s just a standard, outbound route, but the truck trunk sequence for matched route is going to be by tality, outbound, okay, next we’re gon na click on dial patterns and we’re gon na use. Our dial pattern wizard again this time we’re gon na uncheck us emergency, but I’m gon na add in so we have seven digit, 10-digit dialing, we’re gon na add an eleven digit dialing, and I also like to click this long distance, which is actually just another 11 Digit dial and then we’re gon na say, generate, and now we have these dial patterns here: okay, with nothing prefixed and nothing prepended. Now for the prefix, if you wanted to dial 9 to get an outside line like old school legacy phone systems, you would put that here: nine, nine, nine, nine! Okay, we’re not going to do that! We’Re just going to dial Direct!

We don’t need to dial nine in our phone system. So here’s our pattern, so here’s seven digit dialing now a and n is any number one through nine and an X is any number zero through nine okay. So for seven digit dialing, you can’t start with a zero. So that’s why we have n xxx xxx, seven digits, 10-digit dialing. We have n xx, that’s the area code, followed by our seven digit dial pattern and then eleven digit dialing is 1 xx.

So one area code and then a seven digit phone number and we have two of those I’ll show you why, in just a second first though, we want to prepend some stuff. So with sip. There is no really like local dialing right with SIP and actually with a lot of pots lines. Even these days you have to dial ten digits or eleven digits. Most of the time it’s going to be eleven did it so my area code is five for one.

If someone picks up the phone and dials seven digits, I want to prepend one five, four one, two, the seven digits that they dialed, so I’m gon na put in the prepend field, one five, four one: okay, so then we have ten digit dialing. Now, most SIP trunks will accept 10 digit dialing out of the box no problem. However, I always like to just automatically set everything to 11 digit dialing. So, instead of 10, the user can dial ten digits, but we’re going to take their ten digits and we’re gon na prepend a one to the front of their ten digits for the eleven digit dial string. We don’t need to do anything right because it’s all set and ready to go.

So then, why do we have two of these eleven digit dial strings? Well, the second one that I always put in here is I put a plus in the front of it. So we put a plus character in front of an eleven digit dial string. The reason that we do – that is some phones. I believe yaling phones do this.

Maybe some other phones, not sangoma phones, but I always put it in just in case just to cover my bases when you’re on a phone and you search through your history and you hit redial, some phones append a plus to that redial string. Okay. So if you don’t have this plus and then the eleven digit dial pattern, it’ll go to lalala and it won’t actually dial out. So I always put this in just in case now, there’s a couple of other things that you might want to add. So if we go back to our dial pattern, Wizards, let’s uncheck these and then let’s do us information and hit generate routes.

Now that adds to one one, three, one, one, four one, one, five one one, six one one, seven one one: okay! So, basically, again we’re just covering our bases, for whatever someone might happen to dial. Of course, you do want to make sure that if you dial for one one or six one one that will actually go somewhere, it doesn’t always go somewhere all the time. But here’s an interesting thing that you can do is like, for instance, here’s four one. One and sometimes there’s like toll-free four one, one services, I’m not sure what it is like 800 for one one, one one one one either.

That’S we’ll just pretend that that’s the number, if you wanted to redirect anyone who dials information to a different toll-free information service, we would do it like this. They dialed for one one we’re gon na strip for one one from the digits and we’re gon na prepend. 1-800, for one one one one one one again, I don’t know if that’s a real number, I’m just using it as an example, but here we have stripped out what the user dialed and we’re replacing it with our own phone number. So you can do that for anything like, for instance, here in the United States we have what’s called nine seven six numbers right, so nine seven six numbers are basically like you’re. You know you’re dirty you’re, dirty numbers, right, porno lines and stuff, where it’s a pay per minute charge and sometimes there’s scams where you know someone will hack your phone system and then place a bunch of calls to their own 976 number and charge you per minute.

For all of that usage, so what you can do to prevent something like that is you can go up here and you can say if someone dials one 976 and X X, X, X, X with those uppercase. So that’s basically 1 976 area code and then any seven digit phone number we’re going to strip out all of those digits, 7 6 and XXX XXX and then we’re going to prepend say you know, 0. Whatever anything you know, just the operator right, we’re just gon na pretend something else: we’re basically not allowing them to dial that number at all. Okay, I’m gon na delete that one though okay so hope that makes sense and then again we’ve got if you want to import export your dial patterns, you can do that here and the last tab is our additional settings where you can choose to record that call Or not, there are also some other features that might show up in additional settings, depending on the commercial modules that you have installed. So a good example of that is dial patterns, permissions right so, for instance, a very common scenario for businesses is that I will create a third dial pattern, that is, for international dialing.

In fact, let me go ahead and do that. I’M gon na save this one and we’re gon na add a new outbound route. We’Re gon na call this International same caller ID outbound it’d be master out, is going to be vitality, outbound and then for dial patterns. Let’S use our wizards again. Let’S get rid of everything, but we’re gon na put in US International generate routes, and then we can see the route that it generated is 0.

1. 1.

So that means any call that starts with 0 1 1 and then the dot means any string of digits beyond 0 1 1. So that’s where we’re matching and then again in a lot of cases. What we would have here is a either a pin set where you have to dial a pin code in order to use this outbound route, or you can have permissions where, like extension, mm, can use this outbound route.

But extension 2001 cannot use that outbound route if they try to dial international it just will go nowhere and that stuff that you can do with some of the additional commercial module add-ons. If you have any questions about that stuff contact us at info at crosstalk solutions, comm we’re happy to walk you through what commercial modules you might or might not need for your own free, PBX. Ok, so that about! Does it I’m gon na submit and apply that and then let’s go ahead and make a test call one more thing that I just noticed here is that it put the International route above my default route. So if you want, you can always move these around right.

So it’s gon na try to dial these it’s gon na try to match patterns in order, so, for instance, if I put default above international or if I had, if I had plans that sort of overlapped with each other, it’s gon na process them in the order That they are sorted right here, so if you sort them around, you just have to hit apply config, and then it takes that. However, you last sorted them. Okay, so let’s go ahead and make an app phone call welcome to crosstalk solutions. My name is Chris and you’ve reached my IVR. If you know your party’s extension, you may not check section, oh yeah, so we have two-way audio and the outbound calls are working.

Just fine, okay hope you guys enjoyed this video in our next video, we’re gon na talk about inbound routes and how to call that phone number and actually have it ring on this phone okay. So my name is Chris with crosstalk solutions. If you enjoyed this video, please give me a thumbs up and if you’d like to see more videos like this, please click Subscribe. Thank you so much for watching you

You May Also Like