Hey,<br><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 2:06 PM, Daniel Tiefnig <span dir="ltr"><<a href="mailto:dtiefnig@sipwise.com" target="_blank">dtiefnig@sipwise.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 06/12/2012 07:17 PM, Skyler wrote:<br>
> Hi,<br>
<br>
Hej.<br>
<div class="im"><br>
> I deleted a subscriber via the NGCP admin interface and it still<br>
> shows under the same account ID.<br>
<br>
</div>Is it shown as deleted or as active? I.e. is the subscriber name an href?<br>
<div class="im"><br></div></blockquote><div><br></div><div> It is shown greyed out within the account it was originally created.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
> The error message when trying to re-create is: The specified<br>
> telephone number is not available any more.<br>
<br>
</div>Hmm, what is the exact error message in /var/log/ngcp/oss.log?<br>
<br></blockquote><div><br></div><div> ***Provisioning::call_prov: billing::add_voip_account_subscriber failed: number '16044173292' is assigned to another user (subscriber_id: 2)</div><div><br></div><div>  </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You can look at the database to see if the subscriber has not been<br>
deleted correctly. You should be able to find an entry with status<br>
"terminated" in the billing database:<br>
<br>
  select * from billing.voip_subscribers where username = '...';<br>
<br></blockquote><div><br></div><div>  Yes it shows status 'terminated'.</div><div><br></div><div><div>mysql> select * from billing.voip_subscribers where username = '16044173292';</div><div>+----+-------------+--------------------------------------+-------------+-----------+------------+-------------------+-------------+</div>
<div>| id | contract_id | uuid                                 | username    | domain_id | status     | primary_number_id | external_id |</div><div>+----+-------------+--------------------------------------+-------------+-----------+------------+-------------------+-------------+</div>
<div>|  1 |           2 | 5bc847b1-9453-499c-9ff3-43c458c094ab | 16044173292 |         1 | terminated |                 1 | 1605-1      |</div><div>+----+-------------+--------------------------------------+-------------+-----------+------------+-------------------+-------------+</div>
<div>1 row in set (0.00 sec)</div></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The primary_number_id should be NULL, and you shouldn't be able to find<br>
any numbers assigned to the subscriber:<br>
<br></blockquote><div><br></div><div> No the primary_id is not NULL.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  select * from billing.voip_numbers where subscriber_id = ...;<br>
<br></blockquote><div><br></div><div>  mysql> select * from billing.voip_numbers where subscriber_id = '2';</div><div>+----+----+-----+---------+-------------+---------------+--------+--------+---------------------+</div>
<div>| id | cc | ac  | sn      | reseller_id | subscriber_id | status | ported | list_timestamp      |</div><div>+----+----+-----+---------+-------------+---------------+--------+--------+---------------------+</div><div>
|  1 |  1 | 604 | 4173292 |        NULL |             2 | active |      1 | 2012-06-10 10:47:00 |</div><div>|  2 |  1 | 778 | 3315172 |        NULL |             2 | active |      1 | 2012-06-10 10:46:37 |</div><div>+----+----+-----+---------+-------------+---------------+--------+--------+---------------------+</div>
<div>2 rows in set (0.00 sec)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also the provisioning database shouldn't have any information on the<br>
subscriber:<br>
<br>
  select * from provisioning.voip_subscribers where username = '...';<br>
<br></blockquote><div><br></div><div> correct, empty set.</div><div><br></div><div><div>mysql> select * from provisioning.voip_subscribers where username = '16044173292';</div><div>Empty set (0.00 sec)</div></div>
<div><br></div><div> </div><div><br></div></div>