Two REGISTER requests

Hello Everyone,

We are currently encountering an issue where we are sending two REGISTER requests to our SIP provider.

This is the TCPDUMP generated during the registration.

This is only happening at the initial registration (after a reload or restart)

14:40:23.612651 IP 10.xx.yy.zz.sip > 84.xx.yy.zz.sip: SIP: REGISTER sip:my.sipprovider.com SIP/2.0
14:40:23.620844 IP 84.xx.yy.zz.sip > 10.xx.yy.zz.sip: SIP: SIP/2.0 401 Unauthorized
14:40:23.621381 IP 10.xx.yy.zz.sip > 84.xx.yy.zz.sip: SIP: REGISTER sip:my.sipprovider.com SIP/2.0
14:40:23.638093 IP 84.xx.yy.zz.sip > 10.xx.yy.zz.sip: SIP: SIP/2.0 200 OK
14:40:25.742963 IP 10.xx.yy.zz.sip > 84.xx.yy.zz.sip: SIP: REGISTER sip:my.sipprovider.com SIP/2.0
14:40:25.750922 IP 84.xx.yy.zz.sip > 10.xx.yy.zz.sip: SIP: SIP/2.0 401 Unauthorized
14:40:25.751424 IP 10.xx.yy.zz.sip > 84.xx.yy.zz.sip: SIP: REGISTER sip:my.sipprovider.com SIP/2.0
14:40:25.770711 IP 84.xx.yy.zz.sip > 10.xx.yy.zz.sip: SIP: SIP/2.0 200 OK

and after the expiration time, the registration request is sent correctly (only once).

15:28:35.680433 IP 10.xx.yy.zz.sip > 84.xx.yy.zz.sip: SIP: REGISTER sip:my.sipprovider.com SIP/2.0
15:28:35.689239 IP 84.xx.yy.zz.sip > 10.xx.yy.zz.sip: SIP: SIP/2.0 401 Unauthorized
15:28:35.689738 IP 10.xx.yy.zz.sip > 84.xx.yy.zz.sip: SIP: REGISTER sip:my.sipprovider.com SIP/2.0
15:28:35.708276 IP 84.xx.yy.zz.sip > 10.xx.yy.zz.sip: SIP: SIP/2.0 200 OK

Below, please find the current pjsip.conf for the trunk.

[transport-provider]
type=transport
protocol=udp
bind=10.xx.yy.zz:5060
local_net=10.xx.yy.zz/30
external_media_address=10.xx.yy.zz
external_signaling_address=10.xx.yy.zz

[12345678910]
type=endpoint
transport=transport-provider
context=incoming
disallow=all
allow=alaw
force_rport=yes
direct_media=no
from_domain=my.sipprovider.com
dtmf_mode=inband
timers_sess_expires=1800
timers_min_se=90
ice_support=no
send_diversion=no
aors=12345678910
from_user=12345678910
contact_user=12345678910
inband_progress=no
outbound_auth=12345678910
rtp_symmetric=yes
force_rport=yes

[12345678910]
type=aor
contact=sip:12345678910@my.sipprovider.com
default_expiration=3600

[12345678910]
type=auth
auth_type=userpass
password=4789as34q
username=12345678910
realm=my.sipprovider.com

[12345678910]
type=registration
transport=transport-provider
line=yes
outbound_auth=12345678910
endpoint=12345678910
server_uri=sip:my.sipprovider.com
client_uri=sip:12345678910@my.sipprovider.com
contact_user=12345678910
retry_interval=60
forbidden_retry_interval=600
fatal_retry_interval=600
expiration=3600

Anyone know what could be causing this, please?

Thanks

You’d need to provide the actual contents of the SIP messages.

Hi Jcolp,

Thanks for your reply; kindly find it below.

<--- Transmitting SIP request (483 bytes) to UDP:84.xx.yy.zz:5060 --->
REGISTER sip:my.sipprovider.com SIP/2.0
Via: SIP/2.0/UDP 10.xx.yy.zz:5060;rport;branch=z9hG4bKPje7559a1e-ec1d-4a62-b59c-b0779fd937fb
From: <sip:12345678910@my.sipprovider.com>;tag=78147d13-e97d-4cd2-8dec-7e53a02ffed9
To: <sip:12345678910@my.sipprovider.com>
Call-ID: 175530d3-cef7-414e-99e7-42bac28473ad
CSeq: 51043 REGISTER
Contact: <sip:12345678910@10.xx.yy.zz:5060;line=lmfypad>
Expires: 0
Max-Forwards: 70
User-Agent: Asterisk PBX 18.17.1
Content-Length:  0


<--- Received SIP response (544 bytes) from UDP:84.xx.yy.zz:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.xx.yy.zz:5060;received=10.xx.yy.zz;rport=5060;branch=z9hG4bKPje7559a1e-ec1d-4a62-b59c-b0779fd937fb
From: <sip:12345678910@my.sipprovider.com>;tag=78147d13-e97d-4cd2-8dec-7e53a02ffed9
To: <sip:12345678910@my.sipprovider.com>;tag=065d12c875fcedcebd8a2f29eb8c906b.d8e10000
Call-ID: 175530d3-cef7-414e-99e7-42bac28473ad
CSeq: 51043 REGISTER
WWW-Authenticate: Digest realm="my.sipprovider.com", nonce="ZF5eKGReXPwydWyRHe3BVIiII3+F6Sku"
Server: Sipwise NGCP Proxy 9.X
Content-Length: 0


