Hey all,
I've got a bit of an interesting use case. I've been working to setup the OpenBSC components in order to simulate stress testing a GSM network. I've been able to get communications across the GSM working properly, with MSs able to place calls. However, part of what I'm trying to do involves routing to a simulated PSTN. I turned to sip-connector and asterisk, but my network immediately stopped working once I told the MSC to use an external MNCC.
The setup involves two separate computers. The first is the BSS, which has a BSC, MGW, virtual BTS, and two MSs running on mobile and virtphy. The second is the NSS, with the MSC/VLR, HLR, MGW, and STP. The GSM is split between the two devices because of the eventual goal to increase the number of BSSs to better simulate a real-world GSM.
This was all working fine, until I modified osmo-msc.cfg to include "mncc external /tmp/msc_mncc". In parallel, I setup osmo-sip-connector and ran it on the NSS through the same "/tmp/msc_mncc" socket, pointing it at Asterisk (also on the NSS). This was all done according to the instructions listed here: https://osmocom.org/projects/osmo-sip-conector/wiki/Howto.
Now whenever I place my calls (which I do through mobile's "call" VTY command on the BSS), the call doesn't connect and simply gets released after 30 seconds. After doing some debugging, I've determined that Asterisk is not receiving anything from the sip-connector. Meanwhile, the sip-connector is being told to delete any connection basically as soon as it's created:
<0001> mncc.c:1005 MNCC rcvd message type: MNCC_SETUP_IND <0001> mncc.c:566 Created call(5004) with MNCC leg(2147483652) IMSI(001010000000001) <0001> mncc.c:68 Starting Timer for MNCC_RTP_CREATE <0001> mncc.c:164 MNCC sent message type: MNCC_RTP_CREATE <0001> mncc.c:1005 MNCC rcvd message type: MNCC_REL_IND <0001> mncc.c:636 Rcvd MNCC_REL_IND, Cause: RESOURCE_UNAVAIL <0001> mncc.c:648 leg(2147483652) was released. <0002> call.c:90 call(5004) released.
The MSC has the following as part of its output when a call is placed:
... <0020> osmo_ss7.c:1933 0: asp-OsmoMSC-asp: xua_cli_read_cb(): sctp_recvmsg() returned 48 (flags=0x80) <0023> m3ua.c:714 0: asp-OsmoMSC-asp: Received M3UA Message (XFER:DATA) <0023> m3ua.c:543 0: asp-OsmoMSC-asp: m3ua_rx_xfer <0023> m3ua.c:566 0: asp-OsmoMSC-asp: m3ua_rx_xfer(): M3UA data header: opc=2233=1.23.1 dpc=185=0.23.1 <0020> osmo_ss7_hmrt.c:276 m3ua_hmdc_rx_from_l2(): found dpc=185=0.23.1 as local <0020> sccp_scrc.c:472 scrc_rx_mtp_xfer_ind_xua: HDR=(CO:CODT,V=0,LEN=0), PART(T=Destination Reference,L=4,D=00000007), PART(T=Segmentation,L=4,D=00000000), PART(T=Data,L=6,D=000422040120) <0021> sccp_scoc.c:1664 Received CO:CODT for local reference 7 <0021> sccp_scoc.c:1698 SCCP-SCOC(7)[0x555adb5ddf40]{ACTIVE}: Received Event RCOC-DT1.ind <0021> sccp_user.c:175 Delivering N-DATA.indication to SCCP User 'OsmoMSC-A' <0011> sccp_ran.c:108 (GERAN-A-7) sccp_ran_sap_up(N-DATA.indication) <0003> ran_peer.c:591 ran_peer(GERAN-A:RI-SSN_PC:PC-1-23-1:SSN-BSSAP)[0x555adb5b1010]{READY}: Received Event RAN_PEER_EV_MSG_UP_CO <0007> ran_peer.c:407 msc_i(IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ)[0x555adb5d97e0]{READY}: Received Event MSC_EV_FROM_RAN_UP_L2 <0011> ran_msg_a.c:790 msc_i(IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ)[0x555adb5d97e0]{READY}: RAN decode: BSSMAP: CLEAR REQUEST <0007> msc_i.c:85 msc_a(IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ)[0x555adb5daa50]{MSC_A_ST_COMMUNICATING}: Received Event MSC_A_EV_FROM_I_PROCESS_ACCESS_SIGNALLING_REQUEST <000b> msc_a.c:196 msc_a(IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ)[0x555adb5daa50]{MSC_A_ST_COMMUNICATING}: + msc_a_ran_dec: now used by 2 (cc,msc_a_ran_dec) <0011> ran_msg_a.c:790 msc_a(IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ)[0x555adb5daa50]{MSC_A_ST_COMMUNICATING}: RAN decode: BSSMAP: CLEAR REQUEST <0011> msc_a.c:1612 msc_a(IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ)[0x555adb5daa50]{MSC_A_ST_COMMUNICATING}: RAN decode: BSSMAP Clear Request <0007> msc_a.c:1433 msc_a(IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ)[0x555adb5daa50]{MSC_A_ST_COMMUNICATING}: Received Event MSC_A_EV_MO_CLOSE <0007> msc_a.c:733 msc_a(IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ)[0x555adb5daa50]{MSC_A_ST_COMMUNICATING}: State change to MSC_A_ST_RELEASING (X2, 30s) <0011> msc_a.c:769 msc_a(IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ)[0x555adb5daa50]{MSC_A_ST_RELEASING}: Releasing: msc_a use is 2 (cc,msc_a_ran_dec) <000b> msc_a.c:773 VLR subscr IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97 + msc_a_fsm_releasing_onenter: now used by 4 (attached,active-conn,CC,msc_a_fsm_releasing_onenter) <000b> vlr.c:309 VLR subscr IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97 + vlr_subscr_cancel_attach_fsm: now used by 5 (attached,active-conn,CC,msc_a_fsm_releasing_onenter,vlr_subscr_cancel_attach_fsm) <000b> vlr.c:314 VLR subscr IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97 - vlr_subscr_cancel_attach_fsm: now used by 4 (attached,active-conn,CC,msc_a_fsm_releasing_onenter) <0001> transaction.c:230 trans(CC:INITIATED IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ callref-0x80000003 tid-8) Freeing transaction <0005> gsm_04_08_cc.c:237 trans(CC:INITIATED IMSI-001010000000001:MSISDN-1234567891:TMSI-0x9B96EF97:GERAN-A-7:CM_SERVICE_REQ callref-0x80000003 tid-8) tx MNCC_REL_IND ...
Any thoughts as to why this one change to my GSM is suddenly stopping it from functioning properly? Thanks, any help is greatly appreciated!
- James
P.S. I didn't want to include my config files for fear of making this message absurdly long, but let me know if you want to see any and I'll gladly post them.
Hi,
asterisk
I perceive setting up a PBX as somewhat tricky, regardless of which one is used. I myself have only used the PBX configuration templates we keep in osmo-dev.git, for FreeSwitch and Kamailio IIRC, which others have contributed.
Your logs look to me like establishing a call to asterisk fails, and they show a normal BSSMAP Clear procedure. So I guess look at your osmo-sip-connector and asterisk configurations / try with the config files generated by osmo-dev.git...
~N
Hi,
So interestingly enough, I was able to get it working when I removed the cs7 instances and placed everything on one machine. Now the challenge is taking the working configurations and migrating them to work on connected devices, which I don't see why there would be a problem doing so.
Hi James, I happy to hear you at least made some progress. There is no obvious reason (that I can think of) why is should not work for you as you originally specified your setup, therefore I suspect a configuration error, rather than a bug.
If you need further help with with your setup running on more than one box, please take a quick look at
https://osmocom.org/projects/cellular-infrastructure/wiki/ReportingBugs
I don't think in this case it's necessary to supply absolutely everything listed there, but at least config files, and some traffic capture. otherwise you leave others guessing too much and it's hard (impossible) to help.
Hi Keith,
Apologies for the delay, this project was unfortunately on the back burner for a bit there.
The problem seems to have shifted a bit - I'm nearly there, but I'm running into an issue. For some reason, my calls from one MS are being automatically rejected by the second MS, which says "Incoming call rejected while busy". I've included pastebins for the various configs and debug outputs below.
extensions.conf (Asterisk): https://pastebin.com/HXQb3Hux pjsip.conf (Asterisk): https://pastebin.com/S7pyq0YH mobile output (Asterisk): https://pastebin.com/Z63xkvLW
As always, thanks for any help you're able to give, it really is appreciated!
On 28/06/2022 12:22, James Connor wrote:
Hey all,
Hi James, very quickly without doing too much analysis of your post:
1) can I see a capture of SIP traffic osmo-sip-connector <-> asterisk ?
2) Is that snippet of osmo-sip-connector log complete - Do you have logging level set-all debug in the config?
Hey,
- can I see a capture of SIP traffic osmo-sip-connector <-> asterisk ?
 
That's the problem, there doesn't appear to be any.
- Is that snippet of osmo-sip-connector log complete - Do you have
 logging level set-all debug in the config?
Yep, that's complete with everything set to debug.
Interestingly enough, using the same configuration without cs7 instances, I was able to get it working when everything resides on a single machine. Now I need to figure out what's causing the issue when I switch it over to multiple.