Freeswitch inbound configuration headache



  • Not sure how I started down this path but I've got too many hours logged to get here without continuing further ;-)

    So more out of curiousity I initially set up Freeswitch on my pf box which is my router and firewall. It updates the WAN dynamic IP via DynDNS as a number of previous travellers suggested. After some initial struggles with where to configure things, I got three extensions set up and talking to each other and played with voicemail and music on hold with some softphones on the Mac and iPhone.

    Thinking it might be time to part ways with Vonage, I got an account set up with ViaTalk. After several more hours of some trial and error I got outbound calling working using ViaTalk as the gateway. However it doesn't seem that inbound calls come into Freeswitch. They ring out and end up at the ViaTalk voicemail but I'll disable that and see if it helps. Maybe the voicemail is kicking in before the call gets a chance to complete but I'm wondering if something else is amiss. I hope I can remember how I got to where I am so I can write up a cookbook for those who might follow after.

    I've had a couple of cases where stopping and starting the external profile gave an "invalid profile" message on the status page which mysteriously cleared itself, even though it looked like there was nothing amiss with the external profile.

    I'm running 1.2.3RC3 with whatever package of Freeswitch gets installed from the Packages option.

    If anybody has a checklist of things to look for for inbound SIP I'd appreciate it.

    If I can get this working I no longer need to keep shouting up the stairs to my daughter that one of her school mates is on the phone ;-) My science project has gotten completely out of hand though….

    UPDATE

    So after disabling the voicemail at ViaTalk, when I call into the number I get a busy signal  and this shows up in the Freeswitch logs (number obfuscated slightly)

    2009-12-03 15:32:44.895573 [NOTICE] switch_channel.c:602 New Channel sofia/external/+151xxxxxx32@4.68.251.11 [57d4fd64-53e0-de11-a413-0014d11ab216]
    2009-12-03 15:32:44.895573 [DEBUG] sofia.c:3210 Channel sofia/external/+151xxxxxx32@4.68.251.11 entering state [received][100]
    2009-12-03 15:32:44.895573 [DEBUG] sofia.c:3217 Remote SDP:
    v=0
    o=- 1259875964 1259875965 IN IP4 209.244.187.178
    s=-
    c=IN IP4 209.244.187.178
    t=0 0
    m=audio 61026 RTP/AVP 0 18

    2009-12-03 15:32:44.895573 [DEBUG] sofia_glue.c:3081 Audio Codec Compare [PCMU:0:8000:0]/[PCMU:0:8000:20]
    2009-12-03 15:32:44.895573 [DEBUG] sofia_glue.c:2039 Set Codec sofia/external/+151xxxxxx32@4.68.251.11 PCMU/8000 20 ms 160 samples
    2009-12-03 15:32:44.895573 [DEBUG] sofia.c:3376 (sofia/external/+151xxxxxx32@4.68.251.11) State Change CS_NEW -> CS_INIT
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_session.c:933 Send signal sofia/external/+151xxxxxx32@4.68.251.11 [BREAK]
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:397 (sofia/external/+151xxxxxx32@4.68.251.11) Running State Change CS_INIT
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:480 (sofia/external/+151xxxxxx32@4.68.251.11) State INIT
    2009-12-03 15:32:44.895573 [DEBUG] mod_sofia.c:83 sofia/external/+151xxxxxx32@4.68.251.11 SOFIA INIT
    2009-12-03 15:32:44.895573 [DEBUG] mod_sofia.c:111 (sofia/external/+151xxxxxx32@4.68.251.11) State Change CS_INIT -> CS_ROUTING
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_session.c:933 Send signal sofia/external/+151xxxxxx32@4.68.251.11 [BREAK]
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:480 (sofia/external/+151xxxxxx32@4.68.251.11) State INIT going to sleep
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:397 (sofia/external/+151xxxxxx32@4.68.251.11) Running State Change CS_ROUTING
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:483 (sofia/external/+151xxxxxx32@4.68.251.11) State ROUTING
    2009-12-03 15:32:44.895573 [DEBUG] mod_sofia.c:130 sofia/external/+151xxxxxx32@4.68.251.11 SOFIA ROUTING
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:78 sofia/external/+151xxxxxx32@4.68.251.11 Standard ROUTING
    2009-12-03 15:32:44.895573 [INFO] mod_dialplan_xml.c:252 Processing LOMBARDI SOFTWA->15125247899 in context public
    2009-12-03 15:32:44.895573 [WARNING] mod_dialplan_xml.c:282 Context public not found
    2009-12-03 15:32:44.895573 [INFO] switch_core_state_machine.c:136 No Route, Aborting
    2009-12-03 15:32:44.895573 [NOTICE] switch_core_state_machine.c:137 Hangup sofia/external/+151xxxxxx32@4.68.251.11 [CS_ROUTING] [NO_ROUTE_DESTINATION]
    2009-12-03 15:32:44.895573 [DEBUG] switch_channel.c:1683 Send signal sofia/external/+151xxxxxx32@4.68.251.11 [KILL]
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_session.c:933 Send signal sofia/external/+151xxxxxx32@4.68.251.11 [BREAK]
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:483 (sofia/external/+151xxxxxx32@4.68.251.11) State ROUTING going to sleep
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:397 (sofia/external/+151xxxxxx32@4.68.251.11) Running State Change CS_HANGUP
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:433 (sofia/external/+151xxxxxx32@4.68.251.11) State HANGUP
    2009-12-03 15:32:44.895573 [DEBUG] mod_sofia.c:338 Channel sofia/external/+151xxxxxx32@4.68.251.11 hanging up, cause: NO_ROUTE_DESTINATION
    2009-12-03 15:32:44.895573 [DEBUG] mod_sofia.c:414 Responding to INVITE with: 404
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:46 sofia/external/+151xxxxxx32@4.68.251.11 Standard HANGUP, cause: NO_ROUTE_DESTINATION
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:433 (sofia/external/+151xxxxxx32@4.68.251.11) State HANGUP going to sleep
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:475 (sofia/external/+151xxxxxx32@4.68.251.11) State Change CS_HANGUP -> CS_REPORTING
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_session.c:933 Send signal sofia/external/+151xxxxxx32@4.68.251.11 [BREAK]
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:397 (sofia/external/+151xxxxxx32@4.68.251.11) Running State Change CS_REPORTING
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:607 (sofia/external/+151xxxxxx32@4.68.251.11) State REPORTING
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:53 sofia/external/+151xxxxxx32@4.68.251.11 Standard REPORTING, cause: NO_ROUTE_DESTINATION
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:607 (sofia/external/+151xxxxxx32@4.68.251.11) State REPORTING going to sleep
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:410 (sofia/external/+151xxxxxx32@4.68.251.11) State Change CS_REPORTING -> CS_DESTROY
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_session.c:1067 Session 10 (sofia/external/+151xxxxxx32@4.68.251.11) Locked, Waiting on external entities
    2009-12-03 15:32:44.895573 [NOTICE] switch_core_session.c:1085 Session 10 (sofia/external/+151xxxxxx32@4.68.251.11) Ended
    2009-12-03 15:32:44.895573 [NOTICE] switch_core_session.c:1087 Close Channel sofia/external/+151xxxxxx32@4.68.251.11 [CS_DESTROY]
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:559 (sofia/external/+151xxxxxx32@4.68.251.11) State DESTROY
    2009-12-03 15:32:44.895573 [DEBUG] mod_sofia.c:255 sofia/external/+151xxxxxx32@4.68.251.11 SOFIA DESTROY
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:60 sofia/external/+151xxxxxx32@4.68.251.11 Standard DESTROY
    2009-12-03 15:32:44.895573 [DEBUG] switch_core_state_machine.c:559 (sofia/external/+151xxxxxx32@4.68.251.11) State DESTROY going to sleep

    So it looks like something is arriving at the front door and I need to figure out how to route it? As a simple experiment, how do I route it to a specific extension? I'll play with the IVR stuff another day….

    -- Stuart



  • You don't have to disable your viatalk voicemail.

    @stmcknig:

    So it looks like something is arriving at the front door and I need to figure out how to route it? As a simple experiment, how do I route it to a specific extension? I'll play with the IVR stuff another day….

    -- Stuart

    You are on the right track you need to tell the phone system where to route the inbound call. You do this on the public tab.
    set up an entry with a condition that looks for the incoming phone number.

    There is a documentation at:
    http://doc.pfsense.org/index.php/FreeSWITCH

    In particular the screen shot of the public tab will show you what you need.
    http://doc.pfsense.org/index.php/Public_Tab

    Make sure this ^(12081231234)$ matches your phone number.



  • Error Occur Between Keyboard and Chair…

    I got the inbound to extension working - for reasons I cannot fathom I had put my calling number into the destination number field not the VoIP SIP number I was actually calling....I swear I looked that page over a million times and it looked fine.

    OK, so if the extension doesn't answer, then I want to roll to voicemail but I guess that needs further actions....



  • Are you using transfer or bridge to direct the inbound call?

    Mark J Crane



  • transfer…


Log in to reply