Below is my last config, again when i try to call other number , 8333490056 for example ,
SIP2SIP connection happens and there's no problem. Also 8333490056 can call me from
8334843600 but when i try to call 905353490056 for example or other number 902323747366
which is my home number i can't call again.
Here's captured stuff with ngrep with command (root@sipproxy/ngrep> ngrep
8333490056@ port 5060)
interface: eth0 (212.154.104.196/255.255.255.252)
filter: ip and ( port 5060 )
match: 8333490056@
#
U 212.154.104.198:5060 -> 212.154.32.154:5060
REGISTER sip:212.154.104.198:5060 SIP/2.0..Record-Route: <sip:212.154.104.1
98;ftag=xETM4kDMxED;lr=on>..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bK
f4dc.948a7de7.0..Via: SIP/2.0/UDP 85.98.22.67:5060;branch=z9hG4bKba8f27b4d9
b2aa07..From: <sip:8333490056@212.154.104.198>;tag=xETM4kDMxED..To: <sip:83
33490056@212.154.104.198>..Call-ID: 6951B1111341111@85.98.22.67..CSeq: 213
REGISTER..Contact: <sip:8333490056@85.98.22.67:5060>..Max-Forwards: 69..Exp
ires: 60..Content-Length: 0....
#
U 212.154.104.198:5060 -> 212.154.32.154:5060
REGISTER sip:212.154.104.198:5060 SIP/2.0..Record-Route: <sip:212.154.104.1
98;ftag=xETM4kDMxED;lr=on>..Record-Route: <sip:212.154.104.198;ftag=xetm4kd
mxed;lr=on>..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bKf4dc.a48a7de7.0
..Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154.104.198;br
anch=z9hG4bKf4dc.948a7de7.0..Via: SIP/2.0/UDP 85.98.22.67:5060;branch=z9hG4
bKba8f27b4d9b2aa07..From: <sip:8333490056@212.154.104.198>;tag=xETM4kDMxED.
.To: <sip:8333490056@212.154.104.198>..Call-ID: 6951B1111341111(a)85.98.22.67
..CSeq: 213 REGISTER..Contact: <sip:8333490056@85.98.22.67:5060>..Max-Forwa
rds: 67..Expires: 60..Content-Length: 0....
###
U 212.154.32.154:5060 -> 212.154.104.198:5060
REGISTER sip:212.154.104.198:5060 SIP/2.0..Record-Route: <sip:212.154.104.1
98;ftag=xetm4kdmxed;lr=on>..Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/
2.0/UDP 212.154.104.198;branch=z9hG4bKf4dc.948a7de7.0..Via: SIP/2.0/UDP 85.
98.22.67:5060;branch=z9hG4bKba8f27b4d9b2aa07..From: <sip:8333490056@212.154
.104.198>;tag=xETM4kDMxED..To: <sip:8333490056@212.154.104.198>..Call-ID: 6
951B1111341111@85.98.22.67..CSeq: 213 REGISTER..Contact: <sip:8333490056@85
.98.22.67:5060>..Max-Forwards: 68..Expires: 60..Content-Length: 0....
#
U 212.154.104.198:5060 -> 212.154.32.154:5060
SIP/2.0 200 OK..Record-Route: <sip:212.154.104.198;ftag=xetm4kdmxed;lr=on>.
.Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154.104.198;bra
nch=z9hG4bKf4dc.948a7de7.0..Via: SIP/2.0/UDP 85.98.22.67:5060;branch=z9hG4b
Kba8f27b4d9b2aa07..From: <sip:8333490056@212.154.104.198>;tag=xETM4kDMxED..
To: <sip:8333490056@212.154.104.198>;tag=b27e1a1d33761e85846fc98f5f3a7e58.5
a9f..Call-ID: 6951B1111341111@85.98.22.67..CSeq: 213 REGISTER..Contact: <si
p:8333490056@85.98.22.67:5060>;q=0.00;expires=60..Server: Sip EXpress route
r (0.8.14 (i386/linux))..Content-Length: 0..Warning: 392 212.154.104.198:50
60 "Noisy feedback tells: pid=5894 req_src_ip=212.154.32.154 req_src_port=
5060 in_uri=sip:212.154.104.198:5060 out_uri=sip:212.154.104.198:5060 via_c
nt==3"....
#
U 212.154.32.154:5060 -> 212.154.104.198:5060
REGISTER sip:212.154.104.198:5060 SIP/2.0..Record-Route: <sip:212.154.104.1
98;ftag=xetm4kdmxed;lr=on>..Record-Route: <sip:212.154.104.198;ftag=xetm4kd
mxed;lr=on>..Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154
.104.198;branch=z9hG4bKf4dc.a48a7de7.0..Via: SIP/2.0/UDP 212.154.32.154:506
0..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bKf4dc.948a7de7.0..Via: SIP
/2.0/UDP 85.98.22.67:5060;branch=z9hG4bKba8f27b4d9b2aa07..From: <sip:833349
0056@212.154.104.198>;tag=xETM4kDMxED..To: <sip:8333490056@212.154.104.198>
..Call-ID: 6951B1111341111@85.98.22.67..CSeq: 213 REGISTER..Contact: <sip:8
333490056@85.98.22.67:5060>..Max-Forwards: 66..Expires: 60..Content-Length:
0....
#
U 212.154.104.198:5060 -> 212.154.32.154:5060
SIP/2.0 200 OK..Record-Route: <sip:212.154.104.198;ftag=xetm4kdmxed;lr=on>.
.Record-Route: <sip:212.154.104.198;ftag=xetm4kdmxed;lr=on>..Via: SIP/2.0/U
DP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bKf4dc
.a48a7de7.0..Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154
.104.198;branch=z9hG4bKf4dc.948a7de7.0..Via: SIP/2.0/UDP 85.98.22.67:5060;b
ranch=z9hG4bKba8f27b4d9b2aa07..From: <sip:8333490056@212.154.104.198>;tag=x
ETM4kDMxED..To: <sip:8333490056@212.154.104.198>;tag=b27e1a1d33761e85846fc9
8f5f3a7e58.5a9f..Call-ID: 6951B1111341111@85.98.22.67..CSeq: 213 REGISTER..
Contact: <sip:8333490056@85.98.22.67:5060>;q=0.00;expires=60..Server: Sip E
Xpress router (0.8.14 (i386/linux))..Content-Length: 0..Warning: 392 212.15
4.104.198:5060 "Noisy feedback tells: pid=5891 req_src_ip=212.154.32.154 r
eq_src_port=5060 in_uri=sip:212.154.104.198:5060 out_uri=sip:212.154.104.19
8:5060 via_cnt==5"....
#####
U 212.154.104.198:5060 -> 212.154.32.154:5060
REGISTER sip:212.154.104.198:5060 SIP/2.0..Record-Route: <sip:212.154.104.1
98;ftag=xETM4kDMxED;lr=on>..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bK
f4dc.948a7de7.0..Via: SIP/2.0/UDP 85.98.22.67:5060;branch=z9hG4bKba8f27b4d9
b2aa07..From: <sip:8333490056@212.154.104.198>;tag=xETM4kDMxED..To: <sip:83
33490056@212.154.104.198>..Call-ID: 6951B1111341111@85.98.22.67..CSeq: 213
REGISTER..Contact: <sip:8333490056@85.98.22.67:5060>..Max-Forwards: 69..Exp
ires: 60..Content-Length: 0....
#
U 212.154.104.198:5060 -> 212.154.32.154:5060
REGISTER sip:212.154.104.198:5060 SIP/2.0..Record-Route: <sip:212.154.104.1
98;ftag=xETM4kDMxED;lr=on>..Record-Route: <sip:212.154.104.198;ftag=xetm4kd
mxed;lr=on>..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bKf4dc.a48a7de7.0
..Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154.104.198;br
anch=z9hG4bKf4dc.948a7de7.0..Via: SIP/2.0/UDP 85.98.22.67:5060;branch=z9hG4
bKba8f27b4d9b2aa07..From: <sip:8333490056@212.154.104.198>;tag=xETM4kDMxED.
.To: <sip:8333490056@212.154.104.198>..Call-ID: 6951B1111341111(a)85.98.22.67
..CSeq: 213 REGISTER..Contact: <sip:8333490056@85.98.22.67:5060>..Max-Forwa
rds: 67..Expires: 60..Content-Length: 0....
###
U 212.154.32.154:5060 -> 212.154.104.198:5060
REGISTER sip:212.154.104.198:5060 SIP/2.0..Record-Route: <sip:212.154.104.1
98;ftag=xetm4kdmxed;lr=on>..Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/
2.0/UDP 212.154.104.198;branch=z9hG4bKf4dc.948a7de7.0..Via: SIP/2.0/UDP 85.
98.22.67:5060;branch=z9hG4bKba8f27b4d9b2aa07..From: <sip:8333490056@212.154
.104.198>;tag=xETM4kDMxED..To: <sip:8333490056@212.154.104.198>..Call-ID: 6
951B1111341111@85.98.22.67..CSeq: 213 REGISTER..Contact: <sip:8333490056@85
.98.22.67:5060>..Max-Forwards: 68..Expires: 60..Content-Length: 0....
#
U 212.154.104.198:5060 -> 212.154.32.154:5060
SIP/2.0 200 OK..Record-Route: <sip:212.154.104.198;ftag=xetm4kdmxed;lr=on>.
.Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154.104.198;bra
nch=z9hG4bKf4dc.948a7de7.0..Via: SIP/2.0/UDP 85.98.22.67:5060;branch=z9hG4b
Kba8f27b4d9b2aa07..From: <sip:8333490056@212.154.104.198>;tag=xETM4kDMxED..
To: <sip:8333490056@212.154.104.198>;tag=b27e1a1d33761e85846fc98f5f3a7e58.5
a9f..Call-ID: 6951B1111341111@85.98.22.67..CSeq: 213 REGISTER..Contact: <si
p:8333490056@85.98.22.67:5060>;q=0.00;expires=60..Server: Sip EXpress route
r (0.8.14 (i386/linux))..Content-Length: 0..Warning: 392 212.154.104.198:50
60 "Noisy feedback tells: pid=5893 req_src_ip=212.154.32.154 req_src_port=
5060 in_uri=sip:212.154.104.198:5060 out_uri=sip:212.154.104.198:5060 via_c
nt==3"....
#
U 212.154.32.154:5060 -> 212.154.104.198:5060
REGISTER sip:212.154.104.198:5060 SIP/2.0..Record-Route: <sip:212.154.104.1
98;ftag=xetm4kdmxed;lr=on>..Record-Route: <sip:212.154.104.198;ftag=xetm4kd
mxed;lr=on>..Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154
.104.198;branch=z9hG4bKf4dc.a48a7de7.0..Via: SIP/2.0/UDP 212.154.32.154:506
0..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bKf4dc.948a7de7.0..Via: SIP
/2.0/UDP 85.98.22.67:5060;branch=z9hG4bKba8f27b4d9b2aa07..From: <sip:833349
0056@212.154.104.198>;tag=xETM4kDMxED..To: <sip:8333490056@212.154.104.198>
..Call-ID: 6951B1111341111@85.98.22.67..CSeq: 213 REGISTER..Contact: <sip:8
333490056@85.98.22.67:5060>..Max-Forwards: 66..Expires: 60..Content-Length:
0....
#
U 212.154.104.198:5060 -> 212.154.32.154:5060
SIP/2.0 200 OK..Record-Route: <sip:212.154.104.198;ftag=xetm4kdmxed;lr=on>.
.Record-Route: <sip:212.154.104.198;ftag=xetm4kdmxed;lr=on>..Via: SIP/2.0/U
DP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bKf4dc
.a48a7de7.0..Via: SIP/2.0/UDP 212.154.32.154:5060..Via: SIP/2.0/UDP 212.154
.104.198;branch=z9hG4bKf4dc.948a7de7.0..Via: SIP/2.0/UDP 85.98.22.67:5060;b
ranch=z9hG4bKba8f27b4d9b2aa07..From: <sip:8333490056@212.154.104.198>;tag=x
ETM4kDMxED..To: <sip:8333490056@212.154.104.198>;tag=b27e1a1d33761e85846fc9
8f5f3a7e58.5a9f..Call-ID: 6951B1111341111@85.98.22.67..CSeq: 213 REGISTER..
Contact: <sip:8333490056@85.98.22.67:5060>;q=0.00;expires=60..Server: Sip E
Xpress router (0.8.14 (i386/linux))..Content-Length: 0..Warning: 392 212.15
4.104.198:5060 "Noisy feedback tells: pid=5888 req_src_ip=212.154.32.154 r
eq_src_port=5060 in_uri=sip:212.154.104.198:5060 out_uri=sip:212.154.104.19
8:5060 via_cnt==5"....
#####
U 85.96.192.140:5060 -> 212.154.104.198:5060
INVITE sip:8333490056@212.154.104.198 SIP/2.0..Via: SIP/2.0/UDP 85.96.192.1
40:5060;branch=z9hG4bKe3458b19d858bfb4..Max-Forwards: 70..To: <sip:83334900
56@212.154.104.198>..From: <sip:8334843600@212.154.104.198;user=phone>;tag=
xIzNzMDMxID..Call-ID: 712D1B911761212@192.168.0.101..CSeq: 1 INVITE..Contac
t: <sip:8334843600@85.96.192.140:5060>..Session-Expires: 100;refresher=uac.
.Supported: timer..Content-Type: application/sdp..Content-Length: 191....v=
0..o=8334843600 0 0 IN IP4 192.168.0.101..s=-..c=IN IP4 85.96.192.140..t=0
0..m=audio 15036 RTP/AVP 18 18..a=rtpmap:18 G729/8000..a=sendrecv..a=rtpmap
:18 G729/8000..a=sendrecv..a=ptime:20..
#
U 212.154.104.198:5060 -> 85.96.192.140:5060
SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP 85.96.
192.140:5060;branch=z9hG4bKe3458b19d858bfb4..To: <sip:8333490056@212.154.10
4.198>..From: <sip:8334843600@212.154.104.198;user=phone>;tag=xIzNzMDMxID..
Call-ID: 712D1B911761212@192.168.0.101..CSeq: 1 INVITE..Server: Sip EXpress
router (0.8.14 (i386/linux))..Content-Length: 0..Warning: 392 212.154.104.
198:5060 "Noisy feedback tells: pid=5893 req_src_ip=85.96.192.140 req_src_
port=5060 in_uri=sip:8333490056@212.154.104.198 out_uri=sip:8333490056@85.9
8.22.67:5060 via_cnt==1"....
#
U 212.154.104.198:5060 -> 85.98.22.67:5060
INVITE sip:8333490056@85.98.22.67:5060 SIP/2.0..Record-Route: <sip:83334900
56@212.154.104.198;ftag=xIzNzMDMxID;lr=on>..Via: SIP/2.0/UDP 212.154.104.19
8;branch=z9hG4bKa017.13855ff.0..Via: SIP/2.0/UDP 85.96.192.140:5060;branch=
z9hG4bKe3458b19d858bfb4..Max-Forwards: 69..To: <sip:8333490056@212.154.104.
198>..From: <sip:8334843600@212.154.104.198;user=phone>;tag=xIzNzMDMxID..Ca
ll-ID: 712D1B911761212@192.168.0.101..CSeq: 1 INVITE..Contact: <sip:8334843
600@85.96.192.140:5060>..Session-Expires: 100;refresher=uac..Supported: tim
er..Content-Type: application/sdp..Content-Length: 191....v=0..o=8334843600
0 0 IN IP4 192.168.0.101..s=-..c=IN IP4 85.96.192.140..t=0 0..m=audio 1503
6 RTP/AVP 18 18..a=rtpmap:18 G729/8000..a=sendrecv..a=rtpmap:18 G729/8000..
a=sendrecv..a=ptime:20..
#
U 212.154.104.198:5060 -> 85.98.22.67:5060
INVITE sip:8333490056@85.98.22.67:5060 SIP/2.0..Record-Route: <sip:83334900
56@212.154.104.198;ftag=xIzNzMDMxID;lr=on>..Via: SIP/2.0/UDP 212.154.104.19
8;branch=z9hG4bKa017.13855ff.0..Via: SIP/2.0/UDP 85.96.192.140:5060;branch=
z9hG4bKe3458b19d858bfb4..Max-Forwards: 69..To: <sip:8333490056@212.154.104.
198>..From: <sip:8334843600@212.154.104.198;user=phone>;tag=xIzNzMDMxID..Ca
ll-ID: 712D1B911761212@192.168.0.101..CSeq: 1 INVITE..Contact: <sip:8334843
600@85.96.192.140:5060>..Session-Expires: 100;refresher=uac..Supported: tim
er..Content-Type: application/sdp..Content-Length: 191....v=0..o=8334843600
0 0 IN IP4 192.168.0.101..s=-..c=IN IP4 85.96.192.140..t=0 0..m=audio 1503
6 RTP/AVP 18 18..a=rtpmap:18 G729/8000..a=sendrecv..a=rtpmap:18 G729/8000..
a=sendrecv..a=ptime:20..
#
U 85.98.22.67:5060 -> 212.154.104.198:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bKa017.138
55ff.0..Via: SIP/2.0/UDP 85.96.192.140:5060;branch=z9hG4bKe3458b19d858bfb4.
.From: <sip:8334843600@212.154.104.198;user=phone>;tag=xIzNzMDMxID..To: <si
p:8333490056@212.154.104.198>..Call-ID: 712D1B911761212@192.168.0.101..CSeq
: 1 INVITE..Content-Length: 0....
#
U 85.98.22.67:5060 -> 212.154.104.198:5060
SIP/2.0 180 Ringing..Via: SIP/2.0/UDP 212.154.104.198;branch=z9hG4bKa017.13
855ff.0..Via: SIP/2.0/UDP 85.96.192.140:5060;branch=z9hG4bKe3458b19d858bfb4
..Record-Route: <sip:8333490056@212.154.104.198;ftag=xIzNzMDMxID;lr=on>..Fr
om: <sip:8334843600@212.154.104.198;user=phone>;tag=xIzNzMDMxID..To: <sip:8
333490056@212.154.104.198>;tag=xIjM0EDMxID..Call-ID: 712D1B911761212(a)192.16
8.0.101..CSeq: 1 INVITE..Content-Length: 0....
#
U 212.154.104.198:5060 -> 85.96.192.140:5060
SIP/2.0 180 Ringing..Via: SIP/2.0/UDP 85.96.192.140:5060;branch=z9hG4bKe345
8b19d858bfb4..Record-Route: <sip:8333490056@212.154.104.198;ftag=xIzNzMDMxI
D;lr=on>..From: <sip:8334843600@212.154.104.198;user=phone>;tag=xIzNzMDMxID
..To: <sip:8333490056@212.154.104.198>;tag=xIjM0EDMxID..Call-ID: 712D1B9117
61212@192.168.0.101..CSeq: 1 INVITE..Content-Length: 0....
##########exit
42 received, 0 dropped
and this is when i try with command (root@sipproxy/ngrep> ngrep 905353490056@ port
5060)
interface: eth0 (212.154.104.196/255.255.255.252)
filter: ip and ( port 5060 )
match: 905353490056@
#########################################
U 85.96.192.140:5060 -> 212.154.104.198:5060
INVITE sip:905353490056@212.154.104.198 SIP/2.0..Via: SIP/2.0/UDP 85.96.192
.140:5060;branch=z9hG4bKa3b183e6526a35c9..Max-Forwards: 70..To: <sip:905353
490056@212.154.104.198>..From: <sip:8334843600@212.154.104.198;user=phone>;
tag=xIDN3UDMxID..Call-ID: 675D1B911761212@192.168.0.101..CSeq: 1 INVITE..Co
ntact: <sip:8334843600@85.96.192.140:5060>..Session-Expires: 100;refresher=
uac..Supported: timer..Content-Type: application/sdp..Content-Length: 191..
..v=0..o=8334843600 0 0 IN IP4 192.168.0.101..s=-..c=IN IP4 85.96.192.140..
t=0 0..m=audio 15038 RTP/AVP 18 18..a=rtpmap:18 G729/8000..a=sendrecv..a=rt
pmap:18 G729/8000..a=sendrecv..a=ptime:20..
#
U 212.154.104.198:5060 -> 85.96.192.140:5060
SIP/2.0 404 Not Found..Via: SIP/2.0/UDP 85.96.192.140:5060;branch=z9hG4bKa3
b183e6526a35c9..To: <sip:905353490056@212.154.104.198>;tag=b27e1a1d33761e85
846fc98f5f3a7e58.e905..From: <sip:8334843600@212.154.104.198;user=phone>;ta
g=xIDN3UDMxID..Call-ID: 675D1B911761212@192.168.0.101..CSeq: 1 INVITE..Serv
er: Sip EXpress router (0.8.14 (i386/linux))..Content-Length: 0..Warning: 3
92 212.154.104.198:5060 "Noisy feedback tells: pid=5891 req_src_ip=85.96.1
92.140 req_src_port=5060 in_uri=sip:905353490056@212.154.104.198 out_uri=si
p:905353490056@212.154.104.198 via_cnt==1"....
#
U 85.96.192.140:5060 -> 212.154.104.198:5060
ACK sip:905353490056@212.154.104.198 SIP/2.0..Via: SIP/2.0/UDP 85.96.192.14
0:5060;branch=z9hG4bKa3b183e6526a35c9..Max-Forwards: 70..To: <sip:905353490
056@212.154.104.198>;tag=b27e1a1d33761e85846fc98f5f3a7e58.e905..From: <sip:
8334843600@212.154.104.198;user=phone>;tag=xIDN3UDMxID..Call-ID: 675D1B9117
61212@192.168.0.101..CSeq: 1 ACK..Content-Length: 0....
######################################exit
82 received, 0 dropped
root@sipproxy/etc/ser> cat ser.cfg
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
debug=7
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
#loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/usr/local/lib/ser/modules/auth.so"
#loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
#modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
#modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
#modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
break;
};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
# if (!www_authorize("iptel.org", "subscriber"))
{
# www_challenge("iptel.org", "0");
# break;
# };
if (!(uri=~"sip:(833)|(834)"))
t_relay_to_udp ("212.154.32.154",
"5060");
save("location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
root@sipproxy/etc/ser>