Solved

remote asterisk & portech

Posted on 2013-05-16
28
716 Views
Last Modified: 2013-06-10
I have a voip server with asterisk/trixbox and an Gsmbox Portech-mv372 and would like to use this gmsbox also by a second remote voip server (always with asterisk/trixbox), how can I do? I have to use stun server on Portech?
Thanks.

-
 Salvatore.
0
Comment
Question by:sasapix
  • 17
  • 11
28 Comments
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
if i understand correctly your gsm box is a cell phone that can use sip. If the devices are on the same lan. Make a sip trunk between your trixbox and the gsm gateway. The gsm gateway has a web interface to setup trunks.
 check your asterisk
 (askterisk -r)
 (sip show peers)
 Then create your dial plan. you should be able to press 6+area code+number.
0
 

Author Comment

by:sasapix
Comment Utility
I have already configured asterisk & gsm box and creating a trunk and in LAN network I have no problems, my goal is to use the gsm box also by a second voip which is not in LAN but is in a second remote location.

-
 Salvatore.
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
so you want to set up a remote sip trunk or IAX2 trunk at another remote location.
This is still easy with two trixbox's and alittle port forwarding.

http://marchitechno.wordpress.com/2009/04/06/linking-two-trixbox-servers/

this example talks about connecting two trixbox servers using IAX2.

following this i have created an IAX2 trunk with my work location to have a home pbx using the voip trunks of my work. I have free internal calls as well as free external calls.  

here is some more reading that can get your heading for working with sip trunks and asterisk.Trixbox,freepbx, pbxinaflash, all of these are basicly the same. they use a web gui to work with asterisk. so any tutorial you find for freepbx will in turn work for trixbox or pretty much any distro.  
http://kb.smartvox.co.uk/category/asterisk/sip-trunks-asterisk/

good luck~!
0
 

Author Comment

by:sasapix
Comment Utility
I do not know if the trunk iax2 is right for my purpose, I would that the remote voip, when you call a mobile number, consists for example:
7348123424
where 7 is the prefix for the Outbound Route and 348123424 is the real mobile number that want to call.
When a remote extension type:
7348123424
This call is addressed to my voip and hence is done through the gsmbox.

-
 Salvatore.
extension-on-my-voip.JPG
trunk-on-remote-voip.JPG
outbound-route-on-remote-voip.JPG
0
 

Author Comment

by:sasapix
Comment Utility
I tried from the remote office to call a mobile number by prefixing the 7, the call fails.
In attach log file of my voip and trunk and extension registration.

-
 Salvatore.
log-voip.doc
on-remote-voip.JPG
on-my-voip.JPG
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
looks like its connected but your dial plan doesn't know what to do with it when it receives the call. the call comes from-internal context.  Have your system send calls to voice mail . are you sure your sending the right extension numbers?  looks like it doesn't send a number.

can you call extensions ?  if so can i see the asterisk log on both servers for that?
0
 

Author Comment

by:sasapix
Comment Utility
I have to create an inbound route on my local voip?

-
 Salvatore.
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
What is happening here is that you are using two servers to make the pass off.... if you made remote extensions connecting directly to your office trixbox it should work as if you mad a call in the office... if you have two trixbox servers, you will have to route the call.
0
 

Author Comment

by:sasapix
Comment Utility
yes I have two trixbox server and I would like that when the trixbox1 you want to call a mobile number then the call is routed to trixbox2 that uses the Gsmbox to make the call.

-
 Salvatore.
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
ok... you will need a dial plan like this.
first identify if the call is coming through the iax2 trunk. then find the context.

Inside your office trixbox ssh(putty) to your system and go in to extensions.conf
(nano /etc/asterisk/extensions.conf)
find the context that the call comes through and add something like this.

exten => _1XXXXXXXXXX,1,Dial(SIP/${EXTEN}@GSMTRUNKNAME); any calls comming in with 1+areacode+number will be sent to your gsm line(trunk)

this will send calls from the context that the IAX2 calls are coming from to your gsmtrunk.

but i advise you that you add another number to it,  when you send the call from your remote trixbox send something like this    71+area+number   then the route needed would be something like this:

exten => _71XXXXXXXXXX,1,Dial(SIP/${EXTEN}@GSMTRUNKNAME);


this will make sure that any internal calls using 1 will not get routed wrong..
so when making a call from your remote you would make an 12 digit call ..    7+71+areacode+number  ** you will need to delete the extra 7 from the call so the call will connect****** or create a new context that the iax2 trunk is assoiciated and keep the
exten => _1XXXXXXXXXX,1,Dial(SIP/${EXTEN}@GSMTRUNKNAME); dialplan
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
setting up a sip trunk would be the same work. just with port 5060. a sip trunk or a iax2 trunk is practically the same.

