[Home]

Summary:ASTERISK-26075: Impossible to define two TCP or TLS transports with pjsip
Reporter:Ludovic Gasc (Eyepea) (gmludo)Labels:
Date Opened:2016-05-30 17:47:32Date Closed:2016-06-02 20:20:36
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:13.8.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian 8 64bitsAttachments:
Description:Hi,

with pjsip, if I configure two UDP transports, it works pretty well:

[udp_5060]
type=transport
protocol=udp
bind=0.0.0.0:5060

[udp_7000]
type=transport
protocol=udp
bind=0.0.0.0:7000

But, if I configure two TCP or TLS, I've this error message:
[May 31 00:31:59] ERROR[20488]: res_pjsip/config_transport.c:279 transport_apply: Transport 'tcp_7000' could not be started: Object with the same type exists (PJSIP_ETYPEEXISTS)
[May 31 00:31:59] ERROR[20488]: res_sorcery_config.c:318 sorcery_config_internal_load: Could not create an object of type 'transport' with id 'tcp_7000' from configuration file 'pjsip.conf'

My configuration:
[tcp_5060]
type=transport
protocol=tcp
bind=0.0.0.0:5060

[tcp_7000]
type=transport
protocol=tcp
bind=0.0.0.0:7000

Based of my understanding of documentation, this scenario should be possible, especially because it works with UDP:
https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships#PJSIPConfigurationSectionsandRelationships-TRANSPORT

I'm wrong or it's a bug ?

Thanks for your answer.

Have a nice day.
Comments:By: Asterisk Team (asteriskteam) 2016-05-30 17:47:33.039-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Joshua C. Colp (jcolp) 2016-05-30 17:55:29.409-0500

This is a limitation within PJSIP itself. It doesn't allow two TCP or TLS of the same type (1 IPv4 and 1 IPv6 can exist).

By: Ludovic Gasc (Eyepea) (gmludo) 2016-05-30 18:03:28.149-0500

Thanks for this quick answer.

It seems somebody has proposed a patch to do that in pjsip:
https://gerrit-ring.savoirfairelinux.com/#/c/3049/1/contrib/src/pjproject/multiple_listeners.patch
http://pjsip.pjsip.narkive.com/t6y9HqFV/multiple-transport-listeners-patch

Do you think that this patch is enough mature/maintainable to be integrated in your set of patchs for pjsip ?

By: Joshua C. Colp (jcolp) 2016-05-30 18:07:56.780-0500

I can't look at those because of licensing I'm afraid so I can't comment on that.

By: Ludovic Gasc (Eyepea) (gmludo) 2016-05-31 01:53:59.089-0500

Hi Joshua,

Not sure to understand: It means that the creator of this patch must sign Asterisk contributor agreement to be readable for you, or this patch have a license issue with pjsip itself ?

By: Joshua C. Colp (jcolp) 2016-05-31 05:08:47.801-0500

It would need a license with us in order to be included in our bundle of patches.

By: Ludovic Gasc (Eyepea) (gmludo) 2016-05-31 10:03:40.306-0500

Ok, I understand now.
First, we'll test this patch in our lab to see if it helps or not.
If we have interesting results, we'll try contact pjsip and/or savoirfairelinux.

By: Rusty Newton (rnewton) 2016-06-02 20:20:37.045-0500

Closing this out since it isn't a bug with Asterisk and seems to be a feature request for the PJSIP library.

If this ends up requiring additions or changes to Asterisk in the future, please open a new issue with patches (submitted with a license agreement for the Asterisk project). Thanks!