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

    Freeswitch question

    pfSense Packages
    4
    17
    7.3k
    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.
    • chpalmerC
      chpalmer
      last edited by

      Yes it should be possible.

      again- Did you set up your firewall rules to allow connection from wan side?    He wont be able to connect if you haven't…

      Triggering snowflakes one by one..
      Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

      1 Reply Last reply Reply Quote 0
      • M
        mraarzoo
        last edited by

        Hi chpalmer, thanks for your help.
        yes i did setup firewall: rules as below to allow outside traffic.
        tcp/udp * * 10.0.0.1  16384 - 32768  rtp
        tcp/udp * * 10.0.0.1  5060 - 5080  sip

        this is my sofia status

        sofia status

        Name   Type                               Data State

        internal profile   sip:mod_sofia@74.210.49.xx:5060 RUNNING (0)
                        external profile   sip:mod_sofia@74.210.49.xx:5080 RUNNING (0)
                    74.210.49.xx   alias                           internal ALIASED
                    internal-ipv6 profile           sip:mod_sofia@[::1]:5060 RUNNING (0)
                          default   alias                           internal ALIASED
                              nat   alias                           external ALIASED
                        outbound   alias                           external ALIASED

        3 profiles 4 aliases

        sofia status profile internal
        sofia status profile internal

        =================================================================================================
        Name            internal
        Domain Name      N/A
        DBName          sofia_reg_internal
        Pres Hosts     
        Dialplan        XML
        Context          public
        Challenge Realm  auto_from
        RTP-IP          74.210.49.xx
        SIP-IP          74.210.49.xx
        URL              sip:mod_sofia@74.210.49.xx:5060
        BIND-URL        sip:mod_sofia@74.210.49.xx:5060
        HOLD-MUSIC      local_stream://moh
        OUTBOUND-PROXY  N/A
        CODECS          G722,PCMU,PCMA,GSM
        TEL-EVENT        101
        DTMF-MODE        rfc2833
        CNG              13
        SESSION-TO      0
        MAX-DIALOG      0
        NOMEDIA          false
        LATE-NEG        false
        PROXY-MEDIA      false
        AGGRESSIVENAT    false
        STUN_ENABLED    true
        STUN_AUTO_DISABLE false

        this is what freeswitch configured. what i want is my friend should be able to call me on my extension 1001 from his 1002 which is in my freeswitch. i hope this configuration would help.
        thanks for your great help.
        Mark

        1 Reply Last reply Reply Quote 0
        • M
          mraarzoo
          last edited by

          UPDATE: Finally manage to place calls between 2 extensions one is remote extension and one is local. had to play with the NAT. but still i am registering both extension on port 5060 as internal but still working fine. now the problem is i cant listen my voicemail. when i dial *4000 / 4000 to check the voicemail there is a recording the useris not available.
          any help would be appreciated. i just need a place or hint to play with.
          thanks
          Mark

          1 Reply Last reply Reply Quote 0
          • C
            cybrsrfr
            last edited by

            mraarzoo: in order to see what is going on you can go to the status page and look at the logs. Or you can access FreeSWITCH from the console or through ssh. Console access is available using fs_cli that is in the bin directory.
            cd /usr/local/freeswitch/bin/
            ./fs_cli -H 10.0.0.1
            (assuming in your case that the LAN ip is 10.0.0.1)

            If you have fs_cli open and you make a call to *4000 then it is easier to see what is going on. The *4000 only applies to the latest versions of the freeSWITCH package. If you have an older version then you would need to use 4000 to call voicemail. I suggest you make sure you are running the latest version.

            Additional Info.
            FreeSWITCH by default the internal profile binds to the WAN interface and does not bind to all interfaces. So registrations need to be done to the IP of the WAN. From the internal side of the network access is allowed by default. If you want to have extensions connect from the outside of the WAN then you need to allow SIP and RTP to the WAN interface IP. Before doing that make sure your extensions have strong passwords.

            1 Reply Last reply Reply Quote 0
            • M
              mraarzoo
              last edited by

              hi, this is what i received when i dial 4000. can you please help me why i am not able to check voicemail.
              thanks

              a=rtpmap:107 BV32/16000
              a=rtpmap:119 BV32-FEC/16000
              a=rtpmap:100 SPEEX/16000
              a=rtpmap:106 SPEEX-FEC/16000
              a=rtpmap:105 SPEEX-FEC/8000
              a=rtpmap:98 iLBC/8000
              a=rtpmap:101 telephone-event/8000
              a=fmtp:101 0-15
              a=alt:1 1 : 44DBk81c ++DuT3bS 192.168.0.112 42300

              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [BV32:107:16000:0]/[G722:9:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [BV32:107:16000:0]/[PCMU:0:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [BV32:107:16000:0]/[PCMA:8:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [BV32:107:16000:0]/[GSM:3:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [BV32-FEC:119:16000:0]/[G722:9:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [BV32-FEC:119:16000:0]/[PCMU:0:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [BV32-FEC:119:16000:0]/[PCMA:8:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [BV32-FEC:119:16000:0]/[GSM:3:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX💯16000:0]/[G722:9:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX💯16000:0]/[PCMU:0:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX💯16000:0]/[PCMA:8:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX💯16000:0]/[GSM:3:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX-FEC:106:16000:0]/[G722:9:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX-FEC:106:16000:0]/[PCMU:0:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX-FEC:106:16000:0]/[PCMA:8:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX-FEC:106:16000:0]/[GSM:3:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [PCMU:0:8000:0]/[G722:9:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [PCMU:0:8000:0]/[PCMU:0:8000:20]
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:1736 sofia_glue_tech_set_codec() Set Codec sofia/internal/1001@74.210.49.100:5060 PCMU/8000 20 ms 160 samples
              2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2561 sofia_glue_negotiate_sdp() Set 2833 dtmf payload to 101
              2009-05-04 22:45:12 [DEBUG] sofia.c:2962 sofia_handle_sip_i_state() (sofia/internal/1001@74.210.49.100:5060) State Change CS_NEW -> CS_INIT
              2009-05-04 22:45:12 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/internal/1001@74.210.49.100:5060 [BREAK]
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:390 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) Running State Change CS_INIT
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:469 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State INIT
              2009-05-04 22:45:12 [DEBUG] mod_sofia.c:83 sofia_on_init() sofia/internal/1001@74.210.49.100:5060 SOFIA INIT
              2009-05-04 22:45:12 [DEBUG] mod_sofia.c:111 sofia_on_init() (sofia/internal/1001@74.210.49.100:5060) State Change CS_INIT -> CS_ROUTING
              2009-05-04 22:45:12 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/internal/1001@74.210.49.100:5060 [BREAK]
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:469 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State INIT going to sleep
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:390 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) Running State Change CS_ROUTING
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:472 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State ROUTING
              2009-05-04 22:45:12 [DEBUG] mod_sofia.c:130 sofia_on_routing() sofia/internal/1001@74.210.49.100:5060 SOFIA ROUTING
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:71 switch_core_standard_on_routing() sofia/internal/1001@74.210.49.100:5060 Standard ROUTING
              2009-05-04 22:45:12 [INFO] mod_dialplan_xml.c:252 dialplan_hunt() Processing Ali's 1001 Account->4000 in context public
              Dialplan: sofia/internal/1001@74.210.49.100:5060 parsing [public->unloop] continue=false
              Dialplan: sofia/internal/1001@74.210.49.100:5060 Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-false
              Dialplan: sofia/internal/1001@74.210.49.100:5060 Regex (FAIL) [unloop] ${sip_looped_call}() =~ /^true$/ break=on-false
              Dialplan: sofia/internal/1001@74.210.49.100:5060 parsing [public->outside_call] continue=true
              Dialplan: sofia/internal/1001@74.210.49.100:5060 Absolute Condition [outside_call]
              Dialplan: sofia/internal/1001@74.210.49.100:5060 Action set(outside_call=true)
              Dialplan: sofia/internal/1001@74.210.49.100:5060 parsing [public->call_debug] continue=true
              Dialplan: sofia/internal/1001@74.210.49.100:5060 Regex (FAIL) [call_debug] ${call_debug}(false) =~ /^true$/ break=never
              Dialplan: sofia/internal/1001@74.210.49.100:5060 parsing [public->public_extensions] continue=false
              Dialplan: sofia/internal/1001@74.210.49.100:5060 Regex (FAIL) [public_extensions] destination_number(4000) =~ /^(10[01][0-9])$/ break=on-false
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:107 switch_core_standard_on_routing() (sofia/internal/1001@74.210.49.100:5060) State Change CS_ROUTING -> CS_EXECUTE
              2009-05-04 22:45:12 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/internal/1001@74.210.49.100:5060 [BREAK]
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:472 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State ROUTING going to sleep
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:390 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) Running State Change CS_EXECUTE
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:479 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State EXECUTE
              2009-05-04 22:45:12 [DEBUG] mod_sofia.c:173 sofia_on_execute() sofia/internal/1001@74.210.49.100:5060 SOFIA EXECUTE
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:144 switch_core_standard_on_execute() sofia/internal/1001@74.210.49.100:5060 Standard EXECUTE
              EXECUTE sofia/internal/1001@74.210.49.100:5060 set(outside_call=true)
              2009-05-04 22:45:12 [DEBUG] mod_dptools.c:747 set_function() sofia/internal/1001@74.210.49.100:5060 SET [outside_call]=[true]
              2009-05-04 22:45:12 [NOTICE] switch_core_state_machine.c:172 switch_core_standard_on_execute() Hangup sofia/internal/1001@74.210.49.100:5060 [CS_EXECUTE] [NORMAL_CLEARING]
              2009-05-04 22:45:12 [DEBUG] switch_channel.c:1612 switch_channel_perform_hangup() Send signal sofia/internal/1001@74.210.49.100:5060 [KILL]
              2009-05-04 22:45:12 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/internal/1001@74.210.49.100:5060 [BREAK]
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:479 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State EXECUTE going to sleep
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:390 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) Running State Change CS_HANGUP
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:430 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State HANGUP
              2009-05-04 22:45:12 [DEBUG] mod_sofia.c:287 sofia_on_hangup() Channel sofia/internal/1001@74.210.49.100:5060 hanging up, cause: NORMAL_CLEARING
              2009-05-04 22:45:12 [DEBUG] mod_sofia.c:361 sofia_on_hangup() Responding to INVITE with: 480
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:46 switch_core_standard_on_hangup() sofia/internal/1001@74.210.49.100:5060 Standard HANGUP, cause: NORMAL_CLEARING
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:430 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State HANGUP going to sleep
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:466 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State Change CS_HANGUP -> CS_REPORTING
              2009-05-04 22:45:12 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/internal/1001@74.210.49.100:5060 [BREAK]
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:390 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) Running State Change CS_REPORTING
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:418 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State REPORTING
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:53 switch_core_standard_on_reporting() sofia/internal/1001@74.210.49.100:5060 Standard REPORTING, cause: NORMAL_CLEARING
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:418 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State REPORTING going to sleep
              2009-05-04 22:45:12 [DEBUG] switch_core_state_machine.c:420 switch_core_session_run() (sofia/internal/1001@74.210.49.100:5060) State Change CS_REPORTING -> CS_DONE
              2009-05-04 22:45:12 [DEBUG] switch_core_session.c:1000 switch_core_session_thread() Session 74 (sofia/internal/1001@74.210.49.100:5060) Locked, Waiting on external entities
              2009-05-04 22:45:12 [NOTICE] switch_core_session.c:1018 switch_core_session_thread() Session 74 (sofia/internal/1001@74.210.49.100:5060) Ended
              2009-05-04 22:45:12 [NOTICE] switch_core_session.c:1020 switch_core_session_thread() Close Channel sofia/internal/1001@74.210.49.100:5060 [CS_DONE]
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:1961 listener_run() Connection Open from 127.0.0.1:64863
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:2084 listener_run() Session complete, waiting for children
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:2117 listener_run() Connection Closed
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:1961 listener_run() Connection Open from 127.0.0.1:16767
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:2084 listener_run() Session complete, waiting for children
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:2117 listener_run() Connection Closed
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:1961 listener_run() Connection Open from 127.0.0.1:19302
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:2084 listener_run() Session complete, waiting for children
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:2117 listener_run() Connection Closed
              2009-05-04 22:45:29 [DEBUG] mod_event_socket.c:1961 listener_run() Connection Open from 127.0.0.1:52683
              2009-05-04 22:45:30 [DEBUG] mod_event_socket.c:2084 listener_run() Session complete, waiting for children
              2009-05-04 22:45:30 [DEBUG] mod_event_socket.c:2117 listener_run() Connection Closed
              2009-05-04 22:45:30 [DEBUG] mod_event_socket.c:1961 listener_run() Connection Open from 127.0.0.1:25220
              2009-05-04 22:45:30 [DEBUG] mod_event_socket.c:2084 listener_run() Session complete, waiting for children
              2009-05-04 22:45:30 [DEBUG] mod_event_socket.c:2117 listener_run() Connection Closed
              2009-05-04 22:45:30 [DEBUG] mod_event_socket.c:1961 listener_run() Connection Open from 127.0.0.1:8521
              2009-05-04 22:45:30 [DEBUG] mod_event_socket.c:2084 listener_run() Session complete, waiting for children
              2009-05-04 22:45:30 [DEBUG] mod_event_socket.c:2117 listener_run() Connection Closed
              2009-05-04 22:45:30 [DEBUG] mod_event_socket.c:2117 listener_run() Connection Closed

              1 Reply Last reply Reply Quote 0
              • C
                cybrsrfr
                last edited by

                Are you using the latest version of the package? The latest version I moved all the feature codes so that they all require the * star before the number.

                The logs show you dialed 4000 instead of *4000. I test with xlite and it does send the *.

                1 Reply Last reply Reply Quote 0
                • M
                  mraarzoo
                  last edited by

                  Hi mcrane, thanks for your help. I am using pfsense 1.2.2 and x-lite. when i try to call *4000 or 4000 it gives me an error, the error on x-lite screen is "Called failed: Temporary Unavailable" and the ivr tells you "the person you are calling is unavailable, please try again".
                  do you think i need to reinstall the freeswitch. i already bought linksys spa942 and i will get it by tomorrow. i hope that phone work fine with my current setup. i use to listen to my voice mail through x-lite but now its not working. would appreciate your help.
                  thanks again
                  Mark

                  1 Reply Last reply Reply Quote 0
                  • C
                    cybrsrfr
                    last edited by

                    If you call directly through the IVR and press the button for *4000 it will not work because it is expecting between 1-4 digits. I will need to make an adjustment to allow for the additional digit.

                    However *98 is another extension that is setup to get to voicemail.

                    I suggest you use pfSense 1.2.3. The reason why is that if you set the following to Conservative under System -> Advanced -> Firewall Optimization -> Conservative. There was an adjustment to the pfSense in 1.2.3 and 2.0 that will ensure UDP connections are not dropped. VOIP audio uses RTP which uses UDP.

                    Best Regards

                    Mark J Crane
                    pfSense FreeSWITCH package author.

                    1 Reply Last reply Reply Quote 0
                    • M
                      mraarzoo
                      last edited by

                      Thank you so much mcrane, i really appreciate your help. this product is really good. i will install the 1.2.3 as per your suggestion. this product is awsome.
                      thanks
                      Marks

                      1 Reply Last reply Reply Quote 0
                      • M
                        mraarzoo
                        last edited by

                        thanks mcrane, i will install the new version as per your suggestion. would like to thank you for your help.
                        please leave this thread open. i will install the new version of pfsense tonight or tomorrow and will update this post.
                        thanks
                        Marks

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.