Freeswitch question
-
Hello everyone,
first i would like to thank all the developers for the great product. i need small help regarding freeswitch.
I installed pfsense and freeswitch on same machine. Created 3 extension 1001, 1002, 1003.
downloded and installed x-lite software and registered 1001 successfully. tried to call myself (1001) without any problem. now the problem is i removed the 1001 registration from x-lite and registered 1002 with x-lite from same computer. when i try to call myself(1002) i am receiving an error "call failed not found" on x-lite screen but the id is registered and the message is "the person you are calling is unavailable please try again" doesnt matter if i dial 1001 which is good. can you please help me.
thanks in advance.
Mark -
anybody ?
-
Patience, people don't lurk here 24/7 waiting for people to post problems/questions - we all have lives you know ;)
I assume you've checked the FreeSwitch documentation?
-
Are you trying to dial in from outside or from an internal phone?
If from outside, did you redirect incoming in the public tab?
-
Thanks for your reply. I am sorry, i feel so excited about this product. sorry again.
my configuration is lan IP 10.0.0.1 wan IP 74.xx.xx.xx.100
freeswitch bound to WAN IP. I installed the freeswitch without any problem and created two extensions 1001, 1002
1001 is for my self and 1002 is for one of my friend who is in hongkong.
i am using x-lite to make calls. i am running x-lite on one of my laptop which is on my internet network 10.0.0.10
my x-lite configuration points to 74.xx.xx.100 and i have no problem registering 1001 extension.
i gave 1002 extension to my friend in hongkong and i configured his x-lite pointing to my WAN IP 74.xx.xx.100
the problem is when he try to register he received error registration failed.
i watched so many video on you tube regarding the configuration of freeswitch and read the documentation but it flowing over to my head.chpalmer, i have not tried any option in public tab. my friend tried to dial in from HK.
thanks everyone for their efforts.
Mark -
Did you set up your firewall rules to allow connection from wan side?
-
Hi Thanks for your reply chpalmer. what i want is my friend should be able to call me through x-lite with the extension 1002 which i created in freeswitch so we can have unlimited call. is it possible ?
thanks
Marks -
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…
-
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 sipthis 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 ALIASED3 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 falsethis 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 -
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 -
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. -
hi, this is what i received when i dial 4000. can you please help me why i am not able to check voicemail.
thanksa=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 423002009-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 [SPEEX16000:0]/[G722:9:8000:20]
2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX16000:0]/[PCMU:0:8000:20]
2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX16000:0]/[PCMA:8:8000:20]
2009-05-04 22:45:12 [DEBUG] sofia_glue.c:2601 sofia_glue_negotiate_sdp() Audio Codec Compare [SPEEX16000: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 -
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 *.
-
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 -
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. -
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 -
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