[Users] non default port setting

Klaus Darilion klaus.mailinglists at pernau.at
Tue Feb 21 09:27:18 CET 2006


unplug wrote:
> I have 2 questions about the port using in openser with NAT enabled.
> 
> Q1. Can I using another port number instead of 5060?

yes

> 
> I have tried to change the setting in configuration file.  Below is a
> part of configuration file with NAT enabled.
> 
> ...
> port=6060
> ...
>         if (method=="INVITE" && client_nat_test("3")) {
>                 # INSERT YOUR IP ADDRESS HERE
>                 record_route_preset("203.193.26.234:6060;nat=yes");

I guess this might cause problems. Let openser automatically detect the 
correct IP address for record routing.

                   record_route();
                   add_rr_param(";nat=yes");

>         } else if (method!="REGISTER") {
>                 record_route();
>         };
> 
> Sip phone (UA1) can register in openser successfully.  But in the
> location table, I have the contact and received field still using port
> 5060.
> sip:871966806561 at 10.0.0.46:5060 | sip:210.184.23.31:5060

These are the IP addresses, sockets and ports used by the client. It 
means the client is SENDING from port 5060.

To see the socket on which the REGISTER request was received, take a 
look at the "socket" column in the location table.

> As a result, UA1 failed to make a call as the port is not the one we want.
> 
> Q2. How can I set multiple port for an openser if another port can be
> used instead of 5060?
> Say I want openser listen to 3 ports, ie 5060, 6060, 7060.

listen=tcp:83.1.3.6:5060

listen=udp:83.1.3.6:5060
listen=udp:83.1.3.6:6060
listen=udp:83.1.3.6:7060

listen=tls:83.1.3.6:5061


regards
klaus




More information about the Users mailing list