This Question is Answered

1 "helpful" answer available (1 pts)
4 Replies Last post: Apr 29, 2008 8:37 AM by dcardosoa  
  29 posts since
Feb 12, 2008

Apr 28, 2008 4:01 PM

Port of Sip-trunk


Hi everybody...


Why when I use OSBC on port 8070, the function SIP-TRUNK send the messages from port 8076?

Is possible change this port?

Always the port of sip-trunk is OSBC's port + 6?

Thanks in advance...

Click to view joegen's profile   539 posts since
Apr 28, 2007
1. Apr 28, 2008 11:01 PM in response to: dcardosoa
Re: Port of Sip-trunk
{quote:title=dcardosoa wrote:}{quote}

Hi everybody...

Why when I use OSBC on port 8070, the function SIP-TRUNK send the messages from port 8076?

The short answer is because OpenSBC spawns 5 kinds of trunks each having their own separate transport listener.

1. Main Trunk -- 5060
2. Back-door -- 5062
3. CALEA -- 5064
4. SIP-Trunk -- 5066
5. Media Server -- 5088


Is possible change this port?

Always the port of sip-trunk is OSBC's port + 6?

Not configurable. You need to touch some code. Look for the following method in SBCSIPTrunk.cxx

void SBCSIPTrunk::OnInitialConfigChanged(
OSSAppConfig & config,
const char * _section
)

and change the bindPort value to whatever you want in the following block

long bindPort = bindAddress.GetPort().AsInteger();
if( bindPort != 0 )
bindPort += 6;
bindAddress.SetPort( OString( bindPort ) );
bindAddress.SetHost( "*" );

Lastly, please state your reasons why you wanted this port configurable and perhaps we would think of adding support for it.

Cheers,

Joegen

Click to view joegen's profile   539 posts since
Apr 28, 2007
3. Apr 29, 2008 8:23 AM in response to: dcardosoa
Re: Port of Sip-trunk
{quote:title=dcardosoa wrote:}{quote}

I wanted this port configurable because there are some carriers that accept peering only using the IP and PORT, then I must inform the port...
Fair enough. I think we can have this configurable in future versions.

If I change the code... Can the port is the same of Main Trunk?
Quick answer is no. The listeners would conflict. However, upping the knot a little bit, this can be done if you bind the the each trunk to a different IP. Then they could share ports. Unfortunately, only the main trunk has the binding configurable at this point as well.