[Freeswitch-users] Easy question, I hope just need to proxy port 5060 to 5080

David Ponzone david.ponzone at ipeva.fr
Tue Aug 24 18:43:25 PDT 2010


Michael,

what you want to achieve is pretty simple to do with FreeSWITCH, and  
is quite close from what I do.

To get you started, here are the major changes you need to apply to  
the default conf:

-keep external SIP profile but change its port to 5060
-modify internal SIP profile to be identical to external profile and  
bind it to 5080 (you could also do everything with external profile,  
but I think it's simpler and easier to understand to have 2 profiles) - 
 > this is required because the default internal profile expects  
registration

Then you end up with 2 profiles using the public context.
Then if you prefer the simple way, you can change internal to use  
another context "younameit" (could be "internal").
Or you do like me: you split calls coming into public to a specific  
contex, based on source IP with such extensions in public.xml:

   <extension name="from_provider">
     <condition field="network_addr" expression="X.X.X.X"/>
     <condition field="destination_number" expression="^(.*)$">
       <action application="transfer" data="$1 XML provider"/>
     </condition>
   </extension>

   <extension name="from_sipxecs">
     <condition field="network_addr" expression="Y.Y.Y.Y"/>
     <condition field="destination_number" expression="^(.*)$">
       <action application="transfer" data="$1 XML sipxecs"/>
     </condition>
   </extension>

Then you can add 2 dialplans, provider and sipxecs (I add them in  
specific files I put in dialplan/, I find it more readable).

And you just have to add the right extensions in those dialplans to  
bridge calls to the other side.
That's the easy part.

In other words, an Ingate Siparator for this would be quite overkill.
Remember that FS is not a proxy, so if your SipXecs sends some  
specific headers, you may need to deal with them and put them back on  
the B-leg to the provider.

David Ponzone  Direction Technique
email: david.ponzone at ipeva.fr
tel:      01 74 03 18 97
gsm:   06 66 98 76 34

Service Client IPeva
tel:      0811 46 26 26
www.ipeva.fr  -   www.ipeva-studio.com

Ce message et toutes les pièces jointes sont confidentiels et établis  
à l'intention exclusive de ses destinataires. Toute utilisation ou  
diffusion non autorisée est interdite. Tout message électronique est  
susceptible d'altération. IPeva décline toute responsabilité au titre  
de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes  
pas destinataire de ce message, merci de le détruire immédiatement et  
d'avertir l'expéditeur.




Le 25/08/2010 à 02:17, Michael Scheidell a écrit :

> I am in need of putting a sbc or sip proxy in front of our existing  
> sip solution to help solve a very specific problem.
> The SIP Trunk provider won't send to anything but port 5060, and the  
> existing sip solution listens to port 5080 ONLY.
> (background:   sipxecs.  yes, they are using freeswitch inside for a  
> couple of things)
>
> I have tried simple port redirection with iptables, and while it  
> SEEMS to work, the sip packets don't.
>
> so, does anyone know of a simple solution? I don't really want to  
> replicate all the users, dial plans, sip trunk accounts on freeswitch.
>
> Just basically, anything coming in from a certain ip to the  
> freeswitch port 5060, 'sipproxy' it to port 5080 on the internal  
> system.
> then, anything sent out from the one certain internal ip, sourced on  
> port 5080 to port 5060, send it to the external sip trunk provider.
>
> Using ip based authentication all around. I assume using an ip based  
> condition with a FWD, (but the FWD would need to be generic)
> if call comes in from siptrunkprovider  to  
> 1000 at freeswitch.secnap.com:5060 , I want it transparently forwarded  
> to 1000 at sipx.secnap.com:5080
>
> if an internal call goes out to 5619995000 at freeswitch.com:5060, I  
> want it transparently forwarded to 5619995000 at siptrunkprovider.com: 
> 5060
>
> (yes, I tried simple port mapping.  worked with tcp on http, and  
> ALMOST worked with udp on tftp, but audio was mangled)
>
> sipx suggested purchasing an ingate siperaor.  hard to justify $4 or  
> $5K when I could replace sipx with a commercial system for that price.
> (yes, I could move everything to freeswitch, and I might, but I am  
> under a deadline )
>
>
> -- 
> Michael Scheidell, CTO
> o: 561-999-5000
> d: 561-948-2259
> ISN: 1259*1300
> > | SECNAP Network Security Corporation
> Certified SNORT Integrator
> 2008-9 Hot Company Award Winner, World Executive Alliance
> Five-Star Partner Program 2009, VARBusiness
> Best in Email Security,2010: Network Products Guide
> King of Spam Filters, SC Magazine 2008
>
> This email has been scanned and certified safe by SpammerTrap®.
> For Information please see http://www.secnap.com/products/spammertrap/
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100825/ff7a53a4/attachment-0001.html 


More information about the FreeSWITCH-users mailing list