0

Suppose I have Freeswitch, which has SIP gateway configured. So, the local users of this Freeswitch can call outside via

<extension name="russia">
    <condition field="destination_number" expression="^(7\d{10})$">
        <action application="bridge" data="sofia/gateway/sipnet.ru/$1"/>
        <action application="hangup"/>
    </condition>
</extension>

where sipnet.ru is SIP provider gateway name.

Now I wish users from outside being able to call local clients.

How this can be accomplished? How remote SIP telephone user can enter additional numbers to sip-provider's main number? How these additional numbers can be extracted with Freeswitch?

For example, my sip call in number is 55512345. So to call me caller should enter this number. But now I connect Freeswitch to this number, and Freeswitch user has local number of 1000. How he can be called? Is it possible to call him with 555123451000?

Is it possible to pass additionally not numbers but letters?

Is it possible to pass additional numbers from land or mobile phones?

1 Answer 1

1

(I am actually using Sipnet and Zadarma on my FreeSWITCH server)

Sipnet.ru allows you to forward all incoming calls to a SIP URI. Also it allows creating sub-accounts. So, you create as many sub-accounts as you need, and set the forwarding of all calls to some unique URI, like [email protected]

Then in your FreeSWITCH configuration, you create a new public extension:

File: conf/dialplan/public/50_users.xml 
<include>
  <extension name="pub_vasya-pupkin">
    <condition field="destination_number" expression="^vasya-pupkin$">
      <action application="transfer" data="1007 XML default"/>
    </condition>
  </extension>

so all calls to [email protected] will be transferred to 1007 internal extension.

Fother SIP provider which don;t support forwarding (zadarma.com, for example), you create a SIP profile and use "extension" parameter to specify which extension in your public profile should be used:

File: conf/sip_profiles/external/zadarma.xml
<gateway name="zadarma_59555">
  <param name="username" value="59555"/>
  <param name="password" value="*******"/>
  <param name="extension" value="vasya-pupkin"/>
  <param name="expire-seconds" value="125"/>
  <param name="register" value="true"/>
  <param name="register-transport" value="udp"/>
  <param name="proxy" value="sip.zadarma.com"/>
  <param name="retry-seconds" value="30"/>
  <param name="caller-id-in-from" value="false"/>
  <param name="ping" value="27"/>
</gateway>

I've got some more practical examples in my blog, just in case.

You must log in to answer this question.