[Freeswitch-users] Registering SIP Trunks to Freeswitch

James freeswitch at scottisheyes.com
Fri Sep 7 20:11:06 MSD 2012


>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 at 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 at 192.168.1.2 Regex (FAIL) [9725551212]
> destination_number(lightspar1) =~ /^9725551212$/ break=on-false****
>
> ** **
>
> Thanks,****
>
> Matt Putnam****
>
> matt.putnam at lightspar.com****
>
> ** **
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at 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 at 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 at domain it would use 5551212 at domain.In asterisk this was simply accomplished by a dial statement of
> (SIP/5551212 at lightspar1) what I am looking for is that equivalent in
> freeswitch.****
>
>  ****
>
> Thanks,****
>
> Matt Putnam****
>
> matt.putnam at lightspar.com****
>
>  ****
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at 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 at 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 at blah it would send the invite with NPANXXXXXX at blah?****
>
>  ****
>
> Thanks,****
>
> Matt Putnam****
>
> matt.putnam at lightspar.com****
>
>  ****
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at 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 at 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 at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org****
>
>
>
>
> --
> 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 at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org****
> ------------------------------
>
> 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 at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org****
>
>
>
>
> --
> 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 at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120907/2dcbe7ad/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list