• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Need help on SUPER simple FreeSWITCH setup

Scheduled Pinned Locked Moved pfSense Packages
6 Posts 2 Posters 8.8k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    blacklotus
    last edited by Jun 30, 2009, 4:49 AM

    i was just messing around with the freeswitch package and while i have read the wiki info on the dialplan along with almost every other bit of info i've stumbled upon, i'm still stumped with what SHOULD be a very basic freeswitch setup.

    the whole reason i would like to use the freeswitch is to augment my existing pbx. while my pbx (Panasonic TDE) does support sip trunks and stations, it doesn't support STUN or any other type of NAT traversal for extensions! (lame, eh?) I NEED to get some working sip stations out on the internet though.

    to get around this i was figuring on putting stations off the panasonic as sip trunks into the freeswitch and having a 1:1 mapping of trunks to stations off the freeswitch like:

    [Internet/SIP users]–-<--<--<--[pfSense/FreeSWITCH]–-<--<--<--[Panasonic TDE]
                                                  <wan>          <lan>the biggest problem i'm having is figuring out how to configure the dial plan to force a 1:1 mapping of sip trunk (from Pana) to SIP station (off freeswitch)

    also, i haven't tested it yet but how well does freeswitch work with sip clients out on the internet behind NAT? i was planning on using x-lite and am assuming it works fine?

    TIA</lan></wan>

    1 Reply Last reply Reply Quote 0
    • C
      cybrsrfr
      last edited by Jul 4, 2009, 4:08 AM

      I was on vacation when you asked this question and am slowly catching up.

      If you want to setup FreeSWITCH as a proxy server then you will need to read take a look at wiki.freeswitch.org. This link may or may not help you. http://wiki.freeswitch.org/wiki/SBC_Setup other info at http://wiki.freeswitch.org/wiki/Proxy_Media

      Your other choice is to setup a gateway to register to your provider and then setup an extension for your phone system to register to on the WAN ip. If you want to register to the LAN ip then that could possibly also work. This approach I have done between FreeSWITCH servers and its quite easy to do.

      Hope this helps.

      Best Regards, Mark

      1 Reply Last reply Reply Quote 0
      • B
        blacklotus
        last edited by Jul 8, 2009, 2:19 AM

        @mcrane:

        Your other choice is to setup a gateway to register to your provider and then setup an extension for your phone system to register to on the WAN ip. If you want to register to the LAN ip then that could possibly also work. This approach I have done between FreeSWITCH servers and its quite easy to do.

        thanks mark, i looked up the other info and i take it that kamailio is not part of the pfsense package?
        fyi, i am a linux/bsd n00b and although i can follow instructions and enter commands,
        A. i'm not that experienced at adding/removing programs via cli
        B. i'd like something that is easy to duplicate and preferably through your gui
        C. i'd like to make sure that the config is fully supported through the package

        the second option actually sounds more like what i would like to do anyways, but i think you misunderstand what i'm trying to do.
        what i'm actually trying is to setup a gateway to register to a SIP extension off the Panasonic (on the LAN) then have a SIP client (x-lite) on the WAN side use the gateway to the Panasonic 1:1

        x-lite(x201)–-\                      pfsense/freeswitch      /sip.ext101
        x-lite(x202)---->--(Internet)---[WAN]–----[LAN]–-<-sip.ext102->---[PanaTDE]–------PSTN
        x-lite(x203)---/                    <ext   ="" gatewy="">    \sip.ext103/    <sip.extensions<br>i hope that makes (some) sense, i know it may be a weird setup.
        what i'm trying to do is if ext 201 picks up a line to dial out it only grabs the gateway attached to the sip extension 101 off the Panasonic. also if the Panasonic rings its own sip ext 101, it needs to ring ext 201 on freeswitch. i'd also need  the same 1:1 mapping on the other extensions, does that make sense?

        so far i must be an idiot because i can't even get x-lite to register on freeswitch! i followed the screenshots, but don't see anything on how to configure the freeswitch extension. i'm probably missing some something simple.

        anyways, your help is greatly appreciated. btw i'll gladly donate if you can help me get this running
        thanks</sip.extensions<br></ext >

        1 Reply Last reply Reply Quote 0
        • C
          cybrsrfr
          last edited by Jul 8, 2009, 6:17 AM

          You diagram helps a lot to help me understand what you want to do it pretty close to the opposite of what I was thinking.

          In order to have your extensions register to the WAN IP you need to set two rules to allow the SIP and RTP traffic to the WAN interface. See the following: http://doc.pfsense.org/index.php/FreeSWITCH#Firewall and the screenshot should help too: http://doc.pfsense.org/index.php/Screenshot

          The internal sip profile by default handles the registrations and binds to the WAN ip address.  If you have a static IP address then just use the static IP. If you have a dynamic dns then I suggest setting up a dynamic dns domain through dyndns.org then you would define that domain from the 'Vars' tab and set the domain=toyourdomain.dyndns.org. Restart FreeSWITCH and you would then see the domain from the 'Status' tab if it was done correctly.

          Right click on Xlite and then click on 'SIP Account Settings'.
          Account tab:
          Display Name: Can be anything you want
          User name: extension number
          Password: is whatever you saved
          Authorization user name: extension number
          Domain: if you have a static ip is the IP address of the WAN or if using a domain then the domain goes here
          'Register with the domain and receive incoming calls' should be checked
          Send oubound via: domain should be selected

          Voicemail
          'Number to dial for checking voicemail' *98

          All other defaults should be fine just apply the changes

          And if it registers you will see: 'Ready, Your username is:' and your extension number.

          FreeSWITCH extension:
          Should be pretty self explanatory. Extension numbers can be any 3 or 4 digit number.
          One thing that people often get wrong is to miss setting the 'User Context' to the default which is 'default'.

          FreeSWITCH gateway:
          This is where you will setup an account to register to the extensions on your existing phone system.

          Additional notes.
          The dialplan expression tool on the Gateway is the shortcut for adding outbound routes (numbers you are allowed to call through this gateway)

          Inbound calls are directed to their destination from the Public tab. In your situation you would look for some variable associated with the inbound call likely the 'destination_number' which will probably be the extension number and then use that to match and  transfer the call to the correct extension.

          Hopefully that will get you farther along. Feel free to post additional questions here. Good Luck!

          1 Reply Last reply Reply Quote 0
          • B
            blacklotus
            last edited by Jul 29, 2009, 1:13 AM

            @mcrane:

            You diagram helps a lot to help me understand what you want to do it pretty close to the opposite of what I was thinking.
            FreeSWITCH gateway:
            This is where you will setup an account to register to the extensions on your existing phone system.
            Additional notes.
            The dialplan expression tool on the Gateway is the shortcut for adding outbound routes (numbers you are allowed to call through this gateway)

            Thank you for taking the time to help me out. i've been so busy on other projects and i finally got time to work on this again but now its crunch time!
            so now i got the sip extension registering on freepbx from the outside, but not from the inside, any ideas? there shouldn't be any firewall rules blocking traffic from the inside. it's hard for me to test if the stations truly are working because i only have one x-lite extension on the outside to test with right now…

            a couple other things, i THINK i have registered a gateway to my pbx's sip extension both sides say registered, but ihave no idea how to get it to work. on the public tab i set an action to transfer to ext201 and set the gateway context to "public" but i am getting a busy/reorder tone from the panasonic when i try the sip extension (101 connected to the gateway). i don't have any idea where this is failing but i simply need the GW attached to Panasonic x101 to always ring only x201 on FreePBX.

            a third q about the outbound dialing plan, i'd like the freeswitch extensions to each pick a single dedicated outbound gateway no matter what they dial. in fact, i pretty much don't plan on parsing ANY digit dialing on the freeswitch side. i'd like to pass EVERYTHING through to the Panasonic. if i dial a 1, 3, 4, 7, 10 or more digits on x201, i want it to use the gateway connected to x101 on the Panasonic & let the panasonic handle call routing etc. the same for the other extensions 202, etc (refer to diagram above for clarification).

            once again i noticed that you seem to be very helpful to everyone here and we all appreciate it!
            i feel like i'm so close to getting this to actually work!

            1 Reply Last reply Reply Quote 0
            • B
              blacklotus
              last edited by Aug 14, 2009, 6:51 AM

              @mcrane:

              Hopefully that will get you farther along. Feel free to post additional questions here. Good Luck!

              ok, so i've really been working on this and have been able to get external sip soft phones working on Freeswitch per your instructions

              now what i've done (to simplify things) is i put my Panasonic PBX on the public side of the pfsense, i have multiple public IP's. it looks like this:

              x-lite(x501)–-\                            pfsense/freeswitch     
              x-lite(x502)---->--(Internet)---IP1-[WAN]–----[LAN]–---[Internal Network]
              x-lite(x503)–-/                      /
                                                        /
                                                [Gateway IP2]
                                                [PanaTDE PBX]–-----PSTN
                                                sip.ext 401-403

              the wierd thing is that i can't seem to get FreeSwitch to register the gateways, then when i check the logs i keep seeing 107@IP#2 and i don't even have an extension or gateway with 107 in it. however i think i may have used that extension early on in my testing. in fact my first name "Ryan" is in there as well, even though my name isn't anywhere to be found in the configs anymore! i think its keeping some stuff from early on in there that i can't see.

              i've restored the default profiles and vars and can't seem to get rid of it. what should i do? i don't even mind defaulting the whole thing and starting over, i just can't redo pfsense because its a production box

              is there possibly anything else you might see wrong with my setup here?

              here's the log:
              2009-08-13 23:16:00.466667 [DEBUG] sofia_glue.c:2039 Set Codec sofia/external/107@X.IP.2.X PCMU/8000 20 ms 160 samples
              2009-08-13 23:16:00.466667 [DEBUG] sofia.c:3376 (sofia/external/107@X.IP.2.X) State Change CS_NEW -> CS_INIT
              2009-08-13 23:16:00.466667 [DEBUG] switch_core_session.c:933 Send signal sofia/external/107@X.IP.2.X [BREAK]
              2009-08-13 23:16:00.466667 [DEBUG] switch_core_state_machine.c:397 (sofia/external/107@X.IP.2.X) Running State Change CS_INIT
              2009-08-13 23:16:00.466667 [DEBUG] switch_core_state_machine.c:480 (sofia/external/107@X.IP.2.X) State INIT
              2009-08-13 23:16:00.466667 [DEBUG] mod_sofia.c:83 sofia/external/107@X.IP.2.X SOFIA INIT
              2009-08-13 23:16:00.466667 [DEBUG] mod_sofia.c:111 (sofia/external/107@X.IP.2.X) State Change CS_INIT -> CS_ROUTING
              2009-08-13 23:16:00.466667 [DEBUG] switch_core_session.c:933 Send signal sofia/external/107@X.IP.2.X [BREAK]
              2009-08-13 23:16:00.466667 [DEBUG] switch_core_state_machine.c:480 (sofia/external/107@X.IP.2.X) State INIT going to sleep
              2009-08-13 23:16:00.466667 [DEBUG] switch_core_state_machine.c:397 (sofia/external/107@X.IP.2.X) Running State Change CS_ROUTING
              2009-08-13 23:16:00.466667 [DEBUG] switch_core_state_machine.c:483 (sofia/external/107@X.IP.2.X) State ROUTING
              2009-08-13 23:16:00.466667 [DEBUG] mod_sofia.c:130 sofia/external/107@X.IP.2.X SOFIA ROUTING
              2009-08-13 23:16:00.466667 [DEBUG] switch_core_state_machine.c:78 sofia/external/107@X.IP.2.X Standard ROUTING
              2009-08-13 23:16:00.466667 [INFO] mod_dialplan_xml.c:252 Processing Ryan->401 in context public
              Dialplan: sofia/external/107@X.IP.2.X parsing [public->unloop] continue=false
              Dialplan: sofia/external/107@X.IP.2.X Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-false
              Dialplan: sofia/external/107@X.IP.2.X Regex (FAIL) [unloop] ${sip_looped_call}() =~ /^true$/ break=on-false
              Dialplan: sofia/external/107@X.IP.2.X parsing [public->outside_call] continue=true
              Dialplan: sofia/external/107@X.IP.2.X Absolute Condition [outside_call]
              Dialplan: sofia/external/107@X.IP.2.X Action set(outside_call=true)
              Dialplan: sofia/external/107@X.IP.2.X parsing [public->call_debug] continue=true
              Dialplan: sofia/external/107@X.IP.2.X Regex (FAIL) [call_debug] ${call_debug}(false) =~ /^true$/ break=never
              Dialplan: sofia/external/107@X.IP.2.X parsing [public->x101] continue=false

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                [[user:consent.lead]]
                [[user:consent.not_received]]