The first thing I do is to make up an Identity. This includes the IMSI and the AuKey (e.g. COMPv1 as found in libosmocore) and the next is to establish the A-link to the MSC.
> phoneConfig := PhoneConfig new.
> phoneConfig imsi: 'XXXX...' auKeyv1: 'AAAAAAA'.
> (server := IPAConfig new addr: 'A.B.C.D' port: 5000) connect serve.
The next part is to do 'procedures' (SCCP connections with a specific goal). Right now there is an implementation of the LU Procedure, the beginning of Call Control (no way to hang up or such) and and sending some bits of USSD (processUnstructuredData Request). To warm up I can execute a simple USSD query. The below code will wait until the operation has completed, it could also print out if it was considered a success or a failure.
> (server doUSSD: phoneConfig nr: '**1234#') execute
Now to produce load I can repeat this, or create multiple processes. In the below code I am going to create four processes that each will do the query 100 times.
> 4 timesRepeat: [:time |
100 timesRepeat: [:each | (server doUSSD: phoneConfig nr: '**1234#') execute]
Another thing missing is to add a timeout on each of these operations, e.g. if the MSC does not answer fast enough or such but I will blog about transactions and dealing with time-outs in another blog.