[Spce-user] WG: Duplicate entry error on Subscriber creation

Ralf Eberhard r.eberhard at msg-gruppe.de
Fri Jun 5 11:11:15 EDT 2020


Hi again,


we use the E164 Number as both the sip- and the web-username.

If I search for the number in Settings->Subscribers, it doesn't show up.


If I try to create the subscriber, the "Duplicate Entry" error is shown.


Terminating the subscriber wasn't possible, since the subscriber just never was there after initial creation. (For unknown reasons)

I tried terminating the related customer and then recreated it, but when again trying to create the subscriber,

there is the "Duplicate Entry" error.


So now there is an entry in the database for a subscriber number that doesn't show up in the search, leading to the error when trying to recreate it.

Will deleting the entry on db level from voip_subscribers mess things up in another place?
The dead entry in voip_subscribers also references an account_id that doesn't exist anymore.

Thanks again,

Ralf Eberhard


________________________________
Von: Rene Krenn <rkrenn at sipwise.com>
Gesendet: Freitag, 5. Juni 2020 14:46
An: Ralf Eberhard
Betreff: AW: [Spce-user] Duplicate entry error on Subscriber creation


>If not, what would be the way to cleanly delete that erroneous subscriber entry?

By design, subscribers and contracts are not deleted but terminated (=kept but hidden).

There are 3 main types of unique constraints involved to ensure consistency of a subscriber at db level:

-          sipusername (have to be unique per domain)

-          webusername (have to be unique per domain)

-          numbers (have to be globally unique)

Teminating a subscriber considers all of this and is the safe way to go. If you see unique constraint errors such as "Failed to create subscriber (Duplicate entry '49xxxxxxxxx-3')", you might use sipusername/webusername or a numer already somewhere else.



br



Von: Ralf Eberhard via Spce-user [mailto:spce-user at lists.sipwise.com]
Gesendet: Freitag, 5. Juni 2020 14:26
An: spce-user at lists.sipwise.com
Betreff: [Spce-user] Duplicate entry error on Subscriber creation



Hello community,



after adding a subscriber to a customer, the subscriber doesn't show up under Customer>Subscribers.


When trying to create that subscriber again, we get the error "Failed to create subscriber (Duplicate entry '49xxxxxxxxx-3')"



select * from voip_subscribers where username = '49xxxxxxxx'; actually shows the subscriber. (With the correct account_id set)



After deleting the whole customer (via Web-Interface), the subscriber is still present in voip_subscribers.



Is it safe to just DELETE FROM voip_subscribers?

If not, what would be the way to cleanly delete that erroneous subscriber entry?



Thanks & kind regards,



Ralf Eberhard


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20200605/37f11e34/attachment-0001.html>


More information about the Spce-user mailing list