[OpenSIPS-Devel] Problems with MSILO implemetation.

Кати Гугу katigugu at mail.ru
Mon Feb 2 16:05:06 CET 2015


(the text below in the attached file too) Hi for all!
 
Dear friends, please help !
 
I'm trying to implement a module MSILO, but he does not want to work . Maybe someone will find time and point out my mistakes .
1. I send a message from sip:  222222 at 192.168.0.18 to sip: 333333 at 192.168.0.18 with the text "Test msg", when sip: 333333 at 192.168.0.18 is not registered.
 
Watching port 5060 by ngrep
 
[root at localhost opensips-1.11.2-tls]# ngrep -d any port 5060
 
#
U 192.168.0.12:5060 -> 192.168.0.18:5060
MESSAGE sip:333333 at 192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.12:5060;branch=z9hG4bK80ac38c8e0a6e411a990f03fa51c9899;rport..From: "PhonerLite" <sip:222222 at 192.168.0.18>;tag=1848417148..To: <sip:333333
@192.168.0.18>..Call-ID: 80AC38C8-E0A6-E411-A98F-F03FA51C9899 at 192.168.0.12..CSeq: 22 MESSAGE..Contact: <sip:222222 at 192.168.0.12:5060>..Content-Type: text/plain; charset="UTF-8"..Max-Forwards: 70..Date: Fri,
30 Jan 2015 11:28:29 GMT..User-Agent: SIPPER for PhonerLite..Content-Length: 10....Test msg..
#
U 192.168.0.18:5060 -> 192.168.0.12:5060
SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 192.168.0.12:5060;received=192.168.0.12;branch=z9hG4bK80ac38c8e0a6e411a990f03fa51c9899;rport=5060..From: "PhonerLite" <sip:222222 at 192.168.0.18>;ta
g=1848417148..To: <sip:333333 at 192.168.0.18>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.90a5..Call-ID: 80AC38C8-E0A6-E411-A98F-F03FA51C9899 at 192.168.0.12..CSeq: 22 MESSAGE..Proxy-Authenticate: Digest realm="192.168
.0.18", nonce="54cb6afa00000029ebae04286947e69fdb73986faf7d8fb0"..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.12:5060 -> 192.168.0.18:5060
MESSAGE sip:333333 at 192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.12:5060;branch=z9hG4bK80ac38c8e0a6e411a991f03fa51c9899;rport..From: "PhonerLite" <sip:222222 at 192.168.0.18>;tag=1848417148..To: <sip:333333
@192.168.0.18>..Call-ID: 80AC38C8-E0A6-E411-A98F-F03FA51C9899 at 192.168.0.12..CSeq: 23 MESSAGE..Contact: <sip:222222 at 192.168.0.12:5060>..Proxy-Authorization: Digest username="222222", realm="192.168.0.18", no
nce="54cb6afa00000029ebae04286947e69fdb73986faf7d8fb0", uri="sip:333333 at 192.168.0.18", response="1186c81c8466b138f7dd462d9df3be8d", algorithm=MD5..Content-Type: text/plain; charset="UTF-8"..Max-Forwards: 70
..Date: Fri, 30 Jan 2015 11:28:29 GMT..User-Agent: SIPPER for PhonerLite..Content-Length: 10....Test msg..
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
MESSAGE sip:222222 at 192.168.0.12:5060 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK60b1.dd2a1073.0..To: sip:222222 at 192.168.0.18..From: <sip:admin at 192.168.0.18>;tag=533cb9e91f4b999cf76861cbb9ed54
ed-0adf..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e52e-19141 at 192.168.0.18..Max-Forwards: 70..Content-Length: 27..User-Agent: OpenSIPS (1.11.2-notls (x86_64/linux))..Contact: admin at 192.168.0.18..Content-Type:
text/plain....*** User 333333 is offline!
#
U 192.168.0.18:5060 -> 192.168.0.12:5060
SIP/2.0 404 Not Found..Via: SIP/2.0/UDP 192.168.0.12:5060;received=192.168.0.12;branch=z9hG4bK80ac38c8e0a6e411a991f03fa51c9899;rport=5060..From: "PhonerLite" <sip:222222 at 192.168.0.18>;tag=1848417148..To: <s
ip:333333 at 192.168.0.18>;tag=155c340f586c28d0300cf5a6ccf90d99-4af5..Call-ID: 80AC38C8-E0A6-E411-A98F-F03FA51C9899 at 192.168.0.12..CSeq: 23 MESSAGE..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Lengt
h: 0....
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK60b1.dd2a1073.0..To: sip:222222 at 192.168.0.18;tag=c97b4d1cb1f3d0da549e06a8d482ef63.4256..From: <sip:admin at 192.168.0
.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-0adf..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e52e-19141 at 192.168.0.18..Proxy-Authenticate: Digest realm="192.168.0.18", nonce="54cb6afa0000002a76a7eed8df6c878b5f5f94
77700201bb"..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
 
