Yate on Rails
by Diana Cionoiu of Null Team at AMOOCON 2009
Abstract
“Run your ISDN PBX based on Yate in just 45 minutes” it’s dedicated for those that spent to much time to get this working.
Language: English
Additional material
Here you can find all available material for this talk.
PDFs
Audio recordings
Video recordings
- Small Version (22.91 MB)
- Medium Version (161.58 MB)
- Big Version (301.83 MB)
- Small Version (117.2 MB)
- Medium Version (333.29 MB)
The slides
There are 10 different slides. Click on them to view an enlarged version.
Transcript
Diana Cionoiu: The presentation I am going to give now, it’s going to be a short one. We’ll explain how to start with Yate . Most people are asking themselves, “Okay, I’ve heard about Yate. It sounds like a nice program.” But they have no idea how to start with it. So I’m going to give a presentation on how exactly to do the first users and to do the first looking, and since we are in Germany we are going to do that via BRI. So the first interesting thing is how to set up the ISDN Provider in order to get there.
This is a schema of what we want to achieve. What exactly we want to achieve is having the Yate PBX connected to the ISDN Provider, right? We want to be able to connect the ISDN line, and then to have two SIP phones connected to the Yate PBX. We’re going to do that in less than ten easy steps.
First of all, we use the wanrouter hwprobe verbose to see that we actually have the Sangoma BRI card recognized in our system. I guess most of you do know what Songoma is, or is there anyone that doesn’t know? Is there anyone here that doesn’t know about Songoma BRI cards?
[Pause.]
Okay.
Man 1: Um, that is not the B700, it’s the other one?
Diana Cionoiu: It’s the other one, yes. We got the B700 yesterday at the auction, remember? Yes, it’s the old card but they’re pretty much the same, it works in pretty much the same way.
So, we listed here the possible cards when you start the one CFG configuration from Sangoma. These are the parameters – what’s going on is that I’m going to take this presentation and put it on the web so you can see these same parameters again on the web, whenever you need it. So, the configuration is a bit complicated because you need to have the operation PRM Voice API, but once you have the presentation you will be able to copy. This card doesn’t have a Hard Record Councilor but it is not really necessary because on ISDM you don’t have the same problems as you have on other logic devices. Okay, we got to the point where we have the first span already configured; is there anyone that didn’t understand until here? [Pause.] Is there anyone that did understand? [Laughter.] Okay. Now, we are going to…oh dear, let me get this more readable. [Fiddles with the settings of the presentation.] Sorry, I didn’t realize it was going to be so bad, but I will fix it right away. [Changes more things.] Okay, now it’s more readable right? Now, let me explain to you a bit about how the PSPN logic works. Basically you have the driver, which is in this case a Songoma driver, and then in it you have the Harder Layer. The Harder Layer can be the interconnection with the Songoma card, it can be the interconnection with the Zupta card, it can be like an IP base protocol like a CTP, or it can be anything; on top of that we have the other protocols, like the logical protocols, like ISDN-BRI, ISD-BRI, SS7, analogic, RBS, and others. So, what we are going to configure here in the first level will be what is called the Harder Layer, and that would be on the tdmcard which is the driver for the BRI card, for those right now. That may change in the future, but right now this is how it works. So we’re going to configure the first link: here we have the ‘wanpipe1’ – that’s just the name, but we’re going to use it later on in the logical layer to refer to this section; we have the span, which is span=1; and we have the type, which has to be CPE because if we go back to our previous schema we find that the Yate PBX is actually a CPE to the ISDN-BRI Provider which is a network site, but I guess that everyone unstands better than I do. You live in Germany, I don’t. Okay, so it has to be the type CPE. Okay, so we got to the point where we’ve configured already the ISDN site to the Provider. What we haven’t done yet is configure the Softer Layer. Now, we ended up having the Softer Layer mostly because sometimes you want to use advanced protocol, so I guess like SS7, maybe on a one-point interface or a Zupta interface or an IP interface, so you need to have several links to put them together. So this is why it’s so complicated: it’s not because of the ISDN-BRI, but because of other protocols actually require this level of flexability. So, as you can see, we have the name ‘external’, which is kind of like some sort of context if you want, and signaling equals wanpipe1, voice equals wanpine1, which is the Harder link we have been using previously. And this is kind of easy for us to understand. And then you have you have the type: ISDN-BRI-CPE because the CP type, ISDN, actually modifies the electrical site – it has to get up whenever it receives phone-calls. And this is why we need to configure it on the Harder Layer and on the Softer Layer of the ISDN, because it’s a different protocol than it liked- well, not a different protocol, but a different site. So that’s why the type is ISDN-BRI-CPE. Okay, now this is the most easiest part: how many of you do know about regular extensions? Well, that means more than I do about regular extensions- I don’t know much about that, but I will try to explain as well as possible. So, in regexroute, which is- probably you are familiar with extensions counts- it is kind of an extensions count, but without going through the applications or anything like that, basically regexroute only does the dail application. So what we have here is a certain number of counts and then I have to set up a certain destination, and the destination has to be outside. And by outside, we actually mean this sig/\0. Here, I’ll use the pointer. [Moves to computer and starts pointer on screen.] Okay, so here is the actual destination, but you see after that link=external. That actually sets up where exactly, on which link the call is sent. So it is going to be sent on the Softer Layer: external. Does it make sense now? Did everyone understand? [Pause.] Are there any questions – I mean really.
Man 2:Not yet.
Diana Cionoiu: Not yet – okay. When you have questions, please interfere. Okay, and obviously these expressions are just used there to catch the phone, and to push it to the next level. Okay. Now, we have to configure now the phones. So what we have configured at this point is we have the ISBN card, which is on this side, we have the routing that every call that comes to a certain prefix it’s going to the ISDN Provider, and now what we want to do is when I’m dailing 200 I want to be able to receive the phone-call to the 200 SIP phone. Well, theoretically speaking, we should have some sort of routing to the 200-user, right? I mean theoretically speaking I should have something in regexroute, correct? Well that doesn’t really happen with Yate, because the rege-file is actually both a register module and a routing module. In Yate, different from other systems, routing, registration, and other operations that are done with the users are actually centralized. So, whenever you want to register a user – it doesn’t matter it is SIP or IS or HT3 or NT3P – it’s done exactly the same file. And you can do that in a file, or a database, or an even do it in a – I don’t know – an l-doc maybe. Or you can even push the request to an external application, and from that external application to do an http request – or whatever process. And we decided at some point that, if we are able to register the users and have this wonderful language – call it C++ – we can at least store the route temporarily; I mean, if the user comes to register I’m going to know his IP address, his port, everything about it. So I just store it temporarily there, it’s not necessary to make a certain request to send the phone through there – I don’t need to know his IP, I don’t need to know anything about it. So, I don’t really need that route. So the only file you need, the regfile, where you’re going to set up the section 200 and the actual password – and that’s all. It will just route to the phone 200. It’s not necessary to have anything else there. And, 201 – the same situation. So when we want to call 201, we just dial. That’s the only thing you need to configure. Questions?
Man 3: [Mumbles a question about extensions and different names.]
Diana Cionoiu: Yate stands for “Yet Another Telephoning Engine – that’s the first thing. Now, please remember the ‘telephoning engine’ at the end, because it’s really important in this case. Now, we do have some mechanics who use the files when you want to add users really fast, like regfile; but most people will not stop there – most people, if they want to do more than just play around, are going to use a database. Let’s be honest: everyone uses a database. Now, you’re going to put the users in the database, and in the database you are able to put any name of the user because Yate is also able to do routing in real time from the database. So, then it doesn’t matter what user you have because the only thing that matters is how you do your queries, because Yate lets you do your own queries in a separate called a distant format – let me show you that. [Opens new window on screen.] So, the first thing we want to use, if we use the database, is to be able to authorize the users. That’s the first thing we want to do, because we want them to be able to make phone-calls and to register. Now, in the most used protocol, which is SIP – registration and authentication are two different things. So we have two sections, one for authentication and the other is for registration. And, then you can see that I have a call-route here. Now, if I go down – let’s go to the user authentication. So you have your own query. You just need the first possible from the database. And…that’s pretty much everything. As you can see here, you have the dollar ($) and – I don’t know what this is called in English, after the dollar.
Crowd: Bracket..Parenthesis.
Diana Cionoiu: ‘Bracket, unsername, bracket.’ That’s actually a variable. So, Yate carries the information from the telephoning channel to the routing module, and the task – and you can use those variable in your own queries. I don’t know anything simpler than that – so basically, every parameter, every heater you get in site, you can just push it to use it for authentication or routing or anything else. I can’t imagine a more flexible system than that, but probably someone will make something better at some point. The same goes for user.register. You need to update the table because you need to write the location into the database. As you can see here, you have location to update that because that information also comes from the protocol. And that data is stored in your database, and you can query that database from a web interface – to see your user site, for example. And as you can see here, you actually see that location there so you can play around as much as you want to do what exactly you want there. Here, we go to the core.route – now, this is the moment when we actually route the core. Now, we sub the location – this location has already been written there by this registrar. And we can also modify the name of the variable from the result parameter; you can have anything there, but basically Yate is always based on the name of the columns. When you do a query in a database, you get the name of the columns in an expected way from Yate. But on the other hand, if – for example – you get a column called ‘formats’ you can modify the formats of a certain phone-call from the routing stage. For example, I get a fax phone call – and then instead of sending back or going white, or God knows whatever else that would complicate system, I just answer back with the format, which is G7-11, which will allow me to do a fax call. Because obviously G7-9 will not let me do a fax call. So I can control any parameter of the phone-call from the routing stage, from an external source – which is the database in this case. Does that answer your question? Okay. Any other questions? [Long pause.] Alright, I guess there are no more questions. I will still be around here and available. So thank you very much guys-
Man 4: How many developers are there working on Yate?
Diana Cionoiu: Five. Well, five that are in our company, and there are external developers – like, for example, the interfaces have been written by someone in Poland- and there are also other projects based on Yate, where Yate is just used as a developing agent and they do things around Yate – like Lukes-voice, and there is also the Data-and-collable Arachin, I believe. So there are several other products based on Yate. We can’t really count how many developers there are because, obviously, the main list is filled with questions by developers, but we can’t really count how much they work while they are external. The problem is that they get their stuff done, and then they disappear for a while – it’s a fluctuation. But for example, the conference, May ‘08- which was probably the best conference in the open-source world – we did manage to make a conference with 70 people, with basically no cp load. That was conjugated by someone in Australia in 2006 called Andrew McDonald; and then, I stored just two more messages from him, and they disappear. So I do consider him a contributer. You know, it’s hard to count. Okay, and by the way – Yate does PBS features. Okay, thank you very much and if you have any other questions I’m around.