Persistent TCP Conection Over Registration Duration

Home » Asterisk Users » Persistent TCP Conection Over Registration Duration
Asterisk Users No Comments

Hi,

Every time pjsip reregisters it establishes a new tcp connection and then after 10 seconds closes the old one. This results in a temporal presence of two contacts that leads to a forking in a 10 seconds registration overlap span. Is it a wanted behavior?

Is it possible to configure TCP connection to persist over the registration duration avoiding the disconnection and reconnection of TCP connection with every reregistration?

REGISTER sip:test.com SIP/2.0

Via: SIP/2.0/TCP 4.3.2.1:38778;rport;branch=z9hG4bKPjee70b46c-259f-4fff-a46d-3c36338d35b7;alias

Call-ID: 966f92dc-285e-480a-bdd5-163b5dc2c1af

CSeq: 48489 REGISTER

Contact:

Expires: 240

SIP/2.0 200 OK

Via: SIP/2.0/TCP 4.3.2.1:38778;rport=38778;branch=z9hG4bKPjee70b46c-259f-4fff-a46d-3c36338d35b7;alias

Call-ID: 966f92dc-285e-480a-bdd5-163b5dc2c1af

Contact: ;expires=10

Contact: ;expires=240

CSeq: 48489 REGISTER

REGISTER sip:test.com SIP/2.0

Via: SIP/2.0/TCP 4.3.2.1:42699;rport;branch=z9hG4bKPj002d0a40-0fea-4a40-91bd-411d15a2679f;alias

Call-ID: 966f92dc-285e-480a-bdd5-163b5dc2c1af

CSeq: 48491 REGISTER

Contact:

Expires: 240

SIP/2.0 200 OK

Via: SIP/2.0/TCP 4.3.2.1:42699;rport=42699;branch=z9hG4bKPj002d0a40-0fea-4a40-91bd-411d15a2679f;alias

Call-ID: 966f92dc-285e-480a-bdd5-163b5dc2c1af

Contact: ;expires=10

Contact: ;expires=240

CSeq: 48491 REGISTER

Thanks,

xaled