Chan_sip and chan_pjsip at once

Hello @jcolp ,

if I have both sip and pjsip loaded and 2 conf files (one for each), which one will be executed and interpreted?

Should both conf files be consistent?

Thanks in advance

Both? You can’t have both listening on the same port though.

They should be the opposite of consistent.

Ok, then where should I explain which one I want to use?
Currently in my conf both are binded on the same port, but I did not see issues in log for that…

Ok, they can work together at the same time but should have specific and dedicated configuration, right?

You bind them to individual different ports, that is how you use both at once. It’s then up to you to configure things in the appropriate channel driver you want to use, and any other place that references it (such as dialplan).

1 Like

Ok, I see that I chan_sip is not loaded in modules.conf, then only PJSIP channels are used.

Only channels for loaded drivers with configured channels.

Your use of “PJSIP channels” tends to suggest that you think they are fundamentally different from chan_sip channels. Both implement SIP. chan_psip is generally a better implementation of SIP and is the only one that is supported and the only one that is available in the latest version of Asterisk.

In general, you should only load and configure chan_pjsip, but some people have complex old configurations, which they want to update a bit at a time. In very rare cases, some service providers may have difficult with working with chan_pjsip, but more often the provider can’t be bothered to try.

If you load both of them, they should not share resources, so they should use different local port numbers and you do not include the same remote endpoints.

1 Like

Ok thanks it is clearer for me now!

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