[OpenSIPS-Users] mid_registrar remove all bindings

vasilevalex alexei.vasilyev at gmail.com
Mon Jun 18 09:27:40 EDT 2018


Hello.

We have simple schema Phone -> OpenSIPS with mid_registrar -> Asterisk. And
there is strange process for REGISTER message from Phone with "*" in Contact
(remove all bindings).

After standard sequence with Authorization and receiving Ok from Asterisk,
mid_registar generates additional REGISTER message with sequence number of
first (Unauthorized register) message. Asterisk of course answers with
error. This message contains Contact:
<sip:2552 at 10.20.20.248:5060>;expires=0. But is it needed, if we already
removed all bindings, and got the answer, that they are removed?

<http://opensips-open-sip-server.1449251.n2.nabble.com/file/t396951/star-register.png> 


Phone 10.10.10.138 (external ip)
OpenSIPS 10.20.20.248
Asterisk 10.30.30.49

SIP Trace:

2018/06/18 12:48:50.165993 10.10.10.138:46583 -> 10.20.20.248:5060
REGISTER sip:siptest.test.com SIP/2.0
Via: SIP/2.0/UDP 172.16.1.141:46583;branch=z9hG4bK-iqcvselns7gw;rport
From: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=y72nni51cm
To: "Aleksei Vasilev" <sip:2552 at siptest.test.com>
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
CSeq: 2923 REGISTER
Max-Forwards: 70
User-Agent: snom725/8.7.5.35
Contact: *
Allow-Events: dialog
X-Real-IP: 172.16.1.141
Supported: path, gruu
Expires: 0
Content-Length: 0



2018/06/18 12:48:50.166602 10.20.20.248:5060 -> 10.30.30.49:5060
REGISTER sip:10.30.30.49 SIP/2.0
Via: SIP/2.0/UDP 10.20.20.248:5060;branch=z9hG4bK0cb5.808b8e8.0
Via: SIP/2.0/UDP
172.16.1.141:46583;received=10.10.10.138;branch=z9hG4bK-iqcvselns7gw;rport=46583
From: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=y72nni51cm
To: "Aleksei Vasilev" <sip:2552 at siptest.test.com>
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
CSeq: 2923 REGISTER
Max-Forwards: 69
User-Agent: snom725/8.7.5.35
Contact: *
Allow-Events: dialog
X-Real-IP: 172.16.1.141
Supported: path, gruu
Expires: 0
Content-Length: 0



2018/06/18 12:48:50.167363 10.30.30.49:5060 -> 10.20.20.248:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
10.20.20.248:5060;branch=z9hG4bK0cb5.808b8e8.0;received=10.20.20.248;rport=5060
Via: SIP/2.0/UDP
172.16.1.141:46583;received=10.10.10.138;branch=z9hG4bK-iqcvselns7gw;rport=46583
From: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=y72nni51cm
To: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=as21b74178
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
CSeq: 2923 REGISTER
Server: asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="56721c8c"
Content-Length: 0



2018/06/18 12:48:50.167614 10.20.20.248:5060 -> 10.10.10.138:46583
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
172.16.1.141:46583;received=10.10.10.138;branch=z9hG4bK-iqcvselns7gw;rport=46583
From: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=y72nni51cm
To: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=as21b74178
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
CSeq: 2923 REGISTER
Server: asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="56721c8c"
Content-Length: 0



2018/06/18 12:48:50.195562 10.10.10.138:46583 -> 10.20.20.248:5060
REGISTER sip:siptest.test.com SIP/2.0
Via: SIP/2.0/UDP 172.16.1.141:46583;branch=z9hG4bK-urxrbzyhmha1;rport
From: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=y72nni51cm
To: "Aleksei Vasilev" <sip:2552 at siptest.test.com>
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
CSeq: 2924 REGISTER
Max-Forwards: 70
User-Agent: snom725/8.7.5.35
Contact: *
Allow-Events: dialog
X-Real-IP: 172.16.1.141
Supported: path, gruu
Authorization: Digest
username="2552",realm="asterisk",nonce="56721c8c",uri="sip:siptest.test.com",response="093865994e1d93a398dfca21ae06f9cb",algorithm=MD5
Expires: 0
Content-Length: 0



