Dear all:
Sorry,
I am a newbie of siproxd, and have some problem when using siproxd…..
The architecture is following:
private IP address range : Internet public IP address range 192.168.2.1 : 10.90.8.40 : 192.168.2.91 : foo.bar.org 10.90.8.185 +-------------+ +--------------+ +-------------+ ! ! .1 ! masquerading ! publicIP ! ! ! IntHost !-------------! Firewall !------------>>! externalHost! ! ! eth2! !eth1 ! ! +-------------+ +--------------+ +-------------+ user: 1111 user: 2222
Both of user 1111 and user 2222 are registered to
siproxd, and
I want to make a call from “1111” to “2222” and make a call from “2222” to “1111”.
I installed
siproxd into a machine with two network interfaces: eth1 (public IP address,
but we use 10.90.8.40 for simulation), eth2 (private IP address, 192.168.2.1).
To enable NAT, I executed following commands:
1. iptables -A INPUT -i
eth2 -j ACCEPT
2. echo "1" >
/proc/sys/net/ipv4/ip_forward
3. iptables -t nat -A
POSTROUTING -s 192.168.2.0/24 -o eth1 -j MASQUERADE
Then execute
1. iptables -A INPUT -i
eth1 -p udp -m udp --dport 5060 -j ACCEPT
2. iptables -A INPUT -i
eth1 -p udp -m udp --dport 2:65000 -j ACCEPT
to receive SIP and RTP message from eth1.
Finally execute “siproxd”.
My configuration is following:
# The interface names of INBOUND and OUTBOUND
interface.####
if_inbound = eth2
if_outbound = eth1
host_outbound = 10.90.8.40
# Access
control.###########################################
hosts_allow_reg = 192.168.2.0/24,10.90.8.0/24
hosts_allow_sip = 192.168.2.0/24,10.90.8.0/24
# Port to listen for incoming SIP
messages.#################
sip_listen_port = 5060
# Shall we daemonize?#######################################
daemonize = 0
# What shall I log to
syslog?###############################
silence_log = 0
# Shall I log call establishment to
syslog?#################
log_calls = 1
# Secure Enviroment settings:###############################
user = root
# Registration
file:########################################
registration_file =
/usr/local/sipproxd/etc/siproxd_registrations
# Automatically save current registrations every 'n'
seconds###
autosave_registrations = 300
# PID
file:#################################################
pid_file = /usr/local/sipproxd/etc/siproxd.pid
# global switch to control the RTP proxy
behaviour##########
rtp_proxy_enable = 0
# Port range to allocate listen ports from for
incoming RTP traffic
rtp_port_low = 2
rtp_port_high = 65000
# Timeout for RTP
streams###################################
rtp_timeout = 300
# Default Expiration timeout for
Registrations##############
default_expires = 600
# Proxy authentication######################################
proxy_auth_pwfile =
usr/local/sipproxd/etc/siproxd_passwd.cfg
# Debug level... (setting to -1 will enable
everything)#####
debug_level = 0x00000000
But when 1111 dial to 2222: the call is failed. And
the captured:
No.
Time
Source
Destination
Protocol Info
38 10.924474
192.168.2.91
10.90.8.40
SIP Request: REGISTER sip:10.90.8.40:5060
39 10.925528
192.168.2.1
192.168.2.91 SIP
Status: 200 OK (0 bindings)
74 16.369609
192.168.2.91
10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
75 16.371000
10.90.8.40
10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
76 16.372224
10.90.8.40
10.90.8.185
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060, with session
description
77 16.864497
192.168.2.91 10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
78 16.865351
10.90.8.40
10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
79 16.866323
10.90.8.40
10.90.8.185
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060, with session
description
83 17.864655
192.168.2.91
10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
84 17.889328
10.90.8.40
10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
85 17.890470
10.90.8.40
10.90.8.185
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060, with session
description
91 19.864932
192.168.2.91
10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
92 19.882906
10.90.8.40
10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
95 20.008373
10.90.8.40
10.90.8.185
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060, with session
description
111 23.865545
192.168.2.91
10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
112 23.883294
10.90.8.40
10.90.8.40
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
113 23.884462
10.90.8.40 10.90.8.185
SIP/SDP Request: INVITE sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060, with session
description
127 26.240143
192.168.2.91
10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
128 26.240862
10.90.8.40 10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
129 26.241682
10.90.8.40
10.90.8.185
SIP Request: CANCEL sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060
130 26.745748
192.168.2.91
10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
131 26.746478
10.90.8.40
10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
132 26.747301
10.90.8.40
10.90.8.185
SIP Request: CANCEL sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060
133 26.881212
10.90.8.185
10.90.8.40
SIP Request: REGISTER sip:10.90.8.40:5060
134 26.881827
10.90.8.40
10.90.8.185
SIP Status: 200 OK (0 bindings)
138 27.746942
192.168.2.91
10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
139 27.747963
10.90.8.40
10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
140 27.748952 10.90.8.40
10.90.8.185
SIP Request: CANCEL sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060
145 29.747297
192.168.2.91
10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
146 29.760631
10.90.8.40
10.90.8.40 SIP
Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
147 29.761526
10.90.8.40
10.90.8.185
SIP Request: CANCEL sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060
171 33.789311
192.168.2.91
10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
172 33.804332
10.90.8.40
10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
173 33.822108
10.90.8.40
10.90.8.185
SIP Request: CANCEL sip:2222-DmFQSLMR86RLpHvOLaG+mQ@public.gmane.org:5060
188 37.790961
192.168.2.91
10.90.8.40
SIP Request: CANCEL sip:2222-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
And 2222 make a call to 1111 can only hear the voice
from 1111 to 2222…. <at> <at>
12 2.470288
10.90.8.185
10.90.8.40
SIP Request: REGISTER sip:10.90.8.40:5060
13 2.470998
10.90.8.40
10.90.8.185
SIP Status: 200 OK (0 bindings)
19 4.323916
10.90.8.185 10.90.8.40
SIP/SDP Request: INVITE sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
20 4.325011
10.90.8.40
10.90.8.40
SIP/SDP Request: INVITE sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
21 4.326098
192.168.2.1
192.168.2.91
SIP/SDP Request: INVITE sip:1111-Q0ErXNX1RuYs0e1nrdKILQ@public.gmane.org:5060, with session
description
22 4.821524
10.90.8.185
10.90.8.40
SIP/SDP Request: INVITE sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
23 4.826198
10.90.8.40
10.90.8.40
SIP/SDP Request: INVITE sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
24 4.827119
192.168.2.1
192.168.2.91
SIP/SDP Request: INVITE sip:1111-Q0ErXNX1RuYs0e1nrdKILQ@public.gmane.org:5060, with session
description
29 5.821816
10.90.8.185
10.90.8.40
SIP/SDP Request: INVITE sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
30 5.822835
10.90.8.40
10.90.8.40
SIP/SDP Request: INVITE sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060, with session
description
31 5.823904
192.168.2.1
192.168.2.91
SIP/SDP Request: INVITE sip:1111-Q0ErXNX1RuYs0e1nrdKILQ@public.gmane.org:5060, with session
description
32 6.044740
192.168.2.91 192.168.2.1
SIP Status: 100 Trying
33 6.045655
10.90.8.40
10.90.8.40
SIP Status: 100 Trying
34 6.046303
10.90.8.40
10.90.8.185
SIP Status: 100 Trying
35 6.053839
192.168.2.91
192.168.2.1
SIP Status: 180 Ringing
36 6.065038
10.90.8.40
10.90.8.40
SIP Status: 180 Ringing
37 6.065702
10.90.8.40
10.90.8.185
SIP Status: 180 Ringing
41 6.111349
192.168.2.91
192.168.2.1
SIP Status: 180 Ringing
43 6.112376
10.90.8.40
10.90.8.40
SIP Status: 180 Ringing
45 6.113068
10.90.8.40
10.90.8.185
SIP Status: 180 Ringing
51 6.153730
192.168.2.91
192.168.2.1
SIP Status: 180 Ringing
52 6.154906
10.90.8.40
10.90.8.40
SIP Status: 180 Ringing
53 6.155568
10.90.8.40
10.90.8.185
SIP Status: 180 Ringing
58 7.330918
192.168.2.91
192.168.2.1
SIP/SDP Status: 200 OK, with session description
59 7.332508
10.90.8.40
10.90.8.40
SIP/SDP Status: 200 OK, with session description
60 7.333367
10.90.8.40
10.90.8.185
SIP/SDP Status: 200 OK, with session description
63 7.492410
10.90.8.185
10.90.8.40
SIP Request: ACK sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
64 7.493288
10.90.8.40
10.90.8.40
SIP Request: ACK sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
65 7.494027
192.168.2.1
192.168.2.91
SIP Request: ACK sip:1111-Q0ErXNX1RuYs0e1nrdKILQ@public.gmane.org:5060
66 7.609294
192.168.2.91 10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=0, Time=21876
272 9.609103
10.90.8.40
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=100, Time=37876
273 9.629051 192.168.2.91
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=101, Time=38036
458 11.408043
10.90.8.185
10.90.8.40
SIP Request: BYE sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
459 11.408878 192.168.2.91
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=190, Time=52276
460 11.408912
10.90.8.40
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=190, Time=52276
461 11.426690
10.90.8.40
10.90.8.40
SIP Request: BYE sip:1111-DmFQSLMR86S04ydpO6u5uQ@public.gmane.org:5060
462 11.427514
192.168.2.1
192.168.2.91
SIP Request: BYE sip:1111-Q0ErXNX1RuYs0e1nrdKILQ@public.gmane.org:5060
463 11.429936
192.168.2.91 10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=191, Time=52436
464 11.429980
10.90.8.40
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=191, Time=52436
465 11.449212
192.168.2.91
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=192, Time=52596
466 11.449258
10.90.8.40
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=192, Time=52596
467 11.468703
192.168.2.91
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU, SSRC=672222100,
Seq=193, Time=52756
468 11.468750
10.90.8.40
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU,
SSRC=672222100, Seq=193, Time=52756
469 11.482394
192.168.2.91
192.168.2.1
SIP Status: 200 OK
470 11.493440
192.168.2.91
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU, SSRC=672222100,
Seq=194, Time=52916
471 11.493487
10.90.8.40
10.90.8.185
RTP Payload type=ITU-T G.711 PCMU, SSRC=672222100,
Seq=194, Time=52916
472 11.494736
10.90.8.40
10.90.8.40
SIP Status: 200 OK
473 11.495582
10.90.8.40
10.90.8.185
SIP Status: 200 OK
Is it something wrong of the configuration file? Or the
NAT setting ? …… <at> <at> , please help, Thank you
Best Regards,
samlee