Openwrt 和 sipproxy 为什么我无法通过软件电话进行呼叫?

Openwrt 和 sipproxy 为什么我无法通过软件电话进行呼叫?

我在我的路由器 openwrt 中进行了设置,并尝试使用我为其提供的路由器检索到的提供商的 VOIP 设置来执行呼叫。我的网络设置如下:

config interface 'loopback'
    option device 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fdd2:a40d:d919::/48'


config device 'wan_dsl0_dev'
    option name 'dsl0'
    option macaddr XX:XX:XX:XX:XX:XX

config atm-bridge 'atm'
    option vpi '1'
    option vci '32'
    option encaps 'llc'
    option payload 'bridged'
    option nameprefix 'dsl'

config dsl 'dsl'
        option annex 'b'
    option ds_snr_offset '0'
        option line_mode 'vdsl'
        option tone 'auto'        
        option firmware '/lib/firmware/vr9-B-dsl.bin' 

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'lan1'
    list ports 'lan2'
    list ports 'lan3'
    list ports 'lan4'

config interface 'lan'
    option device 'br-lan'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option device 'dsl0.835'
    option proto 'pppoe'
    option username 'username'
    option password 'password'
    option ipv6 'none'
    option keepalive '10'
    option mtu '1492'
    list dns '1.1.1.1'
    option peerdns '0'

config interface voip
    option device 'dsl0.837'
    option proto 'dhcp'

config interface 'wan6'
    option device '@wan'
    option proto 'dhcpv6'

如您所见,voip 使用 vlan dsl0.837。另外,我也像这样配置了 siproxy:

config siproxd general
    # Custom options allow using OpenWRT network names, and defaults should
    # work out-of-the-box. If your SIP devices do not REGISTER externally,
    # you may also need to open firewall ports: tcp/udp 5060, udp 7070-7089.

    option interface_inbound lan
#   option interface_outbound dsl0.837

# All other documented siproxd configuration directives are supported. Use
# a UCI 'option' for single-instance directives, and UCI 'list' entries for
# directives that allow multiple instances, per the examples below.

    # Define low-level network devices, overriding interface_in/outbound:
#   option if_inbound eth0
    option if_outbound dsl0.837


    # Enable DEBUG logging for configuration messages:
#   option debug_level 0x00000100
#   option silence_log 0

    # Load two plugins: one that logs SIP call details to syslog, and one
    # that strips out G.729, GSM codecs:
#   list load_plugin 'plugin_logcall.so'
#   list load_plugin 'plugin_codecfilter.so'
#   list plugin_codecfilter_blacklist G729
#   list plugin_codecfilter_blacklist GSM

daemonize 1
masked_host=ngn.hol.net
outbound_proxy_host = ngn.hol.net
outbound_proxy_port = 5060

然后在通过以太网连接到 LAN 的我的计算机中,ekiga 配置如下:

Ekiga 设置

但是,尽管成功连接到 VoIP,我仍无法拨打手机(我的提供商通过 SIP/VOIP 提供固定电话)。我的提供商是希腊的沃达丰。

我尝试呼叫sip:^my_cellphone_number^@192.168.1.1(路由器的IP),但我无法这样做。那你知道为什么吗?

我的防火墙设置也如下:

config defaults
    option syn_flood    1
    option input        ACCEPT
    option output       ACCEPT
    option forward      REJECT
# Uncomment this line to disable ipv6 rules
#   option disable_ipv6 1

config zone
    option name     lan
    list   network      'lan'
    option input        ACCEPT
    option output       ACCEPT
    option forward      ACCEPT

config zone
    option name     wan
    list   network      'wan'
    list   network      'wan6'
    option input        REJECT
    option output       ACCEPT
    option forward      REJECT
    option masq     1
    option mtu_fix      1

config forwarding
    option src      lan
    option dest     wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
    option name     Allow-DHCP-Renew
    option src      wan
    option proto        udp
    option dest_port    68
    option target       ACCEPT
    option family       ipv4

# Allow IPv4 ping
config rule
    option name     Allow-Ping
    option src      wan
    option proto        icmp
    option icmp_type    echo-request
    option family       ipv4
    option target       ACCEPT

config rule
    option name     Allow-IGMP
    option src      wan
    option proto        igmp
    option family       ipv4
    option target       ACCEPT

config rule
    option name     Allow-VOIP
    option src      lan
    option proto        udp 
    option src_port     5060
    option family           ipv4            
        option target           ACCEPT

config rule                            
        option name             Allow-VOIP  
        option src              lan       
        option proto            udp               
        option src_port         7070-7080            
        option family           ipv4      
        option target           ACCEPT     

# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381
config rule
    option name     Allow-DHCPv6
    option src      wan
    option proto        udp
    option src_ip       fc00::/6
    option dest_ip      fc00::/6
    option dest_port    546
    option family       ipv6
    option target       ACCEPT

config rule
    option name     Allow-MLD
    option src      wan
    option proto        icmp
    option src_ip       fe80::/10
    list icmp_type      '130/0'
    list icmp_type      '131/0'
    list icmp_type      '132/0'
    list icmp_type      '143/0'
    option family       ipv6
    option target       ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
    option name     Allow-ICMPv6-Input
    option src      wan
    option proto    icmp
    list icmp_type      echo-request
    list icmp_type      echo-reply
    list icmp_type      destination-unreachable
    list icmp_type      packet-too-big
    list icmp_type      time-exceeded
    list icmp_type      bad-header
    list icmp_type      unknown-header-type
    list icmp_type      router-solicitation
    list icmp_type      neighbour-solicitation
    list icmp_type      router-advertisement
    list icmp_type      neighbour-advertisement
    option limit        1000/sec
    option family       ipv6
    option target       ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
    option name     Allow-ICMPv6-Forward
    option src      wan
    option dest     *
    option proto        icmp
    list icmp_type      echo-request
    list icmp_type      echo-reply
    list icmp_type      destination-unreachable
    list icmp_type      packet-too-big
    list icmp_type      time-exceeded
    list icmp_type      bad-header
    list icmp_type      unknown-header-type
    option limit        1000/sec
    option family       ipv6
    option target       ACCEPT

config rule
    option name     Allow-IPSec-ESP
    option src      wan
    option dest     lan
    option proto        esp
    option target       ACCEPT

config rule
    option name     Allow-ISAKMP
    option src      wan
    option dest     lan
    option dest_port    500
    option proto        udp
    option target       ACCEPT

# allow interoperability with traceroute classic
# note that traceroute uses a fixed port range, and depends on getting
# back ICMP Unreachables.  if we're operating in DROP mode, it won't
# work so we explicitly REJECT packets on these ports.
config rule
    option name     Support-UDP-Traceroute
    option src      wan
    option dest_port    33434:33689
    option proto        udp
    option family       ipv4
    option target       REJECT
    option enabled      false

我还需要打开额外的端口吗?

相关内容