Directory Gateway Register behavior

Directory Gateway Register behavior

Hello Everyone,

I need to handle users from Internet trying to register to one or more PBXs inside a private network and I'm trying to do it with freeswitch. So I need to send a REGISTER to a private PBX when someone tries to register to my freeswitch.

Now I have a lab working using gateways in the directory. However, there is a behavior that I would like to now if I can change it.

Currently, my configuration works like this:

1- internet Softphone -> REGISTER -> Freeswitch
2- Freeswitch -> OK -> Softphone 
3- Freeswitch -> REGISTER -> PBX

If the PBX reject the registration, the softphone remains registered on my freeswitch.

is there a way to change that behavior. something more like:

Scenario 1

1- internet Softphone -> REGISTER -> Freeswitch
2- Freeswitch -> REGISTER -> PBX 
3- PBX -> OK -> Freeswitch
4- Freeswitch -> OK -> Softphone

Scenario 2

1- internet Softphone -> REGISTER -> Freeswitch
2- Freeswitch -> REGISTER -> PBX 
3- PBX -> reject -> Freeswitch
4- Freeswitch -> reject -> Softphone

Kind regards,
Juan Pablo Godoy.