Page 1 of 1

Changing a line label via the API

PostPosted: Mon Dec 22, 2014 12:40 pm
by jimmyraineri
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!

Re: Changing a line label via the API

PostPosted: Mon Dec 22, 2014 2:24 pm
by malcolmd
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?

Re: Changing a line label via the API

PostPosted: Mon Dec 22, 2014 3:01 pm
by jimmyraineri
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.

Re: Changing a line label via the API

PostPosted: Mon Dec 22, 2014 3:25 pm
by malcolmd
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.

Re: Changing a line label via the API

PostPosted: Mon Dec 22, 2014 3:49 pm
by jimmyraineri
Where might I find this default font size?

Re: Changing a line label via the API

PostPosted: Mon Dec 22, 2014 3:51 pm
by malcolmd

Re: Changing a line label via the API

PostPosted: Mon Dec 22, 2014 4:10 pm
by jimmyraineri
Aha. Thank you.

Another reason not to run my stuff on an ARM box. :D

Re: Changing a line label via the API

PostPosted: Tue Dec 23, 2014 3:26 pm
by jimmyraineri
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?

Re: Changing a line label via the API

PostPosted: Tue Dec 23, 2014 4:20 pm
by malcolmd
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.