cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
780
Views
3
Helpful
10
Replies

CUCM Trunk

divas80
Level 1
Level 1

Hello,
we have CUCM 11 and FreePBX as an Edge device connected to VoIP provider, also we have a GSM gateway.
We have trunks between CUCM and FreePBX and between FreePBX and VoIP provider and between FreePBX and GSM gateway.
My questions are about trunk between CUCM and FreePBX.
1) As I can see the SIP request coming from CUCM is from port UDP 37176. Where is this port configuration made? And how can we change this port to for example udp 5060 or something else?
2) Is is possible to create additional trunk from CUCM and FreePBX with different source port? We need this different port to match it on the FreePBX side and then route the call in different way, to for example a GSM gateway.

10 Replies 10

b.winter
VIP
VIP

The source port is dynamically arranged by CUCM itself and cannot be defined. So, no you cannot use different "manual" source ports.
If your PBX supports multiple listening ports, then you can set the destination port to 2 different ports (e.g. Trunk 1 with dest. port 5060 and trunk 2 with dest. port 5065) or prefix the called number before it leaves the CUCM and differentiate the calls in the PBX based on the called number

M02@rt37
VIP
VIP

Hello @divas80,

The source port for outgoing SIP requests from your CUCM is typically dynamically assigned by the operating system and the network stack. It's not a configuration you directly set in CUCM for each SIP trunk. The specific source port, such as UDP 37176 in your case, is determined by the system and can change with each new SIP transaction.h the new source port and other settings as needed.

This request has got udp 5060 as destination port towards FreePBX ?

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Yes, destination port is 5060.

This is a problem for us as we  cannot differentiate invite message by port and receive it in proper trunk and then context.

As I can see in Wireshark, the source port is not even an UDP port, but random TCP. Inside SIP message its ok, its a UDP 5060 but then it is inveloped inside TCP with random port. 

I can not fully understand why this happening, can you please explain? 

As M02@rt37 suggested, you can't define a source port on CUCM for SIP Trunks but you can define which port is used to send messages from CUCM to FreePBX. You can define the destination port that CUCM uses to signal to FreePBX on the Trunk configuration page and the 'listening' port for the CUCM end of that trunk on the SIP Trunk Security Profile. (The one that FreePBX would use to signal to CUCM.)

In this way, you can have two trunks between the two systems that are discrete from one another.

Maren

Hi,

Even if you have 2 trunks to Asterisk (on sip.conf or on Freepbx Config You can use different variables to match the source device) on CUCM you need something to discriminate which one to choose.. and that could be a partition or prefix or extra digits to match the right Route Pattern. Once you decide which method you prefer to choose the right path you can match the called number on Asterisk and send the call to the right destination.

Also.. usign a Prefix on CUCM Side, you could also have one SIP Trunk only to Asterisk to manage call both ways.

 

 

HTH

 

Regards

 

Carlo

Please rate all helpful posts "The more you help the more you learn"

Many thanks for your answers. I configured SIP trunk so that it uses different port 5080 for sending and receiving SIP information. But now problem is on the FreePBX side. It can not accept and answer this requests. Any ideas how to force FreePBX receive and answer SIP invite on 5080 port?

Hi,

If you mean globally listening on 5080 go to "Settings"--> "Asterisk Sip Settings"-->select "SIP Settings" tab and change the "Port to Listen On" value.

HTH

 

Regards

 

Carlo

Please rate all helpful posts "The more you help the more you learn"

Now its 5060 and may be used already for first trunk from CUCM to FreePBX, so if I change this setting to 5080, would it brake my current, first trunk functioning?

I am not familiar with FreePBX, but with the word 'Free' in it is it possible that you cannot specify on a per-trunk basis a listening port? The answer to that should be in whatever documentation is with the system.

Maren

Hi,

Yes it would change the global listening port.

If you want another listening port for a different trunk just go in ssh to your freepbx server and perform a "cd /etc/asterisk"

Than

vi pjsip.transports_custom.conf

add these lines

[SIP-UDP-5080]
type=transport
protocol=udp
bind=0.0.0.0:5080
external_signaling_port=5080
allow_reload=no
tos=cs3
cos=3

Change the 5080 value with your preferred port and save with a <ESC> :x!

than restart asterisk process with asterisk -rx "core restart now"

Now you can setup you second trunk on CUCM selecting 5080 or whatever port you choose as destination port.

Pay attention that the above example uses UDP as transport protocol so in the new trunk on CUCM you need to create a custom SIP Trunk Security Profile selecting UDP as outgoing protocol. There you can also configure a different port other than 5060 as incoming port  so that will allow you to configure Two different trunks on both sidese , one selecting source and destination port as 5060 on both sides  and the other selecting 5080 as SIP port on both sides

In this

 

 

Please let me know if it fits for you.

 

 

BR

 

Carlo

 

Please rate all helpful posts "The more you help the more you learn"