sip:222222 at 192.168.0.18  does not get the message «*** User 333333 is offline!», but nevertheless
 
MariaDB [opensips]> select * from silo;
+----+-------------------------+-------------------------+----------+--------------+------------+------------+----------+------------+-----------------------------------------+
| id | src_addr | dst_addr | username | domain | inc_time | exp_time | snd_time | ctype | body |
+----+-------------------------+-------------------------+----------+--------------+------------+------------+----------+------------+-----------------------------------------+
| 4 | sip:222222 at 192.168.0.18 | sip:333333 at 192.168.0.18 | 333333 | 192.168.0.18 | 1422529336 | 1422788536 | 0 | text/plain | aasasasas asasasa asasas
|
| 3 | sip:111111 at 192.168.0.18 | sip:333333 at 192.168.0.18 | 333333 | 192.168.0.18 | 1422436770 | 1422695970 | 0 | text/plain | jfjhgfjhgfjhgfj kuhy07 upiouy
|
| 5 | sip:111111 at 192.168.0.18 | sip:333333 at 192.168.0.18 | 333333 | 192.168.0.18 | 1422614249 | 1422873449 | 0 | text/plain | kjhkjhg kjhgkjhg kjhgkjhg kjhgkjhg l;
|
| 6 | sip:222222 at 192.168.0.18 | sip:333333 at 192.168.0.18 | 333333 | 192.168.0.18 | 1422616084 | 1422875284 | 0 | text/plain | zzxzxzxx czccczcz
|
| 7 | sip:222222 at 192.168.0.18 | sip:333333 at 192.168.0.18 | 333333 | 192.168.0.18 | 1422617308 | 1422876508 | 0 | text/plain | Test msg
|
+----+-------------------------+-------------------------+----------+--------------+------------+------------+----------+------------+-----------------------------------------+
5 rows in set (0.00 sec)
 

After registration  sip:333333 at 192.168.0.18
 
