-1

I am using freeswitch to dial calls through a dinstar GSM gateway with 32 sim cards. Calls works fine, and it goes out through any one of the free channels. However, the customer wants to know the cell number of the SIM card through which each call was made.

I am not able to see any options in Dinstar. It blindly returns whatever number I set in the origination_caller_id_number field. Is there any way to determine what is the caller ID that is being seen by the called party? The operator ignores any caller ID I set via origination_caller_id_number. It is always displaying the SIM card cell number.

Sharath
  • 1,627
  • 2
  • 18
  • 34

2 Answers2

0

Usually, the GSM gateway is not able to know the number of the sims.

And you cannot set callid through the way of setting origination_caller_id_number, because the callerid is controlled by the operator, even if you send the true number that this sim card is suppose to have.

There is a tricky way to let your service know which number you are using to call, that is to set the voip account by the number.

the original integration between FS and GSM gateway could be like this:

FS ------(sip trunk)------> GSM gateway

the sip trunk is a voip account set in GSM gateway, and there is a routing rule goes from this account to all your sim cards.

Now we do some tricky changes, setting multi sip trunks by the number,

FS ------(number A sip trunk) ----> GSM gateway (only route to sim A)
| ------(number B sip trunk) ----> GSM gateway (only route to sim B)
| ------(number C sip trunk) ----> GSM gateway (only route to sim C)

you got 32 sim cards, and there should be 32 sip trunks. and then you will know the number since each call goes through one sip trunk.

By the way, you need to do the dispatching job on the higher level of your service, some Higher Business Layer which controls FS to do callings should take over the dispatch functionality that is originally handled in the GSM gateway.

  • Thanks. Actually, I found a better method. I enabled Portno header, so I get port-no with SIP messages. I just maintain a mapping between the phone-number and the port number in a DB. I can get the phone number using the port number. So I can manage with a single SIP trunk. – Sharath Dec 13 '22 at 15:15
0

I found a workaround. I enabled Portno header in Dinstar, so I get port-no with SIP messages. I just maintain a mapping between the phone-number and the port number in a DB. I can get the phone number using the port number. So I can manage with a single SIP trunk.

Sharath
  • 1,627
  • 2
  • 18
  • 34