3CX Call Control API Events via SSH tunnel

Status
Not open for further replies.

kamil.maciejewski

Titanium Partner
Basic Certified
Joined
May 10, 2019
Messages
8
Reaction score
1
Hi,
I'm trying to connect to 3CX API (config server) outside 3CX and I'm able to do it with SSH tunnelling, but I have a problem with events.
Using the same dotnet application, when I connect to config server and start listen to events on local machine (connecting to 127.0.0.1) I'm getting all events that I need.
Using the same dotnet application, when I connect to config server and start listen to events from remote machine (connecting via SSH tunnel) I'm getting only some events.

PhoneSystem.Root.Inserted += new NotificationEventHandler(Root_Inserted);
PhoneSystem.Root.Updated += new NotificationEventHandler(Root_Inserted);
PhoneSystem.Root.Deleted += new NotificationEventHandler(Root_Deleted);

Aplication run on localhost:
Coś sie dzieje... REGISTRATION
Coś sie dzieje... REGISTRAR
Coś sie dzieje... REGISTRATION
Coś sie dzieje... REGISTRAR
Coś sie dzieje... REGISTRATION
Coś sie dzieje... REGISTRAR
Coś sie dzieje... REGISTRATION
Coś sie dzieje... REGISTRAR
Coś sie dzieje... REGISTRATION
Coś sie dzieje... REGISTRAR
Coś sie dzieje... REGISTRATION
Coś sie dzieje... TRUNKREGTIMES
Coś sie dzieje... CONNECTION

Aplication run on remote machine using SSH tunnelling:
Coś sie dzieje... TRANSACTION
Coś sie dzieje... TRANSACTION
Coś sie dzieje... DN
Coś umiera... TRANSACTION
Coś sie dzieje... TRANSACTION
Coś sie dzieje... TRANSACTION
Coś sie dzieje... DN
Coś umiera... TRANSACTION

I'm not getting REGISTRAR, CONNECTION and probably many more events from remote machine
Firewall (iptables) is disabled. I know this is not secure configuration but this VM is only for testing.

Do you have any ideas why events are limited from remote location?
Thank You.
 
You can only connect to the API from the local 3CX Server.
 
That's not true, as I said, I managed to connect to 3CX config server from remote machine using SSH tunnelling.
I'm trying to figure it out why only some events are not showing up
 
That's not true, as I said, I managed to connect to 3CX config server from remote machine using SSH tunnelling.
I'm trying to figure it out why only some events are not showing up
Because not all events are in the root.
 
  • Like
Reactions: jed
Can you elaborate that please?
 
I'm actually surprised to hear that you can get any events from a remote computer. In my experience, the 3CX Call Control API does not respond to any requests unless that request comes from localhost. That's why we built our VoIPTools Relay. You may need to create something similar.

Let's not forget that when the new Gateway service service is released from 3CX, anything you do with the Call Control API may be obsolete.

Our Relay is installed locally on the 3CX server. It connects to the 3CX Call Control API. By the way, you can only have one 3rd-party application access the API at a time (just though you should be aware of that limitation). Then we expose the 3CX API via REST and SignalR (for real-time events). I would recommend you do something similar otherwise, I don't think you will be able to get the events from a remote computer.
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,474
Latest member
costionofrei