Posts Tagged ‘asterisk’

Asterisk Dual Servers with SIP

Tuesday, July 15th, 2008

I have found about a million articles on the net for connecting 2 asterisk boxes using IAX2. What I have not found is many describing how to do this with SIP, so thats what Im going to talk about. Now since I am a FreePBX user I am going to talk about how to do this using the FreePBX web GUI. You can use this method if you use TrixBox, or Elastix, or PBX In A Flash, or if you just use FreePBX with your own distro.

I have 2 systems. To make this simple Im going to call them pbx1 (which for this example is in San Antonio) and pbx2 (which we will pretend is in our Houston office). First we need to log into the web interface on pbx1 and then get to the section where you configure trunks. Click Add SIP Trunk. Im not going to mess with any of the General Settings, or the Dial Rules. I am going to go straight to the Outgoing Rules. In trunk name Im going to call this trunk-hou-peer. Next I jump into the PEER Details box. I put the following into the box:

context=from-internal
host=pbx2.mhipriv.com
secret=strong_password
type=peer
username=trunk-sa-peer

Next, Remove all the settings from the Incoming Section. Hit submit, and then apply the changes.

Next we need to log on the web gui for pbx2. Now we are going to go from Houston back to San Antonio with this trunk. We need to add a new SIP trunk here. Follow the same steps as before, but now name this trunk: trunk-sa-peer You may notice that the name of this trunk is the username we used in the peer details on pbx1. Now in the Peer details on pbx2 add the following:

context=from-internal
host=pbx1.mhipriv.com
secret=strong_password
type=peer
username=trunk-hou-peer

Now you will notice that the username on this peer is what we named our trunk on pbx1. The context used in both is the same. This will give you access from pbx2 to dial an extension that is on pbx1 and vise versa. Now all we need to do is submit this and apply the changes.

Next all we need to do is create an outbound route to use our new trunk. For the sake of keeping it super simple lets assume you have extension 100-199 on pbx1 and 200-299 on pbx2. We need to go to the outbound route section and create a route on pbx1, name it toHouston and it needs a dial pattern that looks like this:

2XX

Click on the Intra Company Route. Then select our Houston trunk. Next submit and apply changes. Now head over to the pbx2 web gui and do the same steps only name this route toSanAntonio and for its dial pattern use:

1XX

Click Intra Company Route select the San Antonio Trunk, hit submit and apply. Now from extension 100 in San Antonio dial 200 and bamo thats it. You can take this a step further and even do toll-by-pass now.

My New Cell Phone – Nokia n95 8GB

Tuesday, July 1st, 2008

Yeah, hate me.. I got one. Its so freakin awesome. here are a few things that really kick ass so far about this phone:

  • I am able to sync music to the phone via amarok using Linux
  • I am able to browse the web using WIFI or my 3g data service.
  • I have configured my n95 as a sip client and have it registered with my Asterisk server.
  • The phone supports mobile bar codes
  • The camera takes WONDERFUL pictures. The quality is very high!! And you can export them directly to flickr!!
  • The phone takes really great video
  • Did I mention I didnt need windows to add music to this thing??

Im sure there are other really great things about this phone too but I have only had it a couple days so I havent had time to check all the features out yet.