[root at localhost opensips-1.11.2-tls]# ngrep -d any port 5060
interface: any
filter: (ip or ip6) and ( port 5060 )
#
U 192.168.0.18:5060 -> 192.168.0.14:5060
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 192.168.0.14:5060;received=192.168.0.14;branch=z9hG4bK003c018fe2a6e411bf913af8496c2537;rport=5060..From: "PhonerLite" <sip:Admin at 192.168.0.18>;tag=3726656676..To:
"PhonerLite" <sip:Admin at 192.168.0.18>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.5819..Call-ID: 80F1EFC4-DDA6-E411-BF8A-3AF8496C2537 at 192.168.0.14..CSeq: 9 REGISTER..WWW-Authenticate: Digest realm="192.168.0.18",
nonce="54cb6e060000002d2088cd91e4fcc304ae12a6dc1179f1e3", stale=true..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.14:5060 -> 192.168.0.18:5060
REGISTER sip:192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.14:5060;branch=z9hG4bK003c018fe2a6e411bf933af8496c2537;rport..From: "PhonerLite" <sip:Admin at 192.168.0.18>;tag=1228958365..To: "PhonerLite" <sip:
Admin at 192.168.0.18>..Call-ID: 003C018F-E2A6-E411-BF92-3AF8496C2537 at 192.168.0.14..CSeq: 10 REGISTER..Contact: <sip:Admin at 192.168.0.14:5060>;Expires=0;+sip.instance="<urn:uuid:8079F1F2-EB9F-E411-BAEA-2B6C55B8
B03A>"..Authorization: Digest username="Admin", realm="192.168.0.18", nonce="54cb6e060000002d2088cd91e4fcc304ae12a6dc1179f1e3", uri="sip:192.168.0.18", response="24b2adf28de3fc56940e8c701888e7f3", algorithm
=MD5..Allow: INVITE, OPTIONS, ACK, BYE, CANCEL, INFO, NOTIFY, MESSAGE, UPDATE..Max-Forwards: 70..User-Agent: SIPPER for PhonerLite..Expires: 0..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.14:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP 192.168.0.14:5060;received=192.168.0.14;branch=z9hG4bK003c018fe2a6e411bf933af8496c2537;rport=5060..From: "PhonerLite" <sip:Admin at 192.168.0.18>;tag=1228958365..To: "PhonerLit
e" <sip:Admin at 192.168.0.18>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.fda9..Call-ID: 003C018F-E2A6-E411-BF92-3AF8496C2537 at 192.168.0.14..CSeq: 10 REGISTER..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-
Length: 0....
#
U 192.168.0.14:5060 -> 192.168.0.18:5060
REGISTER sip:192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.14:5060;branch=z9hG4bK80d2998fe2a6e411bce26736c66fd40a;rport..From: "PhonerLite" <sip:333333 at 192.168.0.18>;tag=4258112931..To: "PhonerLite" <sip
:333333 at 192.168.0.18>..Call-ID: 80D2998F-E2A6-E411-BCE0-6736C66FD40A at 192.168.0.14..CSeq: 1 REGISTER..Contact: <sip:333333 at 192.168.0.14:5060>;+sip.instance="<urn:uuid:8079F1F2-EB9F-E411-BAEA-2B6C55B8B03A>"..
Allow: INVITE, OPTIONS, ACK, BYE, CANCEL, INFO, NOTIFY, MESSAGE, UPDATE..Max-Forwards: 70..Allow-Events: org.3gpp.nwinitdereg..User-Agent: SIPPER for PhonerLite..Expires: 900..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.14:5060
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 192.168.0.14:5060;received=192.168.0.14;branch=z9hG4bK80d2998fe2a6e411bce26736c66fd40a;rport=5060..From: "PhonerLite" <sip:333333 at 192.168.0.18>;tag=4258112931..To:
"PhonerLite" <sip:333333 at 192.168.0.18>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.764b..Call-ID: 80D2998F-E2A6-E411-BCE0-6736C66FD40A at 192.168.0.14..CSeq: 1 REGISTER..WWW-Authenticate: Digest realm="192.168.0.18"
, nonce="54cb6e070000002e9599bd2abcb766d1a90d0214267a1dbb"..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.14:5060 -> 192.168.0.18:5060
REGISTER sip:192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.14:5060;branch=z9hG4bK80d2998fe2a6e411bce36736c66fd40a;rport..From: "PhonerLite" <sip:333333 at 192.168.0.18>;tag=4258112931..To: "PhonerLite" <sip
:333333 at 192.168.0.18>..Call-ID: 80D2998F-E2A6-E411-BCE0-6736C66FD40A at 192.168.0.14..CSeq: 2 REGISTER..Contact: <sip:333333 at 192.168.0.14:5060>;+sip.instance="<urn:uuid:8079F1F2-EB9F-E411-BAEA-2B6C55B8B03A>"..
Authorization: Digest username="333333", realm="192.168.0.18", nonce="54cb6e070000002e9599bd2abcb766d1a90d0214267a1dbb", uri="sip:192.168.0.18", response="3cf28880659b652be80058e4eb269124", algorithm=MD5..A
llow: INVITE, OPTIONS, ACK, BYE, CANCEL, INFO, NOTIFY, MESSAGE, UPDATE..Max-Forwards: 70..Allow-Events: org.3gpp.nwinitdereg..User-Agent: SIPPER for PhonerLite..Expires: 900..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.14:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP 192.168.0.14:5060;received=192.168.0.14;branch=z9hG4bK80d2998fe2a6e411bce36736c66fd40a;rport=5060..From: "PhonerLite" <sip:333333 at 192.168.0.18>;tag=4258112931..To: "PhonerLi
te" <sip:333333 at 192.168.0.18>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.ac1b..Call-ID: 80D2998F-E2A6-E411-BCE0-6736C66FD40A at 192.168.0.14..CSeq: 2 REGISTER..Contact: <sip:333333 at 192.168.0.14:5060>;expires=900..Se
rver: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
MESSAGE sip:333333 at 192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK5456.1399b911.0..To: sip:333333 at 192.168.0.18..From: <sip:111111 at 192.168.0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-8
b34..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e52d-19138 at 192.168.0.18..Max-Forwards: 70..Content-Length: 76..User-Agent: OpenSIPS (1.11.2-notls (x86_64/linux))..Date: Wed, 28 Jan 2015 09:19:30 GMT..Content-Ty
pe: text/plain..Contact: <sip:111111 at 192.168.0.18>;msilo=yes....[Offline message - Wed Jan 28 13:19:30 2015] jfjhgfjhgfjhgfj kuhy07 upiouy..
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
MESSAGE sip:333333 at 192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK6456.e559f714.0..To: sip:333333 at 192.168.0.18..From: <sip:222222 at 192.168.0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-e
ec9..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e52e-19138 at 192.168.0.18..Max-Forwards: 70..Content-Length: 72..User-Agent: OpenSIPS (1.11.2-notls (x86_64/linux))..Date: Thu, 29 Jan 2015 11:02:16 GMT..Content-Ty
pe: text/plain..Contact: <sip:222222 at 192.168.0.18>;msilo=yes....[Offline message - Thu Jan 29 15:02:16 2015] aasasasas asasasa asasas ..
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK5456.1399b911.0..To: sip:333333 at 192.168.0.18;tag=c97b4d1cb1f3d0da549e06a8d482ef63.b2ae..From: <sip:111111 at 192.168.
0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-8b34..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e52d-19138 at 192.168.0.18..Proxy-Authenticate: Digest realm="192.168.0.18", nonce="54cb6e070000002f53486e16b7d88d49bf946
70d4787fee3"..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
MESSAGE sip:333333 at 192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK7456.021a28e7.0..To: sip:333333 at 192.168.0.18..From: <sip:111111 at 192.168.0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-5
05f..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e52f-19138 at 192.168.0.18..Max-Forwards: 70..Content-Length: 84..User-Agent: OpenSIPS (1.11.2-notls (x86_64/linux))..Date: Fri, 30 Jan 2015 10:37:29 GMT..Content-Ty
pe: text/plain..Contact: <sip:111111 at 192.168.0.18>;msilo=yes....[Offline message - Fri Jan 30 14:37:29 2015] kjhkjhg kjhgkjhg kjhgkjhg kjhgkjhg l;..
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK6456.e559f714.0..To: sip:333333 at 192.168.0.18;tag=c97b4d1cb1f3d0da549e06a8d482ef63.436d..From: <sip:222222 at 192.168.
0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-eec9..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e52e-19138 at 192.168.0.18..Proxy-Authenticate: Digest realm="192.168.0.18", nonce="54cb6e0700000030c4998d9cb2bf60b2e80ef
4ed64a8ff02"..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
MESSAGE sip:333333 at 192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK3766.67dcbe14.0..To: sip:333333 at 192.168.0.18..From: <sip:222222 at 192.168.0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-4
dae..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e530-19138 at 192.168.0.18..Max-Forwards: 70..Content-Length: 64..User-Agent: OpenSIPS (1.11.2-notls (x86_64/linux))..Date: Fri, 30 Jan 2015 11:08:04 GMT..Content-Ty
pe: text/plain..Contact: <sip:222222 at 192.168.0.18>;msilo=yes....[Offline message - Fri Jan 30 15:08:04 2015] zzxzxzxx czccczcz..
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK7456.021a28e7.0..To: sip:333333 at 192.168.0.18;tag=c97b4d1cb1f3d0da549e06a8d482ef63.c30a..From: <sip:111111 at 192.168.
0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-505f..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e52f-19138 at 192.168.0.18..Proxy-Authenticate: Digest realm="192.168.0.18", nonce="54cb6e0700000031d16720e32b27b7018406f
9fc815aa472"..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK3766.67dcbe14.0..To: sip:333333 at 192.168.0.18;tag=c97b4d1cb1f3d0da549e06a8d482ef63.c300..From: <sip:222222 at 192.168.
0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-4dae..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e530-19138 at 192.168.0.18..Proxy-Authenticate: Digest realm="192.168.0.18", nonce="54cb6e07000000328fb89189bf331b4e938b9
c08721d5da6"..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
MESSAGE sip:333333 at 192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK4766.c5f30293.0..To: sip:333333 at 192.168.0.18..From: <sip:222222 at 192.168.0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-2
853..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e531-19138 at 192.168.0.18..Max-Forwards: 70..Content-Length: 55..User-Agent: OpenSIPS (1.11.2-notls (x86_64/linux))..Date: Fri, 30 Jan 2015 11:28:28 GMT..Content-Ty
pe: text/plain..Contact: <sip:222222 at 192.168.0.18>;msilo=yes....[Offline message - Fri Jan 30 15:28:28 2015] Test msg..
#
U 192.168.0.18:5060 -> 192.168.0.18:5060
SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 192.168.0.18:5060;branch=z9hG4bK4766.c5f30293.0..To: sip:333333 at 192.168.0.18;tag=c97b4d1cb1f3d0da549e06a8d482ef63.7696..From: <sip:222222 at 192.168.
0.18>;tag=533cb9e91f4b999cf76861cbb9ed54ed-2853..CSeq: 10 MESSAGE..Call-ID: 6fe37d527532e531-19138 at 192.168.0.18..Proxy-Authenticate: Digest realm="192.168.0.18", nonce="54cb6e07000000336d8dd3d8dff131408d04c
30edc782ca8"..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.14:5060 -> 192.168.0.18:5060
SUBSCRIBE sip:333333 at 192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.14:5060;branch=z9hG4bK80d2998fe2a6e411bce46736c66fd40a;rport..From: "PhonerLite" <sip:333333 at 192.168.0.18>;tag=3298267247..To: <sip:3333
33 at 192.168.0.18>..Call-ID: 80D2998F-E2A6-E411-BCE1-6736C66FD40A at 192.168.0.14..CSeq: 3 SUBSCRIBE..Contact: <sip:333333 at 192.168.0.14:5060>;+sip.instance="<urn:uuid:8079F1F2-EB9F-E411-BAEA-2B6C55B8B03A>"..Max-
Forwards: 70..User-Agent: SIPPER for PhonerLite..Expires: 1800..Event: message-summary..Accept: application/simple-message-summary..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.14:5060
SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 192.168.0.14:5060;received=192.168.0.14;branch=z9hG4bK80d2998fe2a6e411bce46736c66fd40a;rport=5060..From: "PhonerLite" <sip:333333 at 192.168.0.18>;ta
g=3298267247..To: <sip:333333 at 192.168.0.18>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.989a..Call-ID: 80D2998F-E2A6-E411-BCE1-6736C66FD40A at 192.168.0.14..CSeq: 3 SUBSCRIBE..Proxy-Authenticate: Digest realm="192.16
8.0.18", nonce="54cb6e0700000034f5cb663365779ba2dc87f5bfa41d18cb"..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.0.14:5060 -> 192.168.0.18:5060
SUBSCRIBE sip:333333 at 192.168.0.18 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.14:5060;branch=z9hG4bK80d2998fe2a6e411bce56736c66fd40a;rport..From: "PhonerLite" <sip:333333 at 192.168.0.18>;tag=3298267247..To: <sip:3333
33 at 192.168.0.18>..Call-ID: 80D2998F-E2A6-E411-BCE1-6736C66FD40A at 192.168.0.14..CSeq: 4 SUBSCRIBE..Contact: <sip:333333 at 192.168.0.14:5060>;+sip.instance="<urn:uuid:8079F1F2-EB9F-E411-BAEA-2B6C55B8B03A>"..Prox
y-Authorization: Digest username="333333", realm="192.168.0.18", nonce="54cb6e0700000034f5cb663365779ba2dc87f5bfa41d18cb", uri="sip:333333 at 192.168.0.18", response="5ac6a704ef56c1426c4e20b1327bdc6a", algorit
hm=MD5..Max-Forwards: 70..User-Agent: SIPPER for PhonerLite..Expires: 1800..Event: message-summary..Accept: application/simple-message-summary..Content-Length: 0....
#
U 192.168.0.18:5060 -> 192.168.0.14:5060
SIP/2.0 503 Service Unavailable..Via: SIP/2.0/UDP 192.168.0.14:5060;received=192.168.0.14;branch=z9hG4bK80d2998fe2a6e411bce56736c66fd40a;rport=5060..From: "PhonerLite" <sip:333333 at 192.168.0.18>;tag=32982672
47..To: <sip:333333 at 192.168.0.18>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.42ca..Call-ID: 80D2998F-E2A6-E411-BCE1-6736C66FD40A at 192.168.0.14..CSeq: 4 SUBSCRIBE..Server: OpenSIPS (1.11.2-notls (x86_64/linux))..Co
ntent-Length: 0....
 
