# Blog: A Multi Tenant API for PJSIP

**URL:** <https://wazo-platform.discourse.group/t/blog-a-multi-tenant-api-for-pjsip/248>\
**Category:** Development: Platform\
**Created:** [March 3, 2020, 2:39pm UTC](https://wazo-platform.discourse.group/t/blog-a-multi-tenant-api-for-pjsip/248 "2020-03-03T14:39:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredl](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/fredl/32/88_2.png) [@fredl](https://wazo-platform.discourse.group/u/fredl)\
**Post date:** [March 3, 2020, 2:39pm UTC](https://wazo-platform.discourse.group/t/blog-a-multi-tenant-api-for-pjsip/248/1 "2020-03-03T14:39:26Z")

</div>

# Towards a Multi Tenant API for PJSIP

Asterisk has been switching from the legacy `chan_sip` channel driver to a new SIP stack based on the [PJSIP library](https://www.pjsip.org/). We have been using the new SIP stack in Wazo Platform for over a year now. The way we configure the SIP channel driver as of Wazo Platform 20.03 still relies on the API that existed for `chan_sip` with a translation layer in wazo-confgend to convert the `chan_sip` configuration to a `chan_pjsip` one…

[https://wazo-platform.org/blog/pjsip-multi-tenant](https://wazo-platform.org/blog/pjsip-multi-tenant)

---

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [March 10, 2020, 8:30pm UTC](https://wazo-platform.discourse.group/t/blog-a-multi-tenant-api-for-pjsip/248/2 "2020-03-10T20:30:53Z")

</div>

Does this mean, when the system converts to an untranslated pjsip scenario, that we will have to update our SIP configurations to use only pjsip syntax?

The current setup has a mix of sip and pjsip and the translator handles this distinction, but will that not continue in the new system?

---

<div class="post-metadata">

**Author:** ![pcm](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@pcm](https://wazo-platform.discourse.group/u/pcm)\
**Post date:** [March 11, 2020, 12:08pm UTC](https://wazo-platform.discourse.group/t/blog-a-multi-tenant-api-for-pjsip/248/3 "2020-03-11T12:08:41Z")

</div>

Hi Ramblin,

the upgrade from the old to the new system will do it’s best to migrate your configuration to the new format.

We expect that all working configuration that work today will also work after the upgrade. Including the mixing of SIP and PJSIP fields.

If you used a PJSIP configuration option, it will be used.  
If you used a chan\_sip configuration option, it will be translated.  
Anything unspecified will implicitly use the pjsip defaults.

This is the same logic as what is currently applied. If there are exceptions there will be an entry in the changelog describing which part of the configuration we failed to migrate.

After the migration chan\_sip configurations will NOT be translated to there pjsip equivalent anymore.

For example  
adding `nat=force_rport` will not work after the migration. you’ll have to use the PJSIP options which are `force_rport=yes`, `rewrite_contat=yes`

Any manual configuration files in /etc/asterisk/pjsip.d/ will NOT be modified.

---

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [March 21, 2020, 1:49pm UTC](https://wazo-platform.discourse.group/t/blog-a-multi-tenant-api-for-pjsip/248/4 "2020-03-21T13:49:23Z")

</div>

When will the Wazo switch to the new system ?

You mention 20.03 as still using the translation system. Does this mena some (near-term) version 20.05, …?) will no longer offer the translation capability or is this something that is still in the works and will not be introduced for a few iterations?

If, in the Web GUI, I have set Options in Lines or SIP\_General settings using chan\_sip, do I go in and change to chan\_pjsip or will the conversion do that for me and change the entries that show in the Options in Lines or SIP\_General entries in the Web GUI?
