Easy question, I hope just need to proxy port 5060 to 5080
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@freeswitch.secnap.com:5060 , I want it transparently forwarded to 1000@sipx.secnap.com:5080 if an internal call goes out to 5619995000@freeswitch.com:5060, I want it transparently forwarded to 5619995000@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(r). For Information please see http://www.secnap.com/products/spammertrap/ ______________________________________________________________________
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@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@freeswitch.secnap.com:5060 , I want it transparently forwarded to 1000@sipx.secnap.com:5080
if an internal call goes out to 5619995000@freeswitch.com:5060, I want it transparently forwarded to 5619995000@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On 8/24/10 9:43 PM, David Ponzone wrote:
Michael,
what you want to achieve is pretty simple to do with FreeSWITCH, and is quite close from what I do.
Thanks for the reply (simple once I know where everything goes.. :-) I just loaded this last night. nothing like the Mitel SX50's (bit mapped options, digital pbx), 3com nbx (not really VOIP. was vo layer2 multicast), and more powerful then sipxecs..
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>
is above right? from_provider, then $1 XML provider? (assuming _{provider} is the friendly name)
<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>
And you just have to add the right extensions in those dialplans to bridge calls to the other side. That's the easy part.
famous last words. where caller is 561-555-1212 and destination is 301-555-1212. I see it coming from provider in public context:(i hope) close: Dialplan: sofia/external/5615551212@68.100.226.97 parsing [public->from_provider] continue=false Dialplan: sofia/external/5615551212@68.100.226.97 Regex (PASS) [from_provider] network_addr(68.233.226.97) =~ /68.233.226.97/ break=on-false Dialplan: sofia/external/5615551212@68.100.226.97 Regex (PASS) [from_provider] destination_number(3015551212) =~ /^(.*)$/ break=on-false Dialplan: sofia/external/5615551212@68.100.226.97 Action transfer(3015551212 XML provider) [snip] 2010-08-25 10:52:16.276232 [DEBUG] mod_dptools.c:748 sofia/external/5615551212@68.100.226.97 SET [outside_call]=[true] [snip] gets this far: 2010-08-25 10:52:16.278237 [INFO] mod_dialplan_xml.c:315 Processing 5615551212->3015551212 in context provider 2010-08-25 10:52:16.278237 [WARNING] mod_dialplan_xml.c:345 Context provider not found I guess I don't understand. as a test, PSTN number is 3015551212, coming from provider to sipxecs, do I put something like this in dialplan/provider.xml? dialplan/public/provider.xml? (I just want the call send to sipxecs. I don't care about ringback, timeouts.. I guess.. maybe I do for safety) so if a call come in to 3015551212, and its handled by sipxecs, and, MAYBE, I think I want it to fall back to a cell phone if sipxecs is down (say a 120 second timeout?) what do I put here? (what do I per where?) or this? <extension name="provider"> <condition field="destination_number" expression="^(3015551212)$"> <action application="bridge" data="sofia/gateway/sipxecs/$1"/> </condition> </extension> (with 'bridge' I get 'so far', but still get 2010-08-25 15:14:15.590404 [INFO] mod_dialplan_xml.c:315 Processing 5615551212->3015551212 in context provider 2010-08-25 15:14:15.590404 [WARNING] mod_dialplan_xml.c:345 Context provider not found 2010-08-25 15:14:15.590404 [INFO] switch_core_state_machine.c:136 No Route, Aborting -- Michael Scheidell, CTO o: 561-999-5000 d: 561-948-2259 ISN: 1259*1300 sip:michael.scheidell@secnap.com
*| *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(r). For Information please see http://www.secnap.com/products/spammertrap/ ______________________________________________________________________
this doesn't 'feel' right: On 8/25/10 3:17 PM, Michael Scheidell wrote:
<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>
if its FROM _provider, shouldn't you transfer to $1 XML sipxecs? and you are using 'transfer' and not 'bridge', right? -- 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(r). For Information please see http://www.secnap.com/products/spammertrap/ ______________________________________________________________________
It is right. You just transfer to another dialplan (context) in order to make it more readable. You'll be able to add all your rules in the provider context, because only calls coming from provider X.X.X.X will go into this dialplan. Remember: extension name has absolutely NO importance in FS. It's just a label. So to sum it all: if call from X.X.X.X, transfer to context provider, with the same destination_number ($1). In context provider, if destination_number is XXX, then bridge the call to sipxecs. David Ponzone Direction Technique email: david.ponzone@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 à 22:46, Michael Scheidell a écrit :
this doesn't 'feel' right:
On 8/25/10 3:17 PM, Michael Scheidell wrote:
<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>
if its FROM _provider, shouldn't you transfer to $1 XML sipxecs?
and you are using 'transfer' and not 'bridge', right?
-- 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/
I feel Michael's idea should also work: If call is from X.X.X.X, then bridge the call with the same destination_number ($1) to sipxecs gateway. <extension name="from_provider"> <condition field="network_addr" expression="X.X.X.X"/> <condition field="destination_number" expression="^(.*)$"> <action application="bridge" data="sofia/gateway/sipxecs/$1"/> </condition> </extension> On Wed, Aug 25, 2010 at 4:33 PM, David Ponzone <david.ponzone@ipeva.fr> wrote:
It is right. You just transfer to another dialplan (context) in order to make it more readable. You'll be able to add all your rules in the provider context, because only calls coming from provider X.X.X.X will go into this dialplan. Remember: extension name has absolutely NO importance in FS. It's just a label. So to sum it all: if call from X.X.X.X, transfer to context provider, with the same destination_number ($1). In context provider, if destination_number is XXX, then bridge the call to sipxecs. David Ponzone Direction Technique email: david.ponzone@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 à 22:46, Michael Scheidell a écrit :
this doesn't 'feel' right:
On 8/25/10 3:17 PM, Michael Scheidell wrote:
<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>
if its FROM _provider, shouldn't you transfer to $1 XML sipxecs?
and you are using 'transfer' and not 'bridge', right?
-- 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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Sure it will work, it's basically the same. My idea was just to have a specific file with only the specific dialplan for each direction. But if he never needs to add anything in the dialplan, it's perhaps overkill. David Ponzone Direction Technique email: david.ponzone@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 26/08/2010 à 07:49, jesse a écrit :
I feel Michael's idea should also work: If call is from X.X.X.X, then bridge the call with the same destination_number ($1) to sipxecs gateway.
<extension name="from_provider"> <condition field="network_addr" expression="X.X.X.X"/> <condition field="destination_number" expression="^(.*)$"> <action application="bridge" data="sofia/gateway/sipxecs/$1"/> </condition> </extension>
On Wed, Aug 25, 2010 at 4:33 PM, David Ponzone <david.ponzone@ipeva.fr> wrote:
It is right. You just transfer to another dialplan (context) in order to make it more readable. You'll be able to add all your rules in the provider context, because only calls coming from provider X.X.X.X will go into this dialplan. Remember: extension name has absolutely NO importance in FS. It's just a label. So to sum it all: if call from X.X.X.X, transfer to context provider, with the same destination_number ($1). In context provider, if destination_number is XXX, then bridge the call to sipxecs. David Ponzone Direction Technique email: david.ponzone@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 à 22:46, Michael Scheidell a écrit :
this doesn't 'feel' right:
On 8/25/10 3:17 PM, Michael Scheidell wrote:
<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>
if its FROM _provider, shouldn't you transfer to $1 XML sipxecs?
and you are using 'transfer' and not 'bridge', right?
-- 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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks. I'll give them both a try. than when I have time, I'l probably be moving everything from the old sip switch to freeswitch. On 8/26/10 3:59 AM, David Ponzone wrote:
Sure it will work, it's basically the same. My idea was just to have a specific file with only the specific dialplan for each direction. But if he never needs to add anything in the dialplan, it's perhaps overkill.
David Ponzone Direction Technique email: david.ponzone@ipeva.fr <mailto:david.ponzone@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 <BLOCKED::http://www.ipeva.fr/> - www.ipeva-studio.com <BLOCKED::http://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 26/08/2010 à 07:49, jesse a écrit :
I feel Michael's idea should also work: If call is from X.X.X.X, then bridge the call with the same destination_number ($1) to sipxecs gateway.
<extension name="from_provider"> <condition field="network_addr" expression="X.X.X.X"/> <condition field="destination_number" expression="^(.*)$"> <action application="bridge" data="sofia/gateway/sipxecs/$1"/> </condition> </extension>
On Wed, Aug 25, 2010 at 4:33 PM, David Ponzone <david.ponzone@ipeva.fr <mailto:david.ponzone@ipeva.fr>> wrote:
It is right. You just transfer to another dialplan (context) in order to make it more readable. You'll be able to add all your rules in the provider context, because only calls coming from provider X.X.X.X will go into this dialplan. Remember: extension name has absolutely NO importance in FS. It's just a label. So to sum it all: if call from X.X.X.X, transfer to context provider, with the same destination_number ($1). In context provider, if destination_number is XXX, then bridge the call to sipxecs. David Ponzone Direction Technique email: david.ponzone@ipeva.fr <mailto:david.ponzone@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 <http://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 à 22:46, Michael Scheidell a écrit :
this doesn't 'feel' right:
On 8/25/10 3:17 PM, Michael Scheidell wrote:
<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>
if its FROM _provider, shouldn't you transfer to $1 XML sipxecs?
and you are using 'transfer' and not 'bridge', right?
-- 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@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- 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(r). For Information please see http://www.secnap.com/products/spammertrap/ ______________________________________________________________________
almost there, but the ../sip_profiles ../public ../default ../dialplan directories have me confused, especially since all these files 'look the same'. (almost) I must REALLY be dense: if I just want to bridge (since the provider won't ever send me anything but the did's they are getting paid for): so: just TWO files? cd /usr/local/freeswitch/conf in ../dialplan/public/from_provider.xml I have: (do I need <include> ..... </include> if this in in a file? tried both ways.) <extension name="from_provider"> <condition field="network_addr" expression="68.100.226.97"/> <condition field="destination_number" expression="^(.*)$"> <action application="bridge" data="sofia/gateway/sipxecs/$1"/> </condition> </extension> and in ../sip_profiles/external/sipxecs.xml I have: (I don't need authentication/registration).. im local :-) <include> <gateway name="sipxecs"> <param name="username" value="username"/> <param name="password" value="password"/> <param name="from-user" value="fromuser"/> <param name="from-domain" value="192.168.0.2"/> <param name="proxy" value="192.168.0.2"/> <param name="expire-seconds" value="600"/> <param name="register" value="false"/> <param name="retry-seconds" value="30"/> <param name="context" value="public"/> </gateway> </include> I must really be an idiot, because now, I don't even get anything in the logs. tcpdump shows INVITES from the provider. (I added <include /> to the from_provider.xml just to see) ../log/freeswitch.log doesn't show anything after the restart stuff. and when I had it wrong, at least I logged the trys and 480 'try later' error. taking a break for breakfast.. its 6am. back in 2 hours. I want a sample setup. I dial the 301 number, come in freeswitch, is gatewayed to my sipxecs. I get audio! I get DTMF, I can internally transfer, (oh, and when I finally get this to work. how do I send this to port 5080 on sipx? so I can transfer from AA and/ or CFNA?) I don't need the outbound gateway (yet) (to complicate matters, this is the freeswitch package on pfsense. no, not the 'new one', but the one I can install via the pfsense gui. and restarts are slow) On 8/26/10 1:49 AM, jesse wrote:
I feel Michael's idea should also work: If call is from X.X.X.X, then bridge the call with the same destination_number ($1) to sipxecs gateway.
<extension name="from_provider"> <condition field="network_addr" expression="X.X.X.X"/> <condition field="destination_number" expression="^(.*)$"> <action application="bridge" data="sofia/gateway/sipxecs/$1"/> </condition> </extension>
On Wed, Aug 25, 2010 at 4:33 PM, David Ponzone<david.ponzone@ipeva.fr> wrote:
It is right. You just transfer to another dialplan (context) in order to make it more readable. You'll be able to add all your rules in the provider context, because only calls coming from provider X.X.X.X will go into this dialplan. Remember: extension name has absolutely NO importance in FS. It's just a label. So to sum it all: if call from X.X.X.X, transfer to context provider, with the same destination_number ($1). In context provider, if destination_number is XXX, then bridge the call to sipxecs. David Ponzone Direction Technique email: david.ponzone@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
-- 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(r). For Information please see http://www.secnap.com/products/spammertrap/ ______________________________________________________________________
I am an idiot. I had closed the firewall port. I just opened it. I get our AA now!!! thanks. (now, how to I make it hit port 5080 on the sipxecs?) On 8/26/10 6:09 AM, Michael Scheidell wrote:
I must really be an idiot, because now, I don't even get anything in the logs. tcpdump shows INVITES from the provider. (I added <include /> to the from_provider.xml just to see)
../log/freeswitch.log doesn't show anything after the restart stuff. and when I had it wrong, at least I logged the
-- 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(r). For Information please see http://www.secnap.com/products/spammertrap/ ______________________________________________________________________
<param name="proxy" value="192.168.0.2:5080"/> David Ponzone Direction Technique email: david.ponzone@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 26/08/2010 à 12:16, Michael Scheidell a écrit :
I am an idiot. I had closed the firewall port. I just opened it. I get our AA now!!! thanks. (now, how to I make it hit port 5080 on the sipxecs?)
On 8/26/10 6:09 AM, Michael Scheidell wrote:
I must really be an idiot, because now, I don't even get anything in the logs. tcpdump shows INVITES from the provider. (I added <include /> to the from_provider.xml just to see)
../log/freeswitch.log doesn't show anything after the restart stuff. and when I had it wrong, at least I logged the
-- 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/
That all works below. got one way audio, and no dtmf (and I know why) media handoff is wrong. system is the freewitch 1.2.3 package on pfsense (freebsd, 7.2, i386) during the invite, this gets sent: Contact: <sip:gw+secnap.com@204.89.241.135:5060;transport=udp> Contact Binding: <sip:gw+secnap.com@204.89.241.135:5060;transport=udp> URI: <sip:gw+secnap.com@204.89.241.135:5060;transport=udp> SIP contact address: sip:gw+secnap.com@204.89.241.135:5060 NOW, that doesn't look all that bad, except that 1) the public ip address is 204.89.241.151 2) the private ip is 192.168.0.3 [pfsense: wan port is 204.89.241.135] [pfsense lan port is 192.168.0.1] sipx is at 192.168.0.2 see sip_profiles: ./conf/sip_profiles/external/sipx.xml: <param name="from-domain" value="192.168.0.2"/> <param name="proxy" value="192.168..0.2:5080"/> <!-- 192.168.0.2 listens to 5080 for TRUNKS --> <param name="expire-seconds" value="600"/> <param name="register" value="false"/> <param name="retry-seconds" value="30"/> <param name="context" value="public"/> I edited vars and have <X-PRE-PROCESS cmd="set" data="domain=secnap.com"/> <X-PRE-PROCESS cmd="set" data="local_ip_v4=192.168.0.3"/> <list name="localnet.auto" default="allow"> <node type="allow" cidr="196.168.0.0/16"/> </list> <list name="lan" default="allow"> <node type="deny" cidr="192.168.0.0/16"/> <node type="allow" cidr="192.168..0.3/32"/> </list> I still see this in ../freeswitch.log (and I can't find that ip ANYWHERE. yes, its o=FreeSWITCH 1282812037 1282812038 IN IP4 204.89.241.135 c=IN IP4 204.89.241.135 o=FreeSWITCH 1282814358 1282814359 IN IP4 204.89.241.135 c=IN IP4 204.89.241.135 2010-08-26 12:03:22.237567 [NOTICE] switch_core.c:915 Adding 204.89.241.135/255.255.255.0 (deny) to list nat.auto 2010-08-26 12:03:22.237607 [NOTICE] switch_core.c:934 Adding 204.89.241.135/255.255.255.0 (allow) to list localnet.auto I have verified the OUTBOUND natting works: (im assuming when I set local_ip_ to 192.168.0.3 that it actually did it. telnet -s 192.168.0.3 www.whatismyip.org 80 Trying 98.207.226.113... Connected to www.whatismyip.org. Escape character is '^]'. GET / HTTP/1.0 HTTP/1.0 200 OK Content-Type: text/plain 204.89.241.151Connection closed by foreign host. wireshark dumps confirm it: Message Header Via: SIP/2.0/UDP 192.168..0.3;rport=5060;branch=z9hG4bKXQQUvXFZDUymB;received=192.168..0.3 Transport: UDP -- 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(r). For Information please see http://www.secnap.com/products/spammertrap/ ______________________________________________________________________
What you need to add is the provider context. For instance, add in dialplan/ a file called provider.xml with the following content: <include> <context name="provider"> <extension name="default"> <condition field="destination_number" expression="^(3015551212)$"> <action application="bridge" data="sofia/gateway/sipxecs/$1"/> </condition> </extension> </context> </include> David Ponzone Direction Technique email: david.ponzone@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 à 21:17, Michael Scheidell a écrit :
On 8/24/10 9:43 PM, David Ponzone wrote:
Michael,
what you want to achieve is pretty simple to do with FreeSWITCH, and is quite close from what I do.
Thanks for the reply (simple once I know where everything goes.. :-) I just loaded this last night. nothing like the Mitel SX50's (bit mapped options, digital pbx), 3com nbx (not really VOIP. was vo layer2 multicast), and more powerful then sipxecs..
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>
is above right? from_provider, then $1 XML provider? (assuming _{provider} is the friendly name)
<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>
And you just have to add the right extensions in those dialplans to bridge calls to the other side. That's the easy part.
famous last words. where caller is 561-555-1212 and destination is 301-555-1212. I see it coming from provider in public context:(i hope) close: Dialplan: sofia/external/5615551212@68.100.226.97 parsing [public-
from_provider] continue=false Dialplan: sofia/external/5615551212@68.100.226.97 Regex (PASS) [from_provider] network_addr(68.233.226.97) =~ /68.233.226.97/ break=on-false Dialplan: sofia/external/5615551212@68.100.226.97 Regex (PASS) [from_provider] destination_number(3015551212) =~ /^(.*)$/ break=on- false Dialplan: sofia/external/5615551212@68.100.226.97 Action transfer(3015551212 XML provider) [snip] 2010-08-25 10:52:16.276232 [DEBUG] mod_dptools.c:748 sofia/external/5615551212@68.100.226.97 SET [outside_call]=[true] [snip] gets this far: 2010-08-25 10:52:16.278237 [INFO] mod_dialplan_xml.c:315 Processing 5615551212->3015551212 in context provider 2010-08-25 10:52:16.278237 [WARNING] mod_dialplan_xml.c:345 Context provider not found
I guess I don't understand. as a test, PSTN number is 3015551212, coming from provider to sipxecs, do I put something like this in dialplan/provider.xml? dialplan/public/provider.xml?
(I just want the call send to sipxecs. I don't care about ringback, timeouts.. I guess.. maybe I do for safety) so if a call come in to 3015551212, and its handled by sipxecs, and, MAYBE, I think I want it to fall back to a cell phone if sipxecs is down (say a 120 second timeout?) what do I put here? (what do I per where?)
or this?
<extension name="provider"> <condition field="destination_number" expression="^(3015551212)$"> <action application="bridge" data="sofia/gateway/sipxecs/$1"/> </condition> </extension> (with 'bridge' I get 'so far', but still get 2010-08-25 15:14:15.590404 [INFO] mod_dialplan_xml.c:315 Processing 5615551212->3015551212 in context provider 2010-08-25 15:14:15.590404 [WARNING] mod_dialplan_xml.c:345 Context provider not found 2010-08-25 15:14:15.590404 [INFO] switch_core_state_machine.c:136 No Route, Aborting
-- Michael Scheidell, CTO o: 561-999-5000 d: 561-948-2259 ISN: 1259*1300 sip:michael.scheidell@secnap.com
| 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/
participants (3)
-
David Ponzone
-
jesse
-
Michael Scheidell