Setting username and Account_ID

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

[quote]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”:{},[/quote]

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

the account_id is the name (identifier) of the line attached to the phone.

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

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

Cool :smiley:

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!