[asterisk-dev] Asterisk / pjsip: Bug or feature? TCP/TLS connection is endless after unregistering the last trunk to the destination

Michael Maier m1278468 at mailbox.org
Mon Jan 18 15:20:39 CST 2021



On 11.01.21 at 17:46 Michael Maier wrote:
> 
> On 11.01.21 at 15:27 Joshua C. Colp wrote:
>> On Mon, Jan 11, 2021 at 10:21 AM Michael Maier <m1278468 at mailbox.org> wrote:
>>> It is possible to tcpkill the first connection without being restarted:
>>>
>>> # tcpkill -i eth0 tcp port 54761
>>> [2021-01-11 14:42:15] DEBUG[8569] pjproject:        tlsc0x7fa1d82efae8 TLS
>>> connection closed
>>> [2021-01-11 14:42:15] DEBUG[8569] res_pjsip/pjsip_transport_events.c:
>>> Reliable transport 'tlsc0x7fa1d82efae8' state:DISCONNECTED
>>> [2021-01-11 14:42:15] DEBUG[8569] pjproject:           sip_transport.c
>>> Transport tlsc0x7fa1d82efae8 shutting down, force=0
>>> [2021-01-11 14:42:15] DEBUG[8569] res_pjsip/pjsip_transport_events.c:
>>> Reliable transport 'tlsc0x7fa1d82efae8' state:SHUTDOWN
>>> [2021-01-11 14:42:15] DEBUG[8569] res_pjsip/pjsip_transport_events.c:
>>> Reliable transport 'tlsc0x7fa1d82efae8' state:DESTROY
>>> [2021-01-11 14:42:15] DEBUG[8569] pjproject:        tlsc0x7fa1d82efae8 TLS
>>> transport destroyed with reason 120104: Connection reset by peer
>>>
>>> If you're doing the same against Telekom, they drop the first connect
>>> after 10 s (therefore no tcpkill is necessary)
>>>
>>> Any idea why there are 2 connections started though only one is necessary?
>>> This is really odd.
>>>
>>
>> Nope. The code itself wasn't explicitly designed or written for this usage,
>> so there may be issues with it.
> 
> Sounds like a bug to me. Anyway, I found another solution to add n standard transports listening all to no port (tested with Asterisk 18.0.1):

Some further investigation showed, that the first connection was killed by the provider if the Register fails. The ISP doesn't allow connections w/o a valid Register. They
are closed after 10s. This happens exactly just as with the old transports.


Thanks
Michael



More information about the asterisk-dev mailing list