Make random extension range configurable
Previously if subscriber was automatically created it got assigned
random MSISDN number between 20000 and 49999. Make it configurable with
new vty command "subscriber-create-on-demand random" and expand vty
tests to check it.
Change-Id: I040a1d227b0c7a1601dc7c33eccb0007941408a6
Related: OS#1658
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index 57c10cf..1dc2cc2 100644
--- a/openbsc/src/libmsc/gsm_subscriber.c
+++ b/openbsc/src/libmsc/gsm_subscriber.c
@@ -203,9 +203,10 @@
}
struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp,
- const char *imsi)
+ const char *imsi, uint64_t smin,
+ uint64_t smax)
{
- struct gsm_subscriber *subscr = db_create_subscriber(imsi);
+ struct gsm_subscriber *subscr = db_create_subscriber(imsi, smin, smax);
if (subscr)
subscr->group = sgrp;
return subscr;