更改用户的tcp / udp端口

时间:2013-05-30 13:14:54

标签: freeswitch

我正在使用Linksys SPA3102和我的freeswitch raspberry pi。 PSTN线路使用端口5061.我为PSTN线路创建了ID为“23”的用户,但我相信我需要让该用户使用端口5061.有没有办法为特定用户设置端口?我尝试将参数中的“sip-port”设置为5061,但它没有任何效果。我可以在SPA3102中将端口更改为5060,这样用户就可以注册,但我无法使用它在PSTN线路上拨出。

以下是我定义用户的方式:

<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>

1 个答案:

答案 0 :(得分:2)

您无法将端口分配给用户,仅分配给SIP配置文件。在这种情况下,您真正​​想要的是使用External Profile。所以我建议你:

  • 配置您的Linksys帐户以使用默认的FreeSWITCH外部配置文件SIP端口(5080); OR
  • 使FreeSWITCH外部配置文件使用5061端口。为此,您需要在vars.xml中将external_sip_port的值更改为5061,并在fs_cli中执行“sofia profile external restart reloadxml”。