Attaching Wazo lines with Pjsip endpoints via API


I’m currently having issues with setting up a Tenant on Wazo via the API endpoints,
When we create the tenant along with its internal context(sip extension defined in it),
and then the users accounts attached with lines. We discovered the API wasnt creating the
corresponding asterisk pjsip endpoints for the lines attached to the user account under the
new tenant.

But when we try to create them manually on Wazo, everything works fine. Please can anyone point
me towards the API endpoints responsible for generating the corresponding pjsip endpoint
for users on wazo.

Thanks in advance.

Hi @Kelvin

In order to create a user via APIs properly you must make sure you follow the following steps:

Note: Device and Voicemail steps are optionals, the rest is a must.

  1. We create the tenant using auth/0.1/tenant with the payload
    payload = {
    “name”: “name”,
    “phone”: XXXXXXXXXXXX

  2. We create the internal context with the below payload
    payload = {
    “name”: “name”,
    “label”: “label”,
    “type”: “internal”,
    “tenant_uuid”: “UUID”,
    “user_ranges”: [{“end”: “139”, “start”: “100”}],
    “group_ranges”: [{“end”: “149”, “start”: “140”}],

The created context appears on the wazo-ui, but extensions and lines created for subsequent users are unusable because wazo does not create the necessary asterisk pjsip endpoint. This happens if we create the user + extension + line through the API or from the wazo-ui. What could possibly be wrong?

Wazo-Tenant uuid is a HEADER PARAMETERS.

Like I said before, follow these steps mentioned below and your SIP endpoint should work just fine.