sip:333333 at 192.168.0.18 has not received their messages that were stored in the database.


My  opensips.cfg:
 
 
 
####### Global Parameters #########
 
log_facility=LOG_LOCAL0
 
fork=yes
children=4
 
/* uncomment the following lines to enable debugging */
debug=6
#fork=no
log_stderror=yes
 
/* uncomment the next line to enable the auto temporary blacklisting of
not available destinations (default disabled) */
#disable_dns_blacklist=no
 
/* uncomment the next line to enable IPv6 lookup after IPv4 dns
lookup failures (default disabled) */
#dns_try_ipv6=yes
 
/* comment the next line to enable the auto discovery of local aliases
based on revers DNS on IPs */
auto_aliases=no
 
 
listen=udp:127.0.0.1:5060 # CUSTOMIZE ME
listen=udp:192.168.0.18:5060
#listen=udp:enp2s0:5060
 
#disable_tcp=yes
listen=tcp:127.0.0.1:5060 # CUSTOMIZE ME
listen=tcp:192.168.0.18:5060
#listen=tcp:enp2s0:5060
 
disable_tls=yes
 
 
####### Modules Section ########
 
#set module path
mpath="/usr/local/lib64/opensips/modules/"
 
#### SIGNALING module
loadmodule "signaling.so"
 
