Good morning guys,
I have a trunk that I want to conifgure in my Asterisk installation.
The deal with the provider is that there’s no authentication to do; but they make the thing work according to the source ip address and the port.
Now — the problem I have is that I do not find any way to say to my trunk (configured using the pjsip driver) that the source port where the communication should be happening should not be 5060 —but rather another one.
Just as reference — I have another VOIP system (Draytek Vigor 2820) that allows exactly this scenario through the “Sip Local Port”
PJSIP can have multiple transports defined, each one listens on a different port. An endpoint can be configured to use a specific transport. That is how you would do such a thing.
The thing is — I am not trying to change the listening port; I’m trying to change the source port in Asterisk to initiate the connection.
Just to clarify — my Asterisk server is the client that has to connect to this trunk; the trunk provided requires NO registration and that the connection is coming precisely from a particular IP Address (that’s the easy part) and a particular port (7015). That’s what I want to enforce.
The listening port is used as the source port. It has to be listening, or else the remote side could never send responses and traffic back to Asterisk.
Ah! I thought that part was exclusively for listening incoming trunk registrations.
So if I understand correctly — it would be enough to create a new transport (pjsip.transform.conf) that can be the exact same copy of the current one but listening on my port, and then set the trunk to use that transport.
So I’ve tried and I am now getting positive responses when Asterisk is sending the OPTION verb to their system.
I have two questions now:
I was surprised to see that all the extensions were still logged in correctly. My original thinking was that I should have been changing the port to all the extension too (from 5060 to new_port_number). That wasn’t needed.
Am I missing something?
I can see now positive responses from the trunk to the OPTION verb, but the calls still do not seem to reach my PBX system. The log seems to be completely empty. Any advice where to look at?