Creating New Phones API

I'm having a little trouble understanding part of the phone construction that is done with /api/v2/telephony/providers/edges/phones. What exactly are the lines that are required. I originally though I could just use the line ID attached to the sites but I see it can take a list of lines. I would like to understand more about them before I blindly start using things that will come back to haunt me.

Hi @ObsTech

A new line is required by default when you create a phone. You can add a list of lines to the request if you want to add more lines.

This is from a guide on the Developer Center that covers the telephony APIs that is generally helpful in this area

According to the API I have to include a list of line's or a single item list of a line in order to create the phone in the first place, this is the part that confuses me. If it is created by default what exactly is the API asking me to specify?

HI @ObsTech
I wasn't very clear in my original response.
I mean to say that one line is required for the phone, but you have the option to add multiple.
A line connects edge devices. You can construct the line from lineBaseSettings and the corresponding template as detailed in the guide I linked. The guide shows the relevant API resources to get the base settings, which you can modify if needed and then add it to the "lines" section of the request, and then add the station info derived from the template to the "properties" map.

Particularly look at the the request at the bottom of the guide for a working example of how the line info is constructed.

Ok I think I understand. One more question and I should be good. There is a list of lines in the Phone Base Setting Objects when I retrieve it using an API call. So far the list is always just one entry which seems to be the Line Base Setting without the _1 attached to the name. Is it safe to assume this first entry in the Phone Base Settings Lines array will always be that Line Base Setting?

It generally would not be a good idea to assume the ordering of the array. Would be better to use another way to select that base setting, like using name query param

That makes sense, so is there a connection between Phone Base Settings and Line Base Settings that I could use to connect them? I notice when you create a phone in the Admin console it only asks for Base Settings and gives the names of Phone base settings but it must connect one of the line settings as well? Will the line settings naming convention ever change? It seems to always be the Phone Base Setting name plus _1 at the end. Apologies if I seem unintuitive with this, I don't have a background in telephony.

The two are similar, but phone base settings contain more configuration and actually contains a list of line base settings within its schema. So you might say line base settings are a specialized type of phone base settings.

As far as naming conventions, based on those found in my organization there is no guarantee of the "_1" suffix. That may be the case in your org, but at least there is no cross-organizational rule for this.

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