Pjsip double contacts

Hello,

Since upgrading to 13.24.1 from 13.23.1, pjsip show contacts shows two entries for each contact. For example:

pbx*CLI> pjsip show contacts

  Contact:  <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

  Contact:  10_q2yJKX3BI3/sip:10_q2yJKX3BI3@192.168.71.10: daf77599aa Avail        14.357
  Contact:  10_q2yJKX3BI3/sip:10_q2yJKX3BI3@192.168.71.10: daf77599aa Avail        14.357
  Contact:  12_rxArn31Sum/sip:12_rxArn31Sum@192.168.71.12; d90b9ee85a Avail         6.004
  Contact:  12_rxArn31Sum/sip:12_rxArn31Sum@192.168.71.12; d90b9ee85a Avail         6.004
  Contact:  13_4IGuD31P4P/sip:13_4IGuD31P4P@192.168.71.12; 7a2d52fc8c Avail         6.508
  Contact:  13_4IGuD31P4P/sip:13_4IGuD31P4P@192.168.71.12; 7a2d52fc8c Avail         6.508
  Contact:  14_l000Yl8Q07/sip:14_l000Yl8Q07@192.168.71.12; 65fb878b9a Avail         6.322
  Contact:  14_l000Yl8Q07/sip:14_l000Yl8Q07@192.168.71.12; 65fb878b9a Avail         6.322
  Contact:  15_n1n4y82M4z/sip:15_n1n4y82M4z@192.168.71.12; 140f9d6590 Avail         6.183
  Contact:  15_n1n4y82M4z/sip:15_n1n4y82M4z@192.168.71.12; 140f9d6590 Avail         6.183
  Contact:  16_G7bn7Yg7GW/sip:16_G7bn7Yg7GW@192.168.71.16: 46119775c5 Avail        10.058
  Contact:  16_G7bn7Yg7GW/sip:16_G7bn7Yg7GW@192.168.71.16: 46119775c5 Avail        10.058
  Contact:  17_S7227G495c/sip:17_S7227G495c@192.168.71.17: 630f5d22c4 Avail         7.858
  Contact:  17_S7227G495c/sip:17_S7227G495c@192.168.71.17: 630f5d22c4 Avail         7.858
  Contact:  18_jb3gNT42Xx/sip:18_jb3gNT42Xx@192.168.71.18: cec703d7af Avail         7.629
  Contact:  18_jb3gNT42Xx/sip:18_jb3gNT42Xx@192.168.71.18: cec703d7af Avail         7.629
  Contact:  19_qsZHW2107u/sip:19_qsZHW2107u@192.168.71.19: 18595d6f1a Avail         5.922
  Contact:  19_qsZHW2107u/sip:19_qsZHW2107u@192.168.71.19: 18595d6f1a Avail         5.922
  ...
  Contact:  digium/sip:sip.digiumcloud.net:5060            90e604f137 Avail        32.674

Objects found: 35

However, when examining a single contact, there is only one:

pbx*CLI> pjsip show contact 10_q2yJKX3BI3/sip:10_q2yJKX3BI3@192.168.71.10:5060

  Contact:  <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

  Contact:  10_q2yJKX3BI3/sip:10_q2yJKX3BI3@192.168.71.10: daf77599aa Avail         9.559

Interestingly, the only exception is the last entry, to sip.digiumcloud.net, for which there is only one contact. The only difference I can think of is that I’m registering to it:

pbx*CLI> pjsip show registrations

 <Registration/ServerURI..............................>  <Auth..........>  <Status.......>
==========================================================================================

 digium/sip:sip.digiumcloud.net:5060                     digium            Registered

Objects found: 1

I have tried deleting the database entries with database deltree registrar/contact, but when the new entries are added there are still two of each.

None of this seems to affect calls; all seems to working as before. Is this expected behavior?

Regards,
Ian

Update:

I have just updated another Asterisk installation, and it’s showing the same behavior:

