VOIP, PSTN and PBX in one?!

Hi all,

I am new to Asterisk, but would like to give it a go…

I currently have a broadband router, a spare PC, a LAN, and a little bit of cash!

The broadband router has a switch built in…

So here is the plan, firstly set up Asterisk as an internal PBX only for configuration and playing around with! (I have one PC with soft phone and 1 IP phone at the moment, but plan to get 3 more IP phones eventually and replace the PC with one of these. This will all be connected up via LAN.

I then intend to purchase a Digium card to enable me to connect to PSTN, and run all my PSTN calls through Asterisk PBX to the IP phones, using my current telephone number etc (I only have one line)…

I would then like to try using VOIP, but this is where I get lost…

Is it possible for Asterisk to have two external interfaces, one for PSTN, which it uses whenever I use an IP phone for dialling to a PSTN phone, and a network connection to my broadband router for whenever I dial a VOIP number?? I am confused because I see a number of services such as Vonage which seem to do this with a seperate box and using a PSTN gateway service??? Is this for people who want to get rid of PSTN entirely and use Broadband for all calls…to both PSTN and VOIP users?? I do not understand!

Also if all of the above is possible, (Which I really hope it is!) How do I get a VOIP number?!

Also as a general interest query what is the average network bandwidth for each call on the LAN?

[quote=“Jellyman_4eva”]

Is it possible for Asterisk to have two external interfaces, one for PSTN, which it uses whenever I use an IP phone for dialling to a PSTN phone, and a network connection to my broadband router for whenever I dial a VOIP number?? I am confused because I see a number of services such as Vonage which seem to do this with a seperate box and using a PSTN gateway service??? Is this for people who want to get rid of PSTN entirely and use Broadband for all calls…to both PSTN and VOIP users?? I do not understand!

Also if all of the above is possible, (Which I really hope it is!) How do I get a VOIP number?!

Also as a general interest query what is the average network bandwidth for each call on the LAN?[/quote]

Techinaly there is no diffrence when calling a number if it is a VOIP line or if it is a POTS line. When you dial out (depending on your phone provider) the call is handled as a call. So you can use a regular phone line to call a regular phone number or a person that has a VOIP line. The only diffrence is how you send the call out. You can use a card on your system that will use your POTS phone line or you can get VOIP service and send the call over VOIP. If you want to get a VOIP line there are many providers out there that can provide it for you. Have a look on voip-info.org. Do a search for voip providers. Hope this response is clear enough (as it is 1:00 AM here). Good luck.

VoIP providers provide a IP-to-POTS gateway so that you can reach and be reached by regular phones (both landline and cellphones). If you’ve used Skype, it’s the equivalent of SkypeIn and SkypeOut.

[quote=“Jellyman_4eva”]
Is it possible for Asterisk to have two external interfaces, one for PSTN, which it uses whenever I use an IP phone for dialling to a PSTN phone, and a network connection to my broadband router for whenever I dial a VOIP number?? [/quote] Yes, I run this configuration for my own private communication needs. External interfaces are called trunks. Asterisk is seperating trunks from your internal phones. When an internal phone dials an outgoing number, you can define in the dialplan (extensions.conf) which trunk to choose. There’s a number of ways you can do this, e.g. get outside line PSTN through prefix 8, VoIP prefix 9. Or place local calls (NXX-XXXX) and toll free (18XX-NXX-XXXX) through PSTN, long distance (1XXX-NXX-XXXX) through VoIP. Or any other criteria you prefer. Some VoIP providers do not support Asterisk due to proprietary protocols or marketing reasons (as far as I understand).

Hi,

Thanks everyone for the replies…

RedStapler, as you seem to have the config which I would like, what do I need to achieve this?

Do I need a VOIP service provider or can I just use asterisk and register for a free SIP address?? I plan on basically communicating local calls to PSTN if the other end has a normal phone, otherwise I have a few friends who have VOIP in the States, so I would be doing VOIP to VOIP for these calls.

I cannot see me doing VOIP -> PSTN at all, is this what I need a service provider for?

Jellyman_4eva

VoIP to VoIP depends on the VoIP providers your friends have. You have to “hook up” through their VoIP provider, unless… and I believe you have the right idea: why would you need a VoIP provider if you do not interface with PSTN? The answer to this is part good, part not so good news: Indeed you do not need a VoIP provider for this. The catch is that SIP is not well suited to get into your friends’ sites, I believe you need to run a “firewall-friendly” protocol like H.323 or IAX. (This is where my hands-on experience ends). As you are looking at Asterisk, IAX would most likely be your choice. This requires that your friends also get Asterisk, or wait until IAX VoIP phones become available.

Hi,

Thanks for the reply, I am gradually getting the picture as to what exactly happens when calls are made etc! I am glad I do not need a VoIP provider! I believe that States people, one is with Vonage, not sure about other yet, but I should think they are both SIP and not IAX…

Could I not do port forwarding on my router for:

SIP signaling: Ports 5060 to 5070
RTP audio: Ports 8766 to 35000

To point to my asterisk box (Yes I know thats a lot of ports!), and also ask the States people to do the same? Also if I actually ever manage this (Its looking harder by the day!!) how do I get a SIP address without a VoIP provider?

[quote=“Jellyman_4eva”] I am glad I do not need a VoIP provider! [/quote] But your friends need to play along. [quote] I believe that States people, one is with Vonage, not sure about other yet, but I should think they are both SIP and not IAX… [/quote] I have seen SIP for the most part. Carriers use H.323. I believe somebody posted a list of VoIP providers which support IAX in this forum.

[quote]Could I not do port forwarding on my router for:

SIP signaling: Ports 5060 to 5070
RTP audio: Ports 8766 to 35000

To point to my asterisk box (Yes I know thats a lot of ports!), and also ask the States people to do the same? Also if I actually ever manage this (Its looking harder by the day!!) [/quote] I have not done that on the router end and would not recommend it, but you get the idea…

[quote]how do I get a SIP address without a VoIP provider?[/quote]As soon as you walk away from a provider you can use any other protocol and IAX is the recommended protocol in the Asterisk world.

[quote=“Jellyman_4eva”]Hi all,

So here is the plan, firstly set up Asterisk as an internal PBX only for configuration and playing around with! (I have one PC with soft phone and 1 IP phone at the moment, but plan to get 3 more IP phones eventually and replace the PC with one of these. This will all be connected up via LAN.

I then intend to purchase a Digium card to enable me to connect to PSTN, and run all my PSTN calls through Asterisk PBX to the IP phones, using my current telephone number etc (I only have one line)…

I would then like to try using VOIP, but this is where I get lost…

Is it possible for Asterisk to have two external interfaces, one for PSTN, which it uses whenever I use an IP phone for dialling to a PSTN phone, and a network connection to my broadband router for whenever I dial a VOIP number?? I am confused because I see a number of services such as Vonage which seem to do this with a seperate box and using a PSTN gateway service??? Is this for people who want to get rid of PSTN entirely and use Broadband for all calls…to both PSTN and VOIP users?? I do not understand!

Also if all of the above is possible, (Which I really hope it is!) How do I get a VOIP number?!

Also as a general interest query what is the average network bandwidth for each call on the LAN?[/quote]

I currently have an internal Asterisk setup running version 1.2.9.1. I’m not an expert but know enought to be dangerous. Right now I have a POTS line connected to a Digium X100P card, two VoIP Providers (Qwest Communications and Gafachi), and two 8xx numbers.

Based on what you want to do, this is what I’d recommend. I’d wait to install asterisk until you get your FXO card. Once you get that, install all required modules for SPARC and the drivers for your FXO card.

Once that is done, you can setup rules in your extensions.conf file to handle how you want to route the call. For example, each IP phone (hardware or software) has it’s own extension. With a regular pots line, inbound calls ring all lines connected to your wall jack. Since each phone is it’s own number(extension), you’d create a rule to call them all at the same time and then will bridge your call to the caller depending which phone you answer.

Basic Example: (extensions.conf)

[internal]
exten => 8000,1,Answer ;answers call
exten => 8000,2,wait(1) ; waits one second to let sip/rtp sync up
exten => 8000,3,Dial(SIP/5000&SIP/1000&SIP/5001,23) ; dials extension 5000, 1000, and 5001 at the same time for 23 seconds
exten => 8000,4,Macro(vmessage,1000@voicemail) ; goes to voicemail if no answer
exten => 8000,5,Hangup ; disconnects call

[zap]
exten => s,1,wait(2) ; wait 2 seconds
exten => s,2,Goto,internal|8000|1 ; goto context ‘internal’, extension, priority
exten => s,3,Hangup ; disconnect call

The way I have this setup is everything internal is sip/voip. I use two Cisco 7912G phones and the XLite softphone. Extension to extension calling is SIP, and inbound calls from the land line is converted to SIP once answered by asterisk. Same with outbound, if I make an call from my IP phone, it goes VoIP internally until it leaves the FXO card which is converted to analog to go out a regluar land line.

When you’re ready to have an actual VoIP phone number, it’s really no difference functionally wise, just have more call compacity. I recomment keeping your POTS line and use the voip line as secondary line. Nice things about VoIP line is you can have as many simotanious inbound/outbound calls as your bandwith will support. Down side is if you internet connection goes down or lose power, you’re out phone service.

The options of how you want our outbound calls to route are quite robust. I currently have mine setup to route though Qwest VoIP first, if that fails, will go though Gafachi VoIP, if that fails will go out the FXO card via pots line.

If you not familar with VoIP technology vs TDM technology, all you really need to know for now is if you have a regular land line using and FXO card, internally you’re using VoIP technology and protocols. So all your routing and internal features are VoIP. When you use VoIP with a VoIP provider, you’re sending the same VoIP messages your asterisk box produces internally such as SIP Invites(from softphone to asterisk) and registration, except you’d be sending those messages to the remote carriers servers with your specific credentials you have with them. Like I say though, baic functionality internally will be identical whether you receive the call from a POTS line or a VoIP line.

Setup the card get ZAP working
Go get a FWD account (free)
They offer “peering” to many other VOIP networks (see link below).
This will allow you to call them and them to call you FREE, and many times you can find free calls POTS lines.

with asterisk and with this laser.com/dante/ freeware you can have friends / family with computers and broadband connect to your asterisk easy, (iax is nat friendly, you only need to forward a single port 4569 the remote needs nothing.

grab dyndns.com domain name, like 20.00 a year I think, have fun…

Inbound DID’s (phone numbers people can call you at are 10.00 or so month for unlimit calls most area codes…and you can have any area code ring anywhere

freeworlddialup.com/learnmor … rs#peering

connect.voicepulse.com

Hi All,

Following on from this conversation, I am now at the stage where I have signed up to FWD and have my SIP number and have used it with various softphones etc. I am happy with this but have questions before I go any further…

I have an Asterisk box, with Digium card and modules loaded. I am capable of extending my FWD account to use IAX and make the necessary alterations to Asterisk… but before I do this I wanna know whats going on!

Firstly in order to make my home phones ring, I need to connect it all up with Asterisk, which only speaks IAX?? So by extending the FWD account to IAX and doing the mods, it means when someone calls my FWD number, it will ring all phones connected with SIP and my Asterisk box?

OK, next question, because I am on FWD, if I give my FWD SIP number to someone, who is a different service like packet8 etc, they will not be able to call me using solely that number will they? (Do they need to put some kind of extension number in to realize its a FWD account or something?) and likewise me calling them??

So imagine all thats sorted and working etc… can people contact me using the FWD SIP account which forwards to IAX as well, and use such things as KIAX as well using the FWD IAX feature which I have enabled??

I have seen several places with offer local PSTN phone numbers which can be obtained and be set to forward to my SIP address, which could be handy, I take it these come into play when for example I am geographically miles away from the person, they call the local line and have local rate charges but get connected to me who could be anywhere?!

Also what is the flipside of this, is there a way of me being miles away from home wanting to talk to someone near home on PSTN, being able to use IAX to dial in to my asterisk box and then dialing from the asterisk box using the PSTN card to my local destination?

Sorry if this all seems thick!! Also my final question is, why/how are all these sites offering this stuff for free?!

Hi all,

I think I am actually going mad here…

How can I remotely login into my Asterisk box and retrieve mail?

There is a ton of info at this site check it out

voip-info.org/wiki-Asterisk