This may have been asked before but my research hasn't turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? Thanks, Matt Putnam
Hi Matt, Welcome to FreeSWITCH! If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net. -MC (IRC:mercutioviz) On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com>wrote:
This may have been asked before but my research hasn’t turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? ****
** **
** **
Thanks,****
Matt Putnam****
** **
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah? Thanks, Matt Putnam matt.putnam@lightspar.com From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: Wednesday, September 05, 2012 6:49 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch Hi Matt, Welcome to FreeSWITCH! If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net<http://irc.freenode.net>. -MC (IRC:mercutioviz) On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: This may have been asked before but my research hasn't turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? Thanks, Matt Putnam _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 -- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12
Matt, Question: do you even need a registration? The reason I ask is that you can send calls to a server without having an actual registration. When you have a registration then you can employ the "sofia_contact user@domain" API to get a Sofia dialstring. However, if you know the user and domain/IP address then you can just send a call there directly: <action application="bridge" data="sofia/internal/5551212@lightspar1"/> I think your real challenge is handling the inbound call on the freeswitch1 box. That's all dialplan. Look in the example configs: conf/dialplan/public/00_inbound_did.xml has an example of routing a call to DID 5551212; the example extension will send the inbound call to extension 1000. You just need to copy that sample extension and set it to match your DID and then bridge the call to your trunk. -MC On Thu, Sep 6, 2012 at 7:42 AM, Matt Putnam <matt.putnam@lightspar.com>wrote:
Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah?****
** **
Thanks,****
Matt Putnam****
matt.putnam@lightspar.com****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Michael Collins *Sent:* Wednesday, September 05, 2012 6:49 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch****
** **
Hi Matt,
Welcome to FreeSWITCH!
If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net.
-MC (IRC:mercutioviz)****
On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com> wrote:****
This may have been asked before but my research hasn’t turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? ****
****
****
Thanks,****
Matt Putnam****
****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
**** ------------------------------
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12* ***
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Registration is not necessary in most situations but there are a few situation where a customer is not on a static ip so registration would be necessary. Thanks, Matt Putnam matt.putnam@lightspar.com From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: Thursday, September 06, 2012 10:43 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch Matt, Question: do you even need a registration? The reason I ask is that you can send calls to a server without having an actual registration. When you have a registration then you can employ the "sofia_contact user@domain" API to get a Sofia dialstring. However, if you know the user and domain/IP address then you can just send a call there directly: <action application="bridge" data="sofia/internal/5551212@lightspar1"/> I think your real challenge is handling the inbound call on the freeswitch1 box. That's all dialplan. Look in the example configs: conf/dialplan/public/00_inbound_did.xml has an example of routing a call to DID 5551212; the example extension will send the inbound call to extension 1000. You just need to copy that sample extension and set it to match your DID and then bridge the call to your trunk. -MC On Thu, Sep 6, 2012 at 7:42 AM, Matt Putnam <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah? Thanks, Matt Putnam matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com> From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] On Behalf Of Michael Collins Sent: Wednesday, September 05, 2012 6:49 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch Hi Matt, Welcome to FreeSWITCH! If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net<http://irc.freenode.net>. -MC (IRC:mercutioviz) On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: This may have been asked before but my research hasn't turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? Thanks, Matt Putnam _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 -- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12 _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 -- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5252 - Release Date: 09/06/12
I'm confused. I've read your message about three times, still don't completely understand. Brian Foster Endigo Computer LLC Sent from a mobile device. On Sep 6, 2012 10:44 AM, "Matt Putnam" <matt.putnam@lightspar.com> wrote:
Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah?****
** **
Thanks,****
Matt Putnam****
matt.putnam@lightspar.com****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Michael Collins *Sent:* Wednesday, September 05, 2012 6:49 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch****
** **
Hi Matt,
Welcome to FreeSWITCH!
If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net.
-MC (IRC:mercutioviz)****
On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com> wrote:****
This may have been asked before but my research hasn’t turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? ****
****
****
Thanks,****
Matt Putnam****
****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
**** ------------------------------
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12* ***
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
Sorry for the confusion I can really only equate it to asterisk as that's what our current platform is. Essentially the problem is that if I have a PBX that has a trunk that is registered to freeswitch and a call is received for a DID that is on that trunk I am currently unable to send that DID to the PBX. When the call is received on the PBX side it looks as if the call is for the trunk instead of the DID is should be for. So in the SIP invite instead of using lightspar1@domain it would use 5551212@domain. In asterisk this was simply accomplished by a dial statement of (SIP/5551212@lightspar1) what I am looking for is that equivalent in freeswitch. Thanks, Matt Putnam matt.putnam@lightspar.com From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Brian Foster Sent: Thursday, September 06, 2012 10:48 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch I'm confused. I've read your message about three times, still don't completely understand. Brian Foster Endigo Computer LLC Sent from a mobile device. On Sep 6, 2012 10:44 AM, "Matt Putnam" <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah? Thanks, Matt Putnam matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com> From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] On Behalf Of Michael Collins Sent: Wednesday, September 05, 2012 6:49 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch Hi Matt, Welcome to FreeSWITCH! If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net<http://irc.freenode.net>. -MC (IRC:mercutioviz) On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: This may have been asked before but my research hasn't turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? Thanks, Matt Putnam _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 -- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12 _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5252 - Release Date: 09/06/12
You might try to use the info app to see if there is a variable with the did number -- I have seen trunks do that myself. Matt Putnam <matt.putnam@lightspar.com> wrote:
Sorry for the confusion I can really only equate it to asterisk as that's what our current platform is. Essentially the problem is that if I have a PBX that has a trunk that is registered to freeswitch and a call is received for a DID that is on that trunk I am currently unable to send that DID to the PBX. When the call is received on the PBX side it looks as if the call is for the trunk instead of the DID is should be for. So in the SIP invite instead of using lightspar1@domain it would use 5551212@domain. In asterisk this was simply accomplished by a dial statement of (SIP/5551212@lightspar1) what I am looking for is that equivalent in freeswitch.
Thanks, Matt Putnam matt.putnam@lightspar.com
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Brian Foster Sent: Thursday, September 06, 2012 10:48 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch
I'm confused. I've read your message about three times, still don't completely understand.
Brian Foster Endigo Computer LLC
Sent from a mobile device. On Sep 6, 2012 10:44 AM, "Matt Putnam" <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah?
Thanks, Matt Putnam matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>
From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] On Behalf Of Michael Collins Sent: Wednesday, September 05, 2012 6:49 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch
Hi Matt,
Welcome to FreeSWITCH!
If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net<http://irc.freenode.net>.
-MC (IRC:mercutioviz) On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: This may have been asked before but my research hasn't turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system?
Thanks, Matt Putnam
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5252 - Release Date: 09/06/12
---------------------------------------------------- Alternatives:
---------------------------------------------------- _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
-- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com
No worries - it is indeed a total paradigm shift and things may seem unusual. If you have a PBX registered with FreeSWITCH then from the FS perspective it's a "user". Don't let the name "user" fool you - it's just a label, and it's easier to write than "SIP registered endpoint." So, if your trunk is registered then that means you've got an entry in conf/directory/default/ that defines the "user". An example in there already is 1000.xml, where the id="1000". So to route a call to that "user" just do this: <action application="bridge" data="user/1000"/> That's it! FS does a lot of magic behind the scenes. So in the case of your DID, you need to add a dialplan entry. I recommend making a copy of conf/dialplan/default/00_inbound_did.xml and editing it to suit your needs. Let's say that your DID is 8005551212 and that your PBX is registered as user 1234. This dialplan entry would route an inbound DID call to your PBX: <extension name="DID"> <condition field="destination_number" expression="^\+?1?8005551212"> <action application="bridge" data="user/1234"/> </condition> </extension> Note I added some regex magic to strip out optional leading + or 1. Let us know how that works. Be sure to join IRC if you want to discuss it in real time. -MC On Thu, Sep 6, 2012 at 12:09 PM, Matt Putnam <matt.putnam@lightspar.com>wrote:
Sorry for the confusion I can really only equate it to asterisk as that’s what our current platform is. Essentially the problem is that if I have a PBX that has a trunk that is registered to freeswitch and a call is received for a DID that is on that trunk I am currently unable to send that DID to the PBX. When the call is received on the PBX side it looks as if the call is for the trunk instead of the DID is should be for. So in the SIP invite instead of using lightspar1@domain it would use 5551212@domain.In asterisk this was simply accomplished by a dial statement of (SIP/5551212@lightspar1) what I am looking for is that equivalent in freeswitch.****
** **
Thanks,****
Matt Putnam****
matt.putnam@lightspar.com****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Brian Foster *Sent:* Thursday, September 06, 2012 10:48 AM
*To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch****
** **
I'm confused. I've read your message about three times, still don't completely understand.****
Brian Foster Endigo Computer LLC****
Sent from a mobile device.****
On Sep 6, 2012 10:44 AM, "Matt Putnam" <matt.putnam@lightspar.com> wrote:* ***
Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah?****
****
Thanks,****
Matt Putnam****
matt.putnam@lightspar.com****
****
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Michael Collins *Sent:* Wednesday, September 05, 2012 6:49 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch****
****
Hi Matt,
Welcome to FreeSWITCH!
If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net.
-MC (IRC:mercutioviz)****
On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com> wrote:****
This may have been asked before but my research hasn’t turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? ****
****
****
Thanks,****
Matt Putnam****
****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org**** ------------------------------
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12* ***
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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**** ------------------------------
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2197 / Virus Database: 2437/5252 - Release Date: 09/06/12* ***
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Thanks for the response Michael. Below is my code that I have been using in my directory the problem is that when the call is placed to the user they see the call as coming from lightspar1 not 9725551212. Which to me would mean I would have to have a registration for each DID that would be routed to a box with registration which I would like to avoid. What I am trying to find is a way to pass the destination number received on the gateway through to the registered user instead of it using the username as the destination number. I did find in the documentation for sofia where it mentions appending a ^<toheader> but that doesn't appear to work with the user/ it just returns a warning that user not found. Gateway Config <extension name="9725551212"> <condition field="destination_number" expression="^9725551212$"> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="user/lightspar1@${domain}"/> <action application="hangup"/> </condition> </extension> PBX Output: Dialplan: sofia/external/9725551213@192.168.1.2 Regex (FAIL) [9725551212] destination_number(lightspar1) =~ /^9725551212$/ break=on-false Thanks, Matt Putnam matt.putnam@lightspar.com From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: Thursday, September 06, 2012 5:35 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch No worries - it is indeed a total paradigm shift and things may seem unusual. If you have a PBX registered with FreeSWITCH then from the FS perspective it's a "user". Don't let the name "user" fool you - it's just a label, and it's easier to write than "SIP registered endpoint." So, if your trunk is registered then that means you've got an entry in conf/directory/default/ that defines the "user". An example in there already is 1000.xml, where the id="1000". So to route a call to that "user" just do this: <action application="bridge" data="user/1000"/> That's it! FS does a lot of magic behind the scenes. So in the case of your DID, you need to add a dialplan entry. I recommend making a copy of conf/dialplan/default/00_inbound_did.xml and editing it to suit your needs. Let's say that your DID is 8005551212<tel:8005551212> and that your PBX is registered as user 1234. This dialplan entry would route an inbound DID call to your PBX: <extension name="DID"> <condition field="destination_number" expression="^\+?1?8005551212<tel:8005551212>"> <action application="bridge" data="user/1234"/> </condition> </extension> Note I added some regex magic to strip out optional leading + or 1. Let us know how that works. Be sure to join IRC if you want to discuss it in real time. -MC On Thu, Sep 6, 2012 at 12:09 PM, Matt Putnam <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: Sorry for the confusion I can really only equate it to asterisk as that's what our current platform is. Essentially the problem is that if I have a PBX that has a trunk that is registered to freeswitch and a call is received for a DID that is on that trunk I am currently unable to send that DID to the PBX. When the call is received on the PBX side it looks as if the call is for the trunk instead of the DID is should be for. So in the SIP invite instead of using lightspar1@domain it would use 5551212@domain. In asterisk this was simply accomplished by a dial statement of (SIP/5551212@lightspar1) what I am looking for is that equivalent in freeswitch. Thanks, Matt Putnam matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com> From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] On Behalf Of Brian Foster Sent: Thursday, September 06, 2012 10:48 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch I'm confused. I've read your message about three times, still don't completely understand. Brian Foster Endigo Computer LLC Sent from a mobile device. On Sep 6, 2012 10:44 AM, "Matt Putnam" <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah? Thanks, Matt Putnam matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com> From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] On Behalf Of Michael Collins Sent: Wednesday, September 05, 2012 6:49 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch Hi Matt, Welcome to FreeSWITCH! If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net<http://irc.freenode.net>. -MC (IRC:mercutioviz) On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com<mailto:matt.putnam@lightspar.com>> wrote: This may have been asked before but my research hasn't turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? Thanks, Matt Putnam _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 -- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12 _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5252 - Release Date: 09/06/12 _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 -- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org ________________________________ No virus found in this message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 2012.0.2197 / Virus Database: 2437/5252 - Release Date: 09/06/12
On Fri, Sep 07, 2012 at 09:50:45AM -0500, Matt Putnam wrote:
Thanks for the response Michael. Below is my code that I have been using in my directory the problem is that when the call is placed to the user they see the call as coming from lightspar1 not 9725551212.
I'm not suggesting that this is necessarily the "correct" way to implement what you are trying to setup, but you may find that this works for this specific scenario: <action application="bridge" data="{sip_invite_req_uri=sip:${destination_number}@${domain}}user/lightspar1@${domain}"/> Regards,
Using your code with the variables causes freeswitch on my gateway to crash. If I replace the variables with hard coded number and ip it doesn't crash but I get the error below. 2012-09-07 11:37:41.036394 [NOTICE] switch_ivr_originate.c:2554 Cannot create outgoing channel of type [user] cause: [EXCHANGE_ROUT ING_ERROR] Thanks, Matt Putnam matt.putnam@lightspar.com -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Paul Cupis Sent: Friday, September 07, 2012 11:04 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch On Fri, Sep 07, 2012 at 09:50:45AM -0500, Matt Putnam wrote:
Thanks for the response Michael. Below is my code that I have been using in my directory the problem is that when the call is placed to the user they see the call as coming from lightspar1 not 9725551212.
I'm not suggesting that this is necessarily the "correct" way to implement what you are trying to setup, but you may find that this works for this specific scenario: <action application="bridge" data="{sip_invite_req_uri=sip:${destination_number}@${domain}}user/lightspar1@${domain}"/> Regards, _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2197 / Virus Database: 2437/5254 - Release Date: 09/07/12
From your PBX output you listed... I'm no expert here, but the regex won't match the incoming number: assuming that your domain is actually "192.168.1.2", 972555121*3* won't match 972555121*2*. But then, I'm a novice, so perhaps I'm missing something.
Cheers, James On Fri, Sep 7, 2012 at 7:50 AM, Matt Putnam <matt.putnam@lightspar.com>wrote:
Thanks for the response Michael. Below is my code that I have been using in my directory the problem is that when the call is placed to the user they see the call as coming from lightspar1 not 9725551212. Which to me would mean I would have to have a registration for each DID that would be routed to a box with registration which I would like to avoid. What I am trying to find is a way to pass the destination number received on the gateway through to the registered user instead of it using the username as the destination number. I did find in the documentation for sofia where it mentions appending a ^<toheader> but that doesn’t appear to work with the user/ it just returns a warning that user not found. ****
** **
Gateway Config****
<extension name="9725551212">****
<condition field="destination_number" expression="^9725551212$">****
<action application="set" data="hangup_after_bridge=true"/>****
<action application="bridge" data="user/lightspar1@${domain}"/>****
<action application="hangup"/>****
</condition>****
</extension>****
** **
PBX Output:****
Dialplan: sofia/external/9725551213@192.168.1.2 Regex (FAIL) [9725551212] destination_number(lightspar1) =~ /^9725551212$/ break=on-false****
** **
Thanks,****
Matt Putnam****
matt.putnam@lightspar.com****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Michael Collins *Sent:* Thursday, September 06, 2012 5:35 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch****
** **
No worries - it is indeed a total paradigm shift and things may seem unusual. If you have a PBX registered with FreeSWITCH then from the FS perspective it's a "user". Don't let the name "user" fool you - it's just a label, and it's easier to write than "SIP registered endpoint."
So, if your trunk is registered then that means you've got an entry in conf/directory/default/ that defines the "user". An example in there already is 1000.xml, where the id="1000". So to route a call to that "user" just do this:
<action application="bridge" data="user/1000"/>
That's it! FS does a lot of magic behind the scenes. So in the case of your DID, you need to add a dialplan entry. I recommend making a copy of conf/dialplan/default/00_inbound_did.xml and editing it to suit your needs. Let's say that your DID is 8005551212 and that your PBX is registered as user 1234. This dialplan entry would route an inbound DID call to your PBX:
<extension name="DID"> <condition field="destination_number" expression="^\+?1?8005551212"> <action application="bridge" data="user/1234"/> </condition> </extension>
Note I added some regex magic to strip out optional leading + or 1.
Let us know how that works. Be sure to join IRC if you want to discuss it in real time. -MC****
On Thu, Sep 6, 2012 at 12:09 PM, Matt Putnam <matt.putnam@lightspar.com> wrote:****
Sorry for the confusion I can really only equate it to asterisk as that’s what our current platform is. Essentially the problem is that if I have a PBX that has a trunk that is registered to freeswitch and a call is received for a DID that is on that trunk I am currently unable to send that DID to the PBX. When the call is received on the PBX side it looks as if the call is for the trunk instead of the DID is should be for. So in the SIP invite instead of using lightspar1@domain it would use 5551212@domain.In asterisk this was simply accomplished by a dial statement of (SIP/5551212@lightspar1) what I am looking for is that equivalent in freeswitch.****
****
Thanks,****
Matt Putnam****
matt.putnam@lightspar.com****
****
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Brian Foster *Sent:* Thursday, September 06, 2012 10:48 AM****
*To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch****
****
I'm confused. I've read your message about three times, still don't completely understand.****
Brian Foster Endigo Computer LLC****
Sent from a mobile device.****
On Sep 6, 2012 10:44 AM, "Matt Putnam" <matt.putnam@lightspar.com> wrote:* ***
Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah?****
****
Thanks,****
Matt Putnam****
matt.putnam@lightspar.com****
****
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Michael Collins *Sent:* Wednesday, September 05, 2012 6:49 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch****
****
Hi Matt,
Welcome to FreeSWITCH!
If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it's a "user" or a "trunk" really doesn't matter - it's just a SIP registration. Look in conf/directory/default/1000.xml (if using the example "vanilla" configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on irc.freenode.net.
-MC (IRC:mercutioviz)****
On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam <matt.putnam@lightspar.com> wrote:****
This may have been asked before but my research hasn’t turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? ****
****
****
Thanks,****
Matt Putnam****
****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org**** ------------------------------
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12* ***
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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**** ------------------------------
No virus found in this message. Checked by AVG - www.avg.com****
Version: 2012.0.2197 / Virus Database: 2437/5252 - Release Date: 09/06/12* ***
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
**** ------------------------------
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2197 / Virus Database: 2437/5252 - Release Date: 09/06/12* ***
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 06/09/12 20:09, Matt Putnam wrote:
Sorry for the confusion I can really only equate it to asterisk as that’s what our current platform is. Essentially the problem is that if I have a PBX that has a trunk that is registered to freeswitch and a call is received for a DID that is on that trunk I am currently unable to send that DID to the PBX. When the call is received on the PBX side it looks as if the call is for the trunk instead of the DID is should be for. So in the SIP invite instead of using lightspar1@domain it would use 5551212@domain. In asterisk this was simply accomplished by a dial statement of (SIP/5551212@lightspar1) what I am looking for is that equivalent in freeswitch.
Do you have a copy of the FreeSWITCH Cookbook? This requirement sounds similar to one of the recipes in the book. <extension name="9725551212"> <condition field="destination_number" expression="^9725551212$"/> <condition field="${sofia_contact(lightspar1@${domain})}" expression="^[^\@]+(.*)"> <action application="bridge" data="sofia/external/9725551212$1"/> </condition> </extension> The sofia_contact bit should work out the dialstring and then strip everything before the '@' (in your example this would be 'lightspar1') and then the bridge prepends the destination number. Regards,
If the other PBX is FreeSWITCH you need.to rewrite the Request URI before sending to the receiving FS box. Sending the username before the @ in the request URI is done by default but if you need to differentiate DIDs then you have to rewrite the request URI to that DID so it does show up in DESTINATION_NUMBER. Search RURI on the wiki. If it's coming from another PBX that's not FS we can't help and if that's coming from your provider its time for another provider. Brian Foster Endigo Computer LLC Sent from a mobile device. On Sep 7, 2012 3:48 PM, "Paul Cupis" <paul@cupis.co.uk> wrote:
On 06/09/12 20:09, Matt Putnam wrote:
Sorry for the confusion I can really only equate it to asterisk as that’s what our current platform is. Essentially the problem is that if I have a PBX that has a trunk that is registered to freeswitch and a call is received for a DID that is on that trunk I am currently unable to send that DID to the PBX. When the call is received on the PBX side it looks as if the call is for the trunk instead of the DID is should be for. So in the SIP invite instead of using lightspar1@domain it would use 5551212@domain. In asterisk this was simply accomplished by a dial statement of (SIP/5551212@lightspar1) what I am looking for is that equivalent in freeswitch.
Do you have a copy of the FreeSWITCH Cookbook? This requirement sounds similar to one of the recipes in the book.
<extension name="9725551212"> <condition field="destination_number" expression="^9725551212$"/>
<condition field="${sofia_contact(lightspar1@${domain})}" expression="^[^\@]+(.*)"> <action application="bridge" data="sofia/external/9725551212$1"/> </condition> </extension>
The sofia_contact bit should work out the dialstring and then strip everything before the '@' (in your example this would be 'lightspar1') and then the bridge prepends the destination number.
Regards,
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
under \freeswitch\conf\sip\default or public, modify any template suit you. 在 2012-9-6 上午6:21,"Matt Putnam" <matt.putnam@lightspar.com>写道:
This may have been asked before but my research hasn’t turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? ****
** **
** **
Thanks,****
Matt Putnam****
** **
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
participants (7)
-
Brian Foster
-
covici@ccs.covici.com
-
James
-
Matt Putnam
-
Michael Collins
-
Paul Cupis
-
Pip Live