Changing a line label via the API

Community based support for the Digium Phone Application Programming Interface (API).

Moderators: jwitt, sruffell, malcolmd, Moderator

Changing a line label via the API

Postby jimmyraineri » Mon Dec 22, 2014 12:40 pm

Hi,

I've looked (somewhat quickly) through the documentation - and don't see it - but wanted to make certain.

Is there a way to change the label of a line button from an application via the API? (or any other means)?

Thanks!
jimmyraineri
Newsterisk
 
Posts: 7
Joined: Mon Dec 22, 2014 12:37 pm

Re: Changing a line label via the API

Postby malcolmd » Mon Dec 22, 2014 2:24 pm

Negative, that sort of capability isn't exposed. It'd be a tricky juggling in order to decide what to display; the control over the line and rapid dial keys at idle isn't delegated out by the phone application.

Why are you wanting to do this?
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Changing a line label via the API

Postby jimmyraineri » Mon Dec 22, 2014 3:01 pm

I knew you'd ask why. :D

Unfortunately, it's about creating some compatibility with old POTS callerid tech. I have an application running on a PC that is being fed callerid information from a callerid box. The PC sees, for example, callerid information for lines 1 through 8.

I'm simulating this in Asterisk, assigning calls to "lines" and sending the callerid info (simulating the callerid box) to the PC app. The only piece missing is simulating that on the phone - i.e. so the when the user picks up a ringing D40, they can match the call to line 1-8 on the PC screen.

My thought was to change the line label to "LINE1" or "LINE2", etc., for the duration of that call.

However, I could just as easily have my app display "LINE1" on the screen. Having it up there on the line label seemed more natural.

One other semi-related question. Is there a way to change the font size of the callerid information that is automatically displayed by the D40?

Thanks! I appreciate the quick reply and your help.
jimmyraineri
Newsterisk
 
Posts: 7
Joined: Mon Dec 22, 2014 12:37 pm

Re: Changing a line label via the API

Postby malcolmd » Mon Dec 22, 2014 3:25 pm

jimmyraineri wrote:However, I could just as easily have my app display "LINE1" on the screen. Having it up there on the line label seemed more natural.


Yeah, that's just a tough interplay though. Who owns the line? The phone app? Another app? What happens when someone wants to write to it? What happens when someone wants to prevent a write to it? That's fast way to yuck. :(

jimmyraineri wrote:One other semi-related question. Is there a way to change the font size of the callerid information that is automatically displayed by the D40?


There's a default_fontsize option, but that applies to everything, and you don't get too much mileage out of it since you can't go bigger without quickly running over label space.
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Changing a line label via the API

Postby jimmyraineri » Mon Dec 22, 2014 3:49 pm

Where might I find this default font size?
jimmyraineri
Newsterisk
 
Posts: 7
Joined: Mon Dec 22, 2014 12:37 pm

Re: Changing a line label via the API

Postby malcolmd » Mon Dec 22, 2014 3:51 pm

Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Changing a line label via the API

Postby jimmyraineri » Mon Dec 22, 2014 4:10 pm

Aha. Thank you.

Another reason not to run my stuff on an ARM box. :D
jimmyraineri
Newsterisk
 
Posts: 7
Joined: Mon Dec 22, 2014 12:37 pm

Re: Changing a line label via the API

Postby jimmyraineri » Tue Dec 23, 2014 3:26 pm

One other semi-related question.

Is there a way to pull an XML config file from a phone to use as a base for making changes?
jimmyraineri
Newsterisk
 
Posts: 7
Joined: Mon Dec 22, 2014 12:37 pm

Re: Changing a line label via the API

Postby malcolmd » Tue Dec 23, 2014 4:20 pm

Howdy,

Negative. The complete definition of configurable items for a given firmware is found:
https://wiki.asterisk.org/wiki/pages/vi ... d=28314983

You can copy that out and use it as an example to work with.
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US


Return to Digium Phone API

Who is online

Users browsing this forum: No registered users and 2 guests

cron