Currently I'm porting asterisk general purpose OS, but these are heavier OS, so is there any way that we can port asterisk in Real Time OS(RTOS) e.g. rtxRTOS
Sure you can, but likly you have rewrite like 10%.
You can use linux-preemtive kernel and start asterisk with realtime priority(see asterisk.conf.sample)
Yes,i know, it is not really realtime, but close.
Related
I am currently migrating a switchboard asterisk from sip to pjsip
And I find something new, you can use different protocols like udp,tcp,tls,ws,wss....
I wonder what protocol is better and safer...
I understand that tls i wss are safer
Currently I only use udp and it seems that everything works fine, But I can also make it to work with every one at the same time.....
I would like you to help me understand what is the use of these protocols and if I would have to use some specific.
Regards,
TCP better if you have bad network(like 3G mobile) or complex NAT. UDP faster setup and most common.
TLS if you need encryption. WSS is for webRTC/websocket(call from browser).
I'm not satisfied with some algorithms of TCP, and i know it's not possible to implement TCP in UDP. But i want to make a compatible layer with others server which relies on traditional TCP.
So i ask, can i manipulate IP directly on Linux or other *nix OS?
I know udt and other similar projects. I just need to keep the compatibility so that i don't need to do much works for so large amount of servers.
If you want to remain compatible with other endpoints wich implement standard TCP then I assume you want to use the same protocol on the wire and make incremental improvements to it.
Your kernel's existing TCP implementation is in the kernel. If you want to improve it, I would say you had better make changes there rather than reinvent it. If you want to reinvent it and implement a whole TCP stack in userspace, then, sure, you can do it, but it's going to be A LOT OF WORK.
I want to develop an application to encrypt voice calls on the fly. Is it feasible?
which programming language should be preferred for symbian O.S
It has already been done: http://en.wikipedia.org/wiki/Skype_security
To implement it, you would need a fast language (a delay of no more than maybe 10 milliseconds, because you still have network latency to deal with) so something like C or C++, maybe Java when used with JIT. Check out Java SE Security Package for simple SSL connections.
Of course, the easy way to do this would just be an ssh or VPN tunnel.
I'm trying to setup an IVR or to be more specific an automated attendant using Asterisk. I don't want anything fancy besides the simple automated menu system, and instead of dialing an extension (for now) just ring the same phone line (POTS) if pressed 1 or play a recording if pressed 2. The server running Asterisk will be in a remote location.
My questions are:
Is this setup doable?
Do I need to sign up with a IAX VOIP
provider? (no VOIP calls will be
made/received) Only normal POTS calls will be made. (possible in other country)
What hardware do I
need? Remote server side and client-wise
(POTS phone line)
Any comments will be appreciate it.
Thanks
This is definitely doable, however, it seems that your specifications need to be modified a bit. Here are some things to consider:
What type of PSTN connectivity will your remote Asterisk server have? (SIP / POTS / T1 / PRI / etc.)
If your remote Asterisk server is going to be using a physical medium, do you have the connectors and hardware in place? EG: If you are using a T1 line, do you have a channel bank or T1 card?
Are you comfortable with Asterisk dialplan / AGI / AMI, or are you going to use an Asterisk distribution like trixbox, AsteriskNOW, Elastix, etc?
Will your client location (with the POTS line you wish to ring) have a PBX, or will it just be a typical POTS line hooked up to an analog handset?
My recommendation to you:
Get a cheap server (any 1U with a dual core processor and 512MB of RAM will do), and put it at your remote location.
Load Asterisk 1.6+ onto your server. I recommend 1.6+ as it can use the dahdi_dummy driver as a reliable software timing source (it will ensure that your audio quality is not choppy and broken).
Get a SIP account with a reliable SIP provider. My personal favorites are: flowroute and voipms.
Set up your new SIP account in Asterisk, and purchase a DID (phone number). This phone number will be your business phone number, the one that you give out to clients and put on business cards.
Configure your Asterisk dialplan to receive calls from your SIP account to your IVR menu.
Your IVR menu logic should be something like:
a. Play the IVR menu.
b. Wait for a keypress.
c. If the user dialed '1', then make an outgoing SIP call to the POTS line phone number you want to reach. If the user dialed '2', then playback the recorded message.
Now, if you are looking to save money, and have the most cost-effective setup for your remote IVR, I would recommend throwing up a second Asterisk server on site at your client location (where the POTS line comes in), and throw away the pots line and just setup an IAX2 trunk between your client location and your hosted server location. This way, when calls come in to your remote Asterisk server via your SIP provider, you can route the calls (when the user hits option 1) over your IAX2 trunk, directly to the client location for free!
Depending on your skill level, and comfort with Asterisk, this could be either a really fun learning experience or a confusing nightmare. If you would like to learn more about telephony and Asterisk, especially if you are going to use it for your business, you may want to use a simple (free) Asterisk distribution like: trixbox CE, Elastix, or AsteriskNOW.
You could code up a simple IVR in less time than it takes to install Asterisk if you use a hosted service like Twilio or Tropo. I'm partial to Twilio myself.
Edit: here's an example of a simple phone menu.
Quick answers to your simple questions:
this setup is doable.
no, IAX is not neccessary
some hardware setups are listed in wiki
I think you should start with wiki and free Asterisk book
I'm making a network game (1v1) where in-game its p2p - no need for a game server.
However, for players to be able to "find each other", without the need to coordinate in another medium and enter IP addresses (similar to the modem days of network games), I need to have a coordination/matching server.
I can't use regular web hosting because:
The clients will communicate in UDP.
Therefore I'll need to do UDP Hole Punching to be able to go through the NAT
That would require the server to talk in UDP and know the client's IP and port
afaik with regular web hosting (php/etc) I can only get the client's IP address and can only communicate in TCP (HTTP).
Options I am currently considering:
Use a hosting solution where my program can accept UDP connection. (any recommendations?)
UDPonNAT seems to do this but uses GTalk and requires each client to have a GTalk account for this (which probably makes it an unsuitable solution)
Any ideas? Thanks :)
First, let me say that this is well out of my realm of expertise, but I found myself very interested, so I've been doing some searching and reading.
It seems that the most commonly prescribed solution for UDP NAT traversal is to use a STUN server. I did some quick searches to see if there are any companies that will just straight-up provide you with a STUN hosting solution, but if there even were any, they were buried in piles of ads for simple web hosting.
Fortunately, it seems there are several STUN servers that are already up and running and free for public use. There is a list of public STUN servers at voip-info.org.
In addition, there is plenty more information to be had if you explore SO questions tagged "nat".
I don't see any other choice than to have a dedicated server running your code. The other solutions you propose are, shall we say, less than optimal.
If you start small, virtual hosting will be fine. Costs are pretty minimal.
Rather than a full-blown dedicated server, you could just get a cheap shared hosting service and have the application interface with a PHP page, which in turn interfaces with a MySQL database backend.
For example, Lunarpages has a $3/month starter package that includes 5gb of space and 50gb of bandwidth. For something this simple, that's all you should need.
Then you just have your application poll the web page for the list of games, and submit a POST request in order to add their own game to the list.
Of course, this method requires learning PHP and MySQL if you don't already know them. And if you do it right, you can have the PHP page enter a sort of infinite loop to keep the connection open and just feed updates to the client, rather than polling the page every few seconds and wasting a lot of bandwidth. That's way outside the scope of this answer though.
Oh, and if you're looking for something absolutely free, search for a free PHP host. Those exist too! Even with an ad-supported host, your app could just grab the page and ignore the ads when you parse the list of games. I know that T35 used to be one of my favorites because their free plan doesn't track space or bandwidth (it limits the per-file size, to eliminate their service being used as a media share, but it shouldn't be a problem for PHP files). But of course, I think in the long run you'll be better off going with a paid host.
Edit: T35 also says "Free hosting allows 1 domain to be hosted, while paid offers unlimited domain hosting." So you can even just pay for a domain name and link it to them! I think in the short term, that's your best (cheapest) bet. Of course, this is all assuming you either know or are willing to learn PHP in order to make this happen. :)
There's nothing that every net connection will support. STUN is probably good, UPnP can work for this.
However, it's rumored that most firewalls can be enticed to pass almost anything through UDP port 53 (DNS). You might have to argue with the OS about your access to that port though.
Also, check out SIP, it's another protocol designed for this sort of thing. With the popularity of VOIP, there may be decent built-in support for this in more firewalls.
If you're really committed to UDP, you might also consider tunneling it over HTTP.
how about you break the problem into two parts - make a game matcher client (that is distinct from the game), which can communicate via http to your cheap/shared webhost. All gamers who wants to use the game matching function use this. THe game matcher client then launches the actual game with the correct parameters (IP, etc etc) after obtaining the info from your server.
The game will then use the standard way to UDP punch thru NAT, etc etc, as per your network code. The game dont actually need to know anything about the matcher client or matcher server - in the true sense of p2p (like torrents, once you can obtain your peer's IPs, you can even disconnect from the tracker).
That way, your problems become smaller.
An intermediate solution between hosting your own dedicated server and a strictly P2P networking environment is the gnutella model. In that model, there are superpeers that act like local servers, having known IP addresses and being connected to (and thus having knowledge of) more clients than a typical peer. This still requires you to run at least one superpeer yourself, but it gives you the option to let other people run their own superpeers.