[Freeswitch-users] Unable to receive calls from external sources.

Rocky Hetherington rocky at hetherington.co.uk
Tue Aug 12 02:18:18 PDT 2008

I'm having trouble getting FreeSWITCH to work properly and was hoping
someone would be able to give me a few pointers.  I've looked through
all the documentation, examples and large chunks of the mailing list
but i just can't make heads or tails of things.

First i should give a bit of information on what i want to do.

I'm going to be running FreeSWITCH on Xen virtual server with a public
IPv4 IP.  The OS is Debian Etch and lets call the machine
"server1.example.org".   It will be serving calls for the example.org
domain and the relevant SRV records have been set up in the DNS.

What i want to set up FreeSWITCH to do is have two users (we'll call
them Bert and Fred).  I want the two users to be able to call between
themselves using either their relevant <USER>@example.org SIP URI or
an extension number (2378 for Bert and 3733 for Fred).  I also want
users outside the domain to be able to call either user using their
SIP URI and extension (and also via SipBroker).

In addition Bert has two XMPP accounts.  One is a Google Talk account
and the other is a local account on an OpenFire server (also running
on server1.example.org).  I would like FreeSWITCH to listen on these
accounts for incoming Jingle calls and then pass them through to
Bert's registered SIP device.  If the user is not currently registered
i would like FreeSWITCH to take a voicemail.

I would also like users to be able to dial out using SIP URIs and
SipBroker prefixes.  I don't currently need for it to dial out to the
PSTN using a gateway.

What i have done so far:

Following the instructions in the Wiki i have created some Debian
packages of FreeSWITCH 1.0.1.  These are installed and the server is
running fine.  Other than the three changes outlined below the server
is completely stock config.

I have edited conf/vars.xml and changed the following line to:

<X-PRE-PROCESS cmd="set" data="domain=example.org"/>

I have deleted the local extensions from conf/directory/default and
created two users called bert and fred using files such as this:


  <user id="2378" mailbox="2378">
      <param name="password" value="password"/>
      <param name="vm-password" value="1000"/>
      <variable name="accountcode" value="2378"/>
      <variable name="user_context" value="default"/>
      <variable name="effective_caller_id_name" value="Bert"/>
      <variable name="effective_caller_id_number" value="2378"/>

By default FreeSWITCH comes enabled to talk between internal users out
of the box, so that works, although i need some way of aliasing the
username "bert" to the extension 2378.

I understand that FreeSWITCH uses something called contexts and the
default context is not available to the public and i need to bridge to
it, but i can't seem to figure out how to do it properly.

I created a file conf/dialplan/extensions/bert.xml containing the
following that i pieced together from the documention, but it doesn't
seem to work:

  <extension name="bert">
   <condition field="destination_number" expression="^(bert|2378)$">
    <!--action application="transfer" data="$1 XML default" /-->
    <!--action application="bridge"
    <action application="bridge" data="sofia/internal/2378%example.org" />

(the commented out lines are previous lines i tried (one at a time)
which also failed).  I also tried adding the above (excluding the
<include> tags) to the conf/dialplan/public.xml with no success.

I then fire up my Gizmo softphone and attempt to connect from my Gizmo
account using my SIP URI (bert at example.org).  The FreeSWITCH logs
indicate that it is hitting my server but is rejected:

2008-08-10 17:20:23 [DEBUG] mod_event_socket.c:1396
mod_event_socket_runtime() Socket up listening on
2008-08-10 17:21:23 [DEBUG] sofia.c:3134 sofia_handle_sip_i_invite()
IP Rejected by acl domains. Falling back to Digest
2008-08-10 17:21:23 [DEBUG] sofia.c:3134 sofia_handle_sip_i_invite()
IP Rejected by acl domains. Falling back to Digest
2008-08-10 17:21:23 [WARNING] sofia_reg.c:1247 sofia_reg_parse_auth()
can't find user [1747xxxxxxx at example.org]
You must define a domain called 'example.org' in your directory and
add a user with the id="1747xxxxxxx" attribute
and you must configure your device to use the proper domain in it's
authentication credentials.

I'm unsure why FreeSWITCH believes that my Gizmo account is meant to
be a local user, and am unable to find any documention on adding a
domain to the directory.

If anyone could just tell me how to allow external SIP calls to be
passed through to local users i would be content to leave the
voicemail, Jingle and outbound calls until a later time when i have a
better understanding of FreeSWITCH.

Hope someone can help.


More information about the FreeSWITCH-users mailing list