Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

my current setup - i use bunch of sip hard-phones around few offices. all devices have two sip accounts configured - one on internal sip proxy [for calls between the branches], another - at 3rd party voip providers [ since it's in different countries - those are different providers, but that's irrelevant ].

i was thinking about terminating sip calls on something like asterisk/freeswitch server and having all sip-devices log on just once to such server[s] - mostly to provide things like voicemail, groupcalls, redirections etc. it seems perfectly doable but there is one problem - i cannot find examples how to prepare for nat/no nat. for calls routed to from/to 3rd party voip operator - i'll need handling for nat/stun etc, but for handling of internal calls - i do not want any nat, all traffic should go via vpns to different branches.

can you provide me some hints how to configure it? any tutorials?

thanks!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

For FreeSWITCH, I believe this functionality can be handled by the internal/external sip profiles. You can find more info on wiki.freeswitch.org

The NAT configuration to your external VoIP provider(s) can be setup in the external profile (example /usr/local/freeswitch/conf/sip_profiles/external/voipprovider.xml). You can set these two parameters to match your public ip address:

<include>
        <gateway name="voipprovider">
        <param name="ext-rtp-ip" value="x.x.x.x"/>
        <param name="ext-sip-ip" value="x.x.x.x"/>
        <param name="username" value="user"/>
        <param name="password" value="password"/>
        <param name="realm" value="sip.voipprovider.com"/>
        </gateway>
</include>

To use your external voip providers, you would setup your dialplan (/usr/local/freeswitch/conf/dialplan/default.xml) something like this. To use different voip providers depending on destination, you can adjust the regex:

<include>
 <extension name="Dial Out VoIP Provider">
   <condition field="destination_number" expression="^9(1\d{10})$">
     <action application="bridge" data="sofia/gateway/voipprovider/$1"/>
   </condition>
 </extension>
</include>

I hope this helps. I don't have any experience w/ Asterisk, so I am not sure how you would set it up with that switch.

share|improve this answer
    
thanks a lot for your response! can you suggest any freeswitch tutorials? [yes.. i've heard about google ;-] –  pQd Jun 7 '10 at 14:44
1  
theres a lot of good sample configs on the freeswitch wiki. wiki.freeswitch.org. They have sample sip profiles for service providers and sample dialplans. –  okonomiyaki Jun 11 '10 at 1:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.