[asterisk-users] First SIP-registering succeeds, second doesn't

Andre Gronwald andregronwald78 at gmail.com
Mon Feb 13 10:32:11 CST 2017


Hi all,
I have a strange issue, with a some kind complicate architecture...
A router of our internet provider is in front of another bintec rs353j 
router, at which my freepbx installation is located. However, NAT etc. 
seems to work fine.
BUT: Something is not working...:
When registering my sip-trunk towards my provider (3 different 
providers, all behave comparable), everything works at first. Calls are 
possible. But after some time, when the next REGISTER happens, the 
answer of my provider is sent towards the wrong port. My freePBX listens 
on 55060, where the first registration request are answered as they 
should. in the second registration request wrong ports are used. besides 
this, Header "Expires" is set to "0" and no "Allows" are listed...

Good case:
2017/02/10 20:40:59.236563 192.193.194.99:55060 -> 217.10.79.9:5060
REGISTER sip:sipgate.de:5060 SIP/2.0
Via: SIP/2.0/UDP 
99.88.77.66:55060;rport;branch=z9hG4bKPj7d031cfc-7602-4ac1-a264-bcf8d267500b
From: sip:custumoerIDe0 at sipgate.de;tag=b14c0d37-ef26-4dc5-b112-caf0c12a51f1
To: sip:custumoerIDe0 at sipgate.de
Call-ID: 6cf97519-e593-4a7e-bfe4-29141604665d
CSeq: 2367 REGISTER
Contact:
Expires: 300
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, 
UPDATE, PRACK, REGISTER, REFER, MESSAGE
Max-Forwards: 70
User-Agent: FPBX-13.0.190.12(13.13.1)
Content-Length: 0

2017/02/10 20:40:59.300873 217.10.79.9:5060 -> 192.193.194.99:55060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 
99.88.77.66:55060;rport;branch=z9hG4bKPj7d031cfc-7602-4ac1-a264-bcf8d267500b
From: sip:custumoerIDe0 at sipgate.de;tag=b14c0d37-ef26-4dc5-b112-caf0c12a51f1
To: sip:custumoerIDe0 at sipgate.de;tag=86e53dd608d1c001e0b8060625977563.11b6
Call-ID: 6cf97519-e593-4a7e-bfe4-29141604665d
CSeq: 2367 REGISTER
WWW-Authenticate: Digest realm="sipgate.de", 
nonce="WJ4Yd1ieF0tFmpj4o617dwQB2X5d9sKR"
Content-Length: 0

2017/02/10 20:40:59.301187 192.193.194.99:55060 -> 217.10.79.9:5060
REGISTER sip:sipgate.de:5060 SIP/2.0
Via: SIP/2.0/UDP 
99.88.77.66:55060;rport;branch=z9hG4bKPj5fb9a513-f49b-4823-8c63-6f0a38314d89
From: sip:custumoerIDe0 at sipgate.de;tag=b14c0d37-ef26-4dc5-b112-caf0c12a51f1
To: sip:custumoerIDe0 at sipgate.de
Call-ID: 6cf97519-e593-4a7e-bfe4-29141604665d
CSeq: 2368 REGISTER
Contact:
Expires: 300
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, 
UPDATE, PRACK, REGISTER, REFER, MESSAGE
Max-Forwards: 70
User-Agent: FPBX-13.0.190.12(13.13.1)
Authorization: Digest username="custumoerIDe0", realm="sipgate.de", 
nonce="WJ4Yd1ieF0tFmpj4o617dwQB2X5d9sKR", uri="sip:sipgate.de:5060", 
response="1067666a187dd3413fcecede9820e87c"
Content-Length: 0

2017/02/10 20:40:59.367186 217.10.79.9:5060 -> 192.193.194.99:55060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
99.88.77.66:55060;rport;branch=z9hG4bKPj5fb9a513-f49b-4823-8c63-6f0a38314d89
From: sip:custumoerIDe0 at sipgate.de;tag=b14c0d37-ef26-4dc5-b112-caf0c12a51f1
To: sip:custumoerIDe0 at sipgate.de;tag=86e53dd608d1c001e0b8060625977563.262c
Call-ID: 6cf97519-e593-4a7e-bfe4-29141604665d
CSeq: 2368 REGISTER
Contact: ;expires=300
Content-Length: 0

Bad case:
2017/02/10 20:43:08.324919 192.193.194.99:55060 -> 217.10.79.9:5060
REGISTER sip:sipgate.de:5060 SIP/2.0
Via: SIP/2.0/UDP 
99.88.77.66:55060;rport;branch=z9hG4bKPj9fb980fb-f4a3-465b-80bd-f25e668b723c
From: sip:custumoerIDe0 at sipgate.de;tag=a5226407-51ae-41c9-845e-4791428aa44f
To: sip:custumoerIDe0 at sipgate.de
Call-ID: 6cf97519-e593-4a7e-bfe4-29141604665d
CSeq: 2369 REGISTER
Contact:
Expires: 0
Max-Forwards: 70
User-Agent: FPBX-13.0.190.12(13.13.1)
Content-Length: 0

2017/02/10 20:43:08.387098 217.10.79.9:5060 -> 192.193.194.99:61276
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 
99.88.77.66:55060;rport;branch=z9hG4bKPj9fb980fb-f4a3-465b-80bd-f25e668b723c
From: sip:custumoerIDe0 at sipgate.de;tag=a5226407-51ae-41c9-845e-4791428aa44f
To: sip:custumoerIDe0 at sipgate.de;tag=86e53dd608d1c001e0b8060625977563.1e67
Call-ID: 6cf97519-e593-4a7e-bfe4-29141604665d
CSeq: 2369 REGISTER
WWW-Authenticate: Digest realm="sipgate.de", 
nonce="WJ4Y+FieF8wCvpDGuyqz40rHntgzb6xy"
Content-Length: 0

Any suggestions how to fix this? Or at least any idea what causes this?

regards,
andre




More information about the asterisk-users mailing list