2018/06/18 12:48:50.196083 10.20.20.248:5060 -> 10.30.30.49:5060
REGISTER sip:10.30.30.49 SIP/2.0
Via: SIP/2.0/UDP 10.20.20.248:5060;branch=z9hG4bKdbb5.def5a6b1.0
Via: SIP/2.0/UDP
172.16.1.141:46583;received=10.10.10.138;branch=z9hG4bK-urxrbzyhmha1;rport=46583
From: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=y72nni51cm
To: "Aleksei Vasilev" <sip:2552 at siptest.test.com>
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
CSeq: 2924 REGISTER
Max-Forwards: 69
User-Agent: snom725/8.7.5.35
Contact: *
Allow-Events: dialog
X-Real-IP: 172.16.1.141
Supported: path, gruu
Authorization: Digest
username="2552",realm="asterisk",nonce="56721c8c",uri="sip:siptest.test.com",response="093865994e1d93a398dfca21ae06f9cb",algorithm=MD5
Expires: 0
Content-Length: 0



2018/06/18 12:48:50.197335 10.30.30.49:5060 -> 10.20.20.248:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP
10.20.20.248:5060;branch=z9hG4bKdbb5.def5a6b1.0;received=10.20.20.248;rport=5060
Via: SIP/2.0/UDP
172.16.1.141:46583;received=10.10.10.138;branch=z9hG4bK-urxrbzyhmha1;rport=46583
From: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=y72nni51cm
To: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=as21b74178
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
CSeq: 2924 REGISTER
Server: asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 0
Date: Mon, 18 Jun 2018 12:48:50 GMT
Content-Length: 0


This one is strange:

2018/06/18 12:48:50.199665 10.20.20.248:5060 -> 10.30.30.49:5060
REGISTER sip:10.30.30.49 SIP/2.0
Via: SIP/2.0/UDP 10.20.20.248:5060;branch=z9hG4bK0cb5.908b8e8.0
To: sip:2552 at siptest.test.com
From: <sip:2552 at siptest.test.com>;tag=82eca4f0c52e76c98f63fc89b4b49706-9215
CSeq: 2923 REGISTER
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
Max-Forwards: 70
Content-Length: 0
User-Agent: SIP Proxy
Contact: <sip:2552 at 10.20.20.248:5060>;expires=0



2018/06/18 12:48:50.199791 10.20.20.248:5060 -> 10.10.10.138:46583
SIP/2.0 200 OK
Via: SIP/2.0/UDP
172.16.1.141:46583;received=10.10.10.138;branch=z9hG4bK-urxrbzyhmha1;rport=46583
From: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=y72nni51cm
To: "Aleksei Vasilev" <sip:2552 at siptest.test.com>;tag=as21b74178
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
CSeq: 2924 REGISTER
Server: asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 0
Date: Mon, 18 Jun 2018 12:48:50 GMT
Content-Length: 0


Of course Asterisk replies with error on this packet:

2018/06/18 12:48:50.200192 10.30.30.49:5060 -> 10.20.20.248:5060
SIP/2.0 500 Server error
Via: SIP/2.0/UDP
10.20.20.248:5060;branch=z9hG4bK0cb5.908b8e8.0;received=10.20.20.248;rport=5060
From: <sip:2552 at siptest.test.com>;tag=82eca4f0c52e76c98f63fc89b4b49706-9215
To: sip:2552 at siptest.test.com;tag=as21b74178
Call-ID: 313532383539333131363438303132-6ep4fjxmjp16
CSeq: 2923 REGISTER
Server: asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0





--
Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html



More information about the Users mailing list