#### StateLess module
loadmodule "sl.so"
 
#### Transaction Module
 
loadmodule "tm.so"
modparam("tm", "fr_timeout", 5)
#modparam("tm", "fr_inv_timeout", 30)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
modparam("tm", "fr_timer", 10 )
modparam("tm", "fr_inv_timer", 15 )
modparam("tm", "wt_timer", 10 )
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 
#### Record Route Module
loadmodule "rr.so"
/* do not append from tag to the RR (no need for this script) */
modparam("rr", "append_fromtag", 0)
 
#### MAX ForWarD module
loadmodule "maxfwd.so"
 
#### SIP MSG OPerationS module
loadmodule "sipmsgops.so"
 
#### FIFO Management Interface
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)
 
 
#### URI module
loadmodule "uri.so"
modparam("uri", "use_uri_table", 0)
modparam ("uri", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
 
#### MYSQL module
loadmodule "db_mysql.so"
 
#### HTTPD module
loadmodule "httpd.so"
modparam("httpd", "port", 8888)
 
#loadmodule "mi_http.so"
#loadmodule "pi_http.so"
# modparam("pi_http", "framework", "/usr/local/src/opensips/examples/pi_framework.xml")
#loadmodule "mi_xmlrpc_ng.so"
 
#### USeR LOCation module
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
 
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#modparam("usrloc", "db_mode", 0)
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 
loadmodule "msilo.so"
# -- msilo params --
 
modparam("msilo","db_url","mysql://opensips:opensipsrw@localhost/opensips")
modparam("msilo","from_address","sip:admin at 192.168.0.18")
#modparam("msilo","contact_hdr","Contact: admin at 192.168.0.18:5060;msilo=yes\r\n")
modparam("msilo","contact_hdr","Contact: admin at 192.168.0.18\r\n")
modparam("msilo","content_type_hdr","Content-Type: text/plain\r\n")
modparam("msilo","offline_message","*** User $rU is offline!")
 
modparam("msilo", "use_contact", 1)
 
#### REGISTRAR module
loadmodule "registrar.so"
modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
modparam("registrar", "default_expires", 120)
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam("registrar", "max_contacts", 10)
 
#### ACCounting module
loadmodule "acc.so"
/* what special events should be accounted ? */
modparam("acc", "early_media", 0)
modparam("acc", "report_cancels", 0)
/* by default we do not adjust the direct of the sequential requests.
if you enable this parameter, be sure the enable "append_fromtag"
in "rr" module */
modparam("acc", "detect_direction", 0)
modparam("acc", "failed_transaction_flag", "ACC_FAILED")
/* account triggers (flags) */
modparam("acc", "db_flag", "ACC_DO")
modparam("acc", "db_missed_flag", "ACC_MISSED")
modparam("acc", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
 
 
#### AUTHentication modules
loadmodule "auth.so"
modparam("auth", "username_spec", "$var(username)")
modparam("auth", "password_spec", "$avp(password)")
 
loadmodule "auth_db.so"
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
modparam("auth_db", "load_credentials", "")
 
 
#### ALIAS module
loadmodule "alias_db.so"
modparam("alias_db", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
 
 
#### DIALOG module
loadmodule "dialog.so"
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 21600) # 6 hours timeout
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
 
 
#### MI_HTTP module
loadmodule "mi_http.so"
 
 
####### Routing Logic ########
 
# main request routing logic
 
route{
 
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
 
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
 
# validate the sequential request against dialog
if ( $DLG_status!=NULL && !validate_dialog() ) {
xlog("In-Dialog $rm from $si (callid=$ci) is not valid according to dialog\n");
## exit;
}
 
if (is_method("BYE")) {
setflag(ACC_DO); # do accounting ...
setflag(ACC_FAILED); # ... even if the transaction fails
} else if (is_method("INVITE")) {
# even if in most of the cases is useless, do RR for
# re-INVITEs alos, as some buggy clients do change route set
# during the dialog.
record_route();
}
 
# route it out to whatever destination was set by loose_route()
# in $du (destination URI).
route(relay);
} else {
 
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# non loose-route, but stateful ACK; must be an ACK after
# a 487 or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction ->
# ignore and discard
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}
 
# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans())
t_relay();
exit;
}
 
t_check_trans();
 
if ( !(is_method("REGISTER") ) ) {
 
if (from_uri==myself)
 
{
 
# authenticate if from local subscriber
# authenticate all initial non-REGISTER request that pretend to be
# generated by local subscriber (domain from FROM URI is local)
if (!proxy_authorize("", "subscriber")) {
 
proxy_challenge("", "0");
exit;
}
if (!db_check_from()) {
sl_send_reply("403","Forbidden auth ID");
exit;
}
 
consume_credentials();
# caller authenticated
 
} else {
# if caller is not local, then called number must be local
 
if (!uri==myself) {
send_reply("403","Rely forbidden");
exit;
}
}
 
}
 
# preloaded route checking
if (loose_route()) {
xlog("L_ERR",
"Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]");
if (!is_method("ACK"))
sl_send_reply("403","Preload Route denied");
exit;
}
 
# record routing
if (!is_method("REGISTER|MESSAGE"))
record_route();
 
# account only INVITEs
if (is_method("INVITE")) {
 
# create dialog with timeout
if ( !create_dialog("B") ) {
send_reply("500","Internal Server Error");
exit;
}
 
setflag(ACC_DO); # do accounting
}
 
 
if (!uri==myself)
{
append_hf("P-hint: outbound\r\n");
 
route(relay);
 
 
}
 
# requests for my domain
 
if (is_method("PUBLISH|SUBSCRIBE"))
{
sl_send_reply("503", "Service Unavailable");
exit;
}
 
if (is_method("REGISTER"))
{
 
# authenticate the REGISTER requests
if (!www_authorize("", "subscriber"))
{
www_challenge("", "0");
exit;
}
 
if (!db_check_to())
{
sl_send_reply("403","Forbidden auth ID");
exit;
}
 
if ( proto==TCP || 0 ) setflag(TCP_PERSISTENT);
 
if (!save("location")){
sl_reply_error();
}
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!MSILO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
else{
if (uri==myself) {
# MSILO - dumping user's offline messages
if (m_dump("$fu")){
xlog("MSILO: offline messages dumped - if they were $rU\n");
 
}else{
xlog("MSILO: no offline messages dumped\n");
}
}
}
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!MSILO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
exit;
}
 
if ($rU==NULL) {
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
 
 
# apply DB based aliases
alias_db_lookup("dbaliases");
 
# do lookup with method filtering
if (!lookup("location","m")) {
if (!db_does_uri_exist()) {
send_reply("420","Bad Extension");
exit;
}
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!MSILO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if (method=="MESSAGE")
{
xlog("MESSAGE received -> storing using MSILO\n");
 
 
# MSILO - storing as offline message
if (m_store("$ru"))
{
xlog("MSILO: offline message stored\n");
}else{
xlog("MSILO: offline message NOT stored\n");
if (!t_reply("503", "Service Unavailable"))
{
sl_reply_error();
};
};
}
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!MSILO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
t_newtran();
t_reply("404", "Not Found");
exit;
}
 
# when routing via usrloc, log the missed calls also
setflag(ACC_MISSED);
route(relay);
}
 
route[relay] {
# for INVITEs enable some additional helper routes
if (is_method("INVITE")) {
 
t_on_branch("per_branch_ops");
t_on_reply("handle_nat");
t_on_failure("missed_call");
}
 
if (!t_relay()) {
send_reply("500","Internal Error");
};
exit;
}
 
branch_route[per_branch_ops] {
xlog("new branch at $ru\n");
}
 
onreply_route[handle_nat] {
 
xlog("incoming reply\n");
}
 
 
failure_route[missed_call] {
if (t_was_cancelled()) {
exit;
}
 
# uncomment the following lines if you want to block client
# redirect based on 3xx replies.
##if (t_check_status("3[0-9][0-9]")) {
##t_reply("404","Not found");
## exit;
##}
 
}
 
local_route {
if (is_method("BYE") && $DLG_dir=="UPSTREAM") {
 
acc_db_request("200 Dialog Timeout", "acc");
 
}
}
 
failure_route[1] {
# forwarding failed -- check if the request was a MESSAGE
if (!method=="MESSAGE")
{
exit;
};
 
log(1,"MSILO:the downstream UA doesn't support MESSAGEs\n");
# we have changed the R-URI with the contact address, ignore it now
if (m_store("$ou"))
{
log("MSILO: offline message stored\n");
t_reply("202", "Accepted");
}else{
log("MSILO: offline message NOT stored\n");
t_reply("503", "Service Unavailable");
};
}
 
 

What am I doing wrong?
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20150202/6cc49d3f/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 24285 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/devel/attachments/20150202/6cc49d3f/attachment-0001.obj>


More information about the Devel mailing list