Link to home
Start Free TrialLog in
Avatar of sasapix
sasapixFlag for Italy

asked on

remote asterisk & portech

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.
Avatar of TechGua
TechGua

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.
Avatar of sasapix

ASKER

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.
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~!
Avatar of sasapix

ASKER

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
Avatar of sasapix

ASKER

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
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?
Avatar of sasapix

ASKER

I have to create an inbound route on my local voip?

-
 Salvatore.
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.
Avatar of sasapix

ASKER

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.
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
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.
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)
did you give up?
Avatar of sasapix

ASKER

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
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...
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.
Avatar of sasapix

ASKER

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.
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.
Avatar of sasapix

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of TechGua
TechGua

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or...7|03XXXXXXXXX.
Does the routing between each trixbox make more sense now?   Does it work as expected?
Avatar of sasapix

ASKER

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
it shows that the connection is being rejected. are you sure you have your settings correct?
Avatar of sasapix

ASKER

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
are the ports forwarded?
Avatar of sasapix

ASKER

4569/udp
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.