Setting username and Account_ID

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

Moderators: jwitt, sruffell, malcolmd, Moderator

Setting username and Account_ID

Postby markgc2014 » Sat Aug 02, 2014 9:48 pm

Hi there,

I have added some new Digium phones to my system, and when I was using DPMAMessageSend to communicate with my app running on these phones I was getting a failure

I looked with CURL at what was happening, and found something very strange - this probably is a simple Asterisk thing but I haven't a clue why this is like it is

So, my new extension is 250, I created it as 250 and selected it from the list of extensions when I started the phone, and it works as 250. but..
To send a command to it with DPMAMessageSend I have to send it to 'PhoneName: 302'

Below is a section of the output
app.init:this.config:{"url":{"url":"http://10.1.1.150/di
gium_phones/application_1.zip","md5":"9fd183d1ad6352dfae1f9d601cd36560"},"accoun
t":{"account_id":"250","username":"302","password":"","appserver":"dasp://10.1.1
.150/json","apiformat":"json"},"auto_start":{},"settings":{},


Why does the phone have a 'username' of 302 and how can I change it to match the extension number ?

Any assistance to point me in the right direction would be appreciated

My previous phone that I added was 242, and it has a username and account of 242, I dont know what I did different this time


NB: I realise I can use GetConfig to read the Digium Phone Conf etc to determine these IDs and that is how I will proceed, but I would still like to know if there is a way to create the ID so it matches the extension numbers. I tried modifying the conf file to change the ID but that was not successful
markgc2014
Newsterisk
 
Posts: 14
Joined: Wed Jun 25, 2014 5:54 pm

Re: Setting username and Account_ID

Postby malcolmd » Mon Aug 04, 2014 7:24 am

the account_id is the name (identifier) of the line attached to the phone.
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: Setting username and Account_ID

Postby markgc2014 » Mon Aug 04, 2014 3:27 pm

Thanks Malcolm,

The account_id part I already know, because that is the same as the 'extension number' at least in my config.

The thing I am trying to find out is how to change the 'username' part - it seems to be automatically generated.

I am using FreePBX - I just realised that I didnt mention that
markgc2014
Newsterisk
 
Posts: 14
Joined: Wed Jun 25, 2014 5:54 pm

Re: Setting username and Account_ID

Postby markgc2014 » Mon Aug 04, 2014 5:14 pm

I am now using GetConfig with res_digium_phone.conf and that gives me all the info I need - so thanks and dont need to respond to this one
markgc2014
Newsterisk
 
Posts: 14
Joined: Wed Jun 25, 2014 5:54 pm

Re: Setting username and Account_ID

Postby malcolmd » Tue Aug 05, 2014 8:41 am

Cool :D
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: Setting username and Account_ID

Postby fedral144 » Wed Dec 10, 2014 1:39 am

Well, that wasn't what I was wishing for but thanks for the quick reply! We are starting to roll out quite a few Digium D40's and D70's in our enterprise and use multiple servers for redundancy and for offloading voicemail, queuing, and conferencing to "feature servers". DPMA is working well in this environment and makes provisioning for a lot of phones very easy to manage. Here's hoping applications and features show up in the near term for DPMA and Digium phones that can take multiple server arrangements into account!
watson
fedral144
Newsterisk
 
Posts: 1
Joined: Wed Dec 10, 2014 1:38 am


Return to Digium Phone API

Who is online

Users browsing this forum: No registered users and 2 guests