cal*CLI> pjsip show contacts

  Contact:  <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

  Contact:  40E/sip:40E@10.47.55.40:10204                  9596b71d55 Avail         7.748
  Contact:  40E/sip:40E@10.47.55.40:10204                  9596b71d55 Avail         7.748
  Contact:  41E/sip:41E@10.47.55.41:10204                  338bb8b7bc Avail        11.595
  Contact:  41E/sip:41E@10.47.55.41:10204                  338bb8b7bc Avail        11.595
  Contact:  ATT40%4n0D4AtPiR/sip:ATT40%4n0D4AtPiR@10.47.55 1ea8516086 Avail        15.015
  Contact:  ATT40%4n0D4AtPiR/sip:ATT40%4n0D4AtPiR@10.47.55 1ea8516086 Avail        15.015
  Contact:  ATT41%3gNkIk8PXp/sip:ATT41%3gNkIk8PXp@10.47.55 c23cb4511c Avail         6.057
  Contact:  ATT41%3gNkIk8PXp/sip:ATT41%3gNkIk8PXp@10.47.55 c23cb4511c Avail         6.057
  Contact:  LON40%eUycVd4y1s/sip:LON40%eUycVd4y1s@10.47.55 e25593ef2e Avail        11.127
  Contact:  LON40%eUycVd4y1s/sip:LON40%eUycVd4y1s@10.47.55 e25593ef2e Avail        11.127
  Contact:  LON41%eUJcV54y1s/sip:LON41%eUJcV54y1s@10.47.55 aa7796ddfb Avail        12.433
  Contact:  LON41%eUJcV54y1s/sip:LON41%eUJcV54y1s@10.47.55 aa7796ddfb Avail        12.433

Objects found: 12

cal*CLI> core show version
Asterisk 13.24.1 built by root @ cal on a x86_64 running Linux on 2019-01-01 19:07:27 UTC
cal*CLI>

So it’s new in 13.24.1.

Happy New Year!
Ian

This is not expected behavior, but is likely just something in the way the data is presented. Please file an issue on the issue tracker[1].

[1] https://issues.asterisk.org/jira

Will do - thanks!

Regards

We are mysteriously seeing the same exact issue. Was this ever figured out?

There is an open issue[1]. It’s only a cosmetic CLI issue, so noone has taken on fixing it as of yet.

[1] https://issues.asterisk.org/jira/browse/ASTERISK-28228

THANK YOU sir. I looked thru the issues and could not find it earlier.

Hi guys,

In the CLI I see the same problem on Asterisk version 16.2.1 installed as a debian package on the new Linux Debian 10 Buster. Perhaps it has been fixed on the Asterisk source code but not on the .deb binary package.

CLI> pjsip show contacts

Contact: 203/sip:203@192.168.0.11:62466;transport=TLS a05e8594ad Avail 36.284
Contact: 203/sip:203@192.168.0.11:62466;transport=TLS a05e8594ad Avail 36.284
Contact: 221/sip:221@192.168.0.83:62477;transport=TLS 35a8b582c3 Avail 35.879
Contact: 221/sip:221@192.168.0.83:62477;transport=TLS 35a8b582c3 Avail 35.879

Objects found: 4

I don’t believe anyone as of yet has touched the bug or fixed it.

Thanks for the quick answer. I don’t know about the most recent source code of Asterisk version 16.x.y but you’re right that the Asterisk 16.2.1 package on Debian 10 hasn’t touched it yet.

The linked issue is still open. When it is resolved it will be automatically closed and tagged with the fixed versions.

Hi guys,

Are there any news? A few days ago there was an update of the Asterisk 16.2.1 binary package on Debian 10 Buster but I see that the problem is still there. This update has not affected this annoying cosmetic problem. I assume the problem has not been solved even on the source version.

Thanks in advance

The problem is fixed in the latest release candidates across branches. It will therefore be fixed in the 16.6.0 release. The full version list is on the previously linked issue under “Target Release Version/s”.

Typically Debian, and other Linux distributions fix on a version quite early and then back port security fixes to it. That means that, if you want the latest non-security bug fixes, you should build from source and not use the official packges.

Hi,
Thanks for the clarification, I am aware that since it is not a security bug it will not be solved quickly by the Debian team, and perhaps never. However, I reported the bug to the maintainer of the Debian Asterisk package.
I compile and install Asterisk from source as of version 1.4 when I used ISDN PRI and BRI cards but now I only use VoIP providers and virtual machines and the features of the official Debian package are enough.

Regards