http://www.cadvision.com/blanchas/Asterisk/SIPtrunk.html

this works for trixbox even though it says for freepbx.

since you already have the IAX2 trunk running i suggest you work with that. either way if you don't route your calls you won't connect.
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
reviewing your logs i see that the call does indeed connect to your remote pbx, but as i said it is routed wrong.  the call coming in has 32945xxxxx sent. you need set up a inbound route that automatically adds the prefix you need for it to go to the gsm trunk. for example,  if in your office you dial 9+1+areacode+number to make a call. then the call coming in from your remote trixbox will need to have 9 already when you call. otherwise you will need a inbound route with 9 added then striped when going into the trunk so the final number delivered to your gsmbox will be what it is looking for (12345678912)
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
did you give up?
0
 

Author Comment

by:sasapix
Comment Utility
from local extensions to call the mobile numbers I use as dial pattern:
0|[3X].
from the remote voip I tried to compose 0348241xxxx and the log of the local Asterisk I have  rtf attach.


-
 Salvatore,
log-local.rtf
remote-voip.JPG
local-voip.JPG
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

by:TechGua
Comment Utility
Look at the final number passed off tobyour gsm.. does it follow the pattern?   What is the final pattern that your gsm box is looking for....for example. To call the usa you need    15047777777 dial pattern...from what I see in the log files is a 34XXXXXXX.....again, what is the final number needed to make a call out....if you dont have 1 in the call string it wont make the call.... some providers only need the area code and the number...5047777777....let me know the requirements...
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
Have you tried to make a call to your extentions inside the office? If you can, that means the connection for your two trixbox servers are correct.
0
 

Author Comment

by:sasapix
Comment Utility
from local office to call the mobile number 348241xxxx I have to compose in this way 0348241xxxx, trixbox understands that the destination is a mobile number and passes the call to the trunk SIP/gsm as shown in figure "local voip.jpg".
From remote office I compose in the same way 0348241xxxx the call goes through the trunk iax2 as evidenced by the log "log_local" but then it is not passed to the trunk SIP/gsm.

-
 Salvatore.
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
So do this.... from your remote location.... send a zero first......lests say from your remote location you press 7 to dial out.now add a zero.. example    70348241xxxx
In this way...the 7 will be stripped and the number your office trixbox receive is 0348241xxxx.

Also try a test for local extensions  or voicemail to verify connection.
0
 

Author Comment

by:sasapix
Comment Utility
so I have to create a route on the remote trixbox well as that which I have attached "route remote.jpg"?

-
 Salvatore.
route-remote.JPG
0
 
LVL 2

Accepted Solution

by:
TechGua earned 500 total points
Comment Utility
Well with that picture I see that 7 and 0 would be stripped..you would need to send the 0 to your office trixbox...

0|[03X].
Or
0|03+X.

You need to send the zero to the office trixbox.
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
Or...7|03XXXXXXXXX.
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
Does the routing between each trixbox make more sense now?   Does it work as expected?
0
 

Author Comment

by:sasapix
Comment Utility
I did the same configuration on two other voip (always with trixbox) but in this case the configuration does not work, as in the previous configuration on the local voip (now there's gsm.box) I created an extension iax2 that refers to its telephone number and on voip remote I created a trunk iax2, I enclose the configuration of the local voip, voip remote and that the status of the two exchanges.

-
 Salvatore.
extension-on-local-voip.JPG
trunk-iax2-remote-voip.JPG
status-local.JPG
status-remote.JPG
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
it shows that the connection is being rejected. are you sure you have your settings correct?
0
 

Author Comment

by:sasapix
Comment Utility
the configuration is as follows:
office voip:
telephone number: 081011xxxx
on TB Office I have the extension IAX2 (extension-on-local-voip.JPG)
Public IP: 5.99.x.x

remote voip:
telephone number: 081191xxxx
on TB Remote I have the trunk IAX2 (trunk-iax2-remote-voip.JPG)
Public IP: 93.57.x.x

this configuration is correct ?

-
Salvatore.
trunk-iax2-remote-voip.JPG
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
are the ports forwarded?
0
 

Author Comment

by:sasapix
Comment Utility
4569/udp
0
 
LVL 2

Expert Comment

by:TechGua
Comment Utility
i do see that in your remote you have type=peer  but in your office TB you have Type=Friend  . also the system is tring to connect but it is getting rejected.  we need to see why its getting rejected.  check in your asterisk logs or do  asterisk -r in a ssh to your trixbox and see what it says when the remote location trys to connect.  Please leave a portion of your log to see how the trixboxes are trying to connect.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Every year the snow affects people and businesses. According to the Federation of Small Businesses (FSB), in 2009, UK businesses lost an estimated £1.2bn (http://news.bbc.co.uk/1/hi/business/7864804.stm) because of bad weather. This article was c…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now