-1

I am using the Linksys SPA3102 with my freeswitch raspberry pi. The PSTN line uses port 5061. I have created a user with ID "23" for the PSTN line however I believe I need to have that user use port 5061. Is there a way to set the port for a particular user? I tried setting "sip-port" in the params to 5061 but it had no effect. I can change the port to 5060 in the SPA3102 and this allows the user to register but then I can't then use it to dial out on the PSTN line.

Here's how I have defined the user:

<include>
  <user id="23">
    <params>
      <param name="password" value="$${default_password}"/>
      <param name="vm-password" value="23"/>
      <param name="sip-port" value="5061"/>
    </params>
    <variables>
      <variable name="toll_allow" value="domestic,international,local"/>
      <variable name="accountcode" value="23"/>
      <variable name="user_context" value="default"/>
      <variable name="effective_caller_id_name" value="Phone Line"/>
      <variable name="effective_caller_id_number" value="23"/>
      <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
      <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
      <variable name="callgroup" value="techsupport"/>
    </variables>
  </user>
</include>
MikeKulls
  • 2,979
  • 2
  • 25
  • 30

1 Answers1

2

You can't assign ports to users, only to SIP Profiles. In this case, it seems that what you really want is to use the External Profile. So I suggest you either:

  • Configure your Linksys account to use the default FreeSWITCH external profile SIP port (5080); OR
  • Make your FreeSWITCH external profile use the 5061 port. To do this you need to change the value of external_sip_port to 5061 in vars.xml and execute "sofia profile external restart reloadxml" in fs_cli.
hdiogenes
  • 729
  • 7
  • 15
  • Thanks for the reply. I won't be able to try this until next week. Changing to port 5080 on the Linksys should be easy. I'm a bit fuzzy with this part of freeswitch. Why does it also use port 5080? – MikeKulls Jun 03 '13 at 02:49
  • The first reason is security: you can block external access to port 5060 and leave your 5080 port open to the internet without exposing all your privileged SIP accounts to brute force password attacks. The FreeSWITCH wiki explains it better: [What SIP Profiles Do](http://wiki.freeswitch.org/wiki/Getting_Started_Guide#What_SIP_Profiles_Do) – hdiogenes Jun 03 '13 at 21:00
  • 2
    I have tried this an can confirm that this is the correct answer. I set the port to 5080 in the SPA3102 and everything is now good. This is something that every guide I read failed to mention. – MikeKulls Jun 14 '13 at 11:41