Calling remotely through a PBX

I work for a VoIP company that in addition to many other options, provides SIM cards which can be integrated in to a IP PBX system.

All my incoming & outgoing calls go through my FreePBX13 system in the Cloud.

I would like to be able to call and identify myself to Asterisk as an extension rather than my regular Caller ID.

If I change the Caller ID to one of the extensions it will not allow the call to go through.

There are instances where only extensions are allowed uses of services… such as **xxx or *8 for call pickup and *69 for last incoming call, *34 for blacklisting last number etc.

Any idea if this is even possible?

Why wouldn’t you just authenticate yourself as an extension? I’m sure there’s a step I’m missing here. I set up connections like this for my customers all the time - the can use their cell phones as they normally would, or use Zoiper to connect as a SIP connection. I must be missing an important part of what you’re trying to do.

What do you mean authenticate myself?

I am connected using a SIP trunk with “context=from-internal” the Asterisk identifies me in the CDR with the CLI that I setup for my SIM.

OK - I clearly do not understand how you’re going about this.

You are using a SIM, so you are using a GSM cell phone, right?
Or are you saying that the PBX is connecting to a GSM gateway as a phone?

How are you connecting the cell phone to Asterisk?
Asterisk doesn’t support direct connections from GSM phones - chan_mobile used to do that, but I don’t think it’s supported any more. That tells me that you are either using a GSM-gateway (in which case, your phone is already associated with a number) or are connecting to the server via SIP over the IP network (in which case, your SIM card is not a part of the connection).

If you are dialing the server using the server’s Direct In Dial number (DID), then what are you expecting to happen next?

As I think about this more and more, I think I might have a clue:

  1. You are installing the SIM card in an interface that connects the PBX to the cell phone network (instead of using a VOIP gateway over the Internet).
  2. You want to change the Caller ID number of the outbound connections through the SIM card connection.
  3. If that’s the case, you need to contact your GSM service provider and ask them to allow you to send arbitrary caller ID information from your phone. Not likely to happen.

But none of that has anything to do with what you said about connecting as an extension. Your PBX is in the cloud, which means you don’t have control over the server itself, so installing a SIM in that is impossible.

So, we’re back to you trying to connect your cell phone as an extension. If you dial the number of your PBX to connect, you are going to be an external call. There is little you can do to avoid that. The only one that’s close is “DUNDI”, but that opens your system up to a lot of hacking possibilities, since there’s no way to firewall DUNDI.

If you have a smart phone, you can download “Zoiper” and connect to the server via the Internet and get authenticated as an extension.

Thank you for your lengthy informative response.

The company that I work for are an MVNO.
We have complete control over the SIM cards.
All calls that I make through the GSM network go directly through my PBX as it is set as a provider.
I set certain rules on the SIM side to ensure my CLI changes according to the countries that I’m calling.
I can dial the feature codes etc. It is as if I’m making and receiving calls from an IP Phone with an extension registered to it. My PBX allows me to dial out as the context is “from-internal”

What I would like to do is be recognized by the PBX as an extension. For example, when I make an outgoing call, the CDR shows that the call was initiated from extension 200 with 1210000000 as the outbound Caller ID. This will enable me to use services that are only available to physical extensions. Currently it shows whatever caller ID I’ve setup on the SIM.