<--- Transmitting SIP request (678 bytes) to UDP:84.xx.yy.zz:5060 --->
REGISTER sip:my.sipprovider.com SIP/2.0
Via: SIP/2.0/UDP 10.xx.yy.zz:5060;rport;branch=z9hG4bKPj0fb87fd6-7560-41bd-93d2-d0e3d82ee695
From: <sip:12345678910@my.sipprovider.com>;tag=78147d13-e97d-4cd2-8dec-7e53a02ffed9
To: <sip:12345678910@my.sipprovider.com>
Call-ID: 175530d3-cef7-414e-99e7-42bac28473ad
CSeq: 51044 REGISTER
Contact: <sip:12345678910@10.xx.yy.zz:5060;line=lmfypad>
Expires: 0
Max-Forwards: 70
User-Agent: Asterisk PBX 18.17.1
Authorization: Digest username="12345678910", realm="my.sipprovider.com", nonce="ZF5eKGReXPwydWyRHe3BVIiII3+F6Sku", uri="sip:my.sipprovider.com", response="51394f56301402dda75e4d19d9d9c44a"
Content-Length:  0


<--- Received SIP response (437 bytes) from UDP:84.xx.yy.zz:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.xx.yy.zz:5060;received=10.xx.yy.zz;rport=5060;branch=z9hG4bKPj0fb87fd6-7560-41bd-93d2-d0e3d82ee695
From: <sip:12345678910@my.sipprovider.com>;tag=78147d13-e97d-4cd2-8dec-7e53a02ffed9
To: <sip:12345678910@my.sipprovider.com>;tag=065d12c875fcedcebd8a2f29eb8c906b.d8e10000
Call-ID: 175530d3-cef7-414e-99e7-42bac28473ad
CSeq: 51044 REGISTER
Server: Sipwise NGCP Proxy 9.X
Content-Length: 0


<--- Transmitting SIP request (597 bytes) to UDP:84.xx.yy.zz:5060 --->
REGISTER sip:my.sipprovider.com SIP/2.0
Via: SIP/2.0/UDP 10.xx.yy.zz:5060;rport;branch=z9hG4bKPj679cc7f2-0641-4a3a-8288-ff119a8dbb5e
From: <sip:12345678910@my.sipprovider.com>;tag=a585a4cf-2028-46fc-bec2-b01027f3a14b
To: <sip:12345678910@my.sipprovider.com>
Call-ID: 175530d3-cef7-414e-99e7-42bac28473ad
CSeq: 51045 REGISTER
Contact: <sip:12345678910@10.xx.yy.zz:5060;line=lmfypad>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 18.17.1
Content-Length:  0


<--- Received SIP response (544 bytes) from UDP:84.xx.yy.zz:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.xx.yy.zz:5060;received=10.xx.yy.zz;rport=5060;branch=z9hG4bKPj679cc7f2-0641-4a3a-8288-ff119a8dbb5e
From: <sip:12345678910@my.sipprovider.com>;tag=a585a4cf-2028-46fc-bec2-b01027f3a14b
To: <sip:12345678910@my.sipprovider.com>;tag=04cf37a5b7f1e0763558ad2b8698bef4.d8e10000
Call-ID: 175530d3-cef7-414e-99e7-42bac28473ad
CSeq: 51045 REGISTER
WWW-Authenticate: Digest realm="my.sipprovider.com", nonce="ZF5eL2ReXQOBV+kxDJN40wW05J6/XS4R"
Server: Sipwise NGCP Proxy 9.X
Content-Length: 0


<--- Transmitting SIP request (792 bytes) to UDP:84.xx.yy.zz:5060 --->
REGISTER sip:my.sipprovider.com SIP/2.0
Via: SIP/2.0/UDP 10.xx.yy.zz:5060;rport;branch=z9hG4bKPj65a8e3e2-8f2a-4b49-8c8c-78534804ea05
From: <sip:12345678910@my.sipprovider.com>;tag=a585a4cf-2028-46fc-bec2-b01027f3a14b
To: <sip:12345678910@my.sipprovider.com>
Call-ID: 175530d3-cef7-414e-99e7-42bac28473ad
CSeq: 51046 REGISTER
Contact: <sip:12345678910@10.xx.yy.zz:5060;line=lmfypad>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 18.17.1
Authorization: Digest username="12345678910", realm="my.sipprovider.com", nonce="ZF5eL2ReXQOBV+kxDJN40wW05J6/XS4R", uri="sip:my.sipprovider.com", response="815dbd5d49d3a49f83b19afc41ffcbe3"
Content-Length:  0


<--- Received SIP response (542 bytes) from UDP:84.xx.yy.zz:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.xx.yy.zz:5060;received=10.xx.yy.zz;rport=5060;branch=z9hG4bKPj65a8e3e2-8f2a-4b49-8c8c-78534804ea05
From: <sip:12345678910@my.sipprovider.com>;tag=a585a4cf-2028-46fc-bec2-b01027f3a14b
To: <sip:12345678910@my.sipprovider.com>;tag=04cf37a5b7f1e0763558ad2b8698bef4.d8e10000
Call-ID: 175530d3-cef7-414e-99e7-42bac28473ad
CSeq: 51046 REGISTER
Contact: <sip:12345678910@10.xx.yy.zz:5060;line=lmfypad>;expires=2822;received="sip:10.xx.yy.zz:5060"
Server: Sipwise NGCP Proxy 9.X
Content-Length: 0

Thanks

The initial REGISTER request is to unregister, the second one is to register. I don’t know why in your particular setup it is doing that.

Hi Jcolp,

Understood, thanks for the confirmation. For some reason, the SIP provider is not liking this and asked us to have a look, as they told us that they are seeing them as both normal registrations.

Thanks for your help!

I never understand why people obfuscate provider names; they are potentially useful information. (mysipprovider.com exists, but sipprovider.com doesn’t seem to)

Either your provider has a funny network, or you have failed to configure public addresses a or local networks correctly, as I assume my.sipprovider.com maps to a public address, whereas 10/8 is a private network.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.