admin管理员组

文章数量:1530013

<include>
  <user id="1000">
    <params>
      <param name="password" value="$${default_password}"/>
      <param name="vm-password" value="1000"/>
    </params>
    <variables>
      <variable name="toll_allow" value="domestic,international,local"/>
      <variable name="accountcode" value="1000"/>
      <variable name="user_context" value="default"/>
      <variable name="effective_caller_id_name" value="Extension 1000"/>
      <variable name="effective_caller_id_number" value="1000"/>
      <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"/>
      <!--<variable name="sip-force-contact" value="NDLB-connectile-dysfunction"/>--> <!-- Rewrite contact ip and port -->      
    </variables>
  </user>
</include>

有什么特别吗? 当然!

fs_cli -x 'show registrations as xml'
<result row_count="1">
  <row row_id="1">
    <reg_user>1001</reg_user>
    <realm>xxx</realm>
    <token>a776de9d-fb0e-4808-a449-90d26368c559</token>
    <url>sofia/default/sip:1001@192.168.13.233:5080;transport=tcp;gw=gwl;fs_nat=yes;fs_path=sip:1001@113.113.113.113:5080;transport=udp</url>
    <expires>1676777941</expires>
    <network_ip>113.113.113.113</network_ip>
    <network_port>39025</network_port>
    <network_proto>udp</network_proto>
    <hostname>iZwz98kylkaung06ex18stZ</hostname>
    <metadata></metadata>
  </row>
</result>

url指向的地址是113.113.113.113:5080,但可能113.113.113.113:39025才能到达(看network_port)。

把sip-force-contact改成NDLB-connectile-dysfunction,重启fs,让客户端重新注册,再执行一遍show registrations,结果就如您所愿了。

本文标签: RewritefreeswitchContactPORTip