cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6387
Views
0
Helpful
14
Replies

SIP Trunk with Sangoma FreePBX

fuhrersk8
Level 3
Level 3

Hello Guys;

 

    I am trying to establish a SIP trunk between a Sangoma FreePBX (v. 14.0.1.24) and a CUBE (Cisco IOS XE Software, Version 03.16.04b.S).

 

I cant find any helping documentation regarding the FreePBX for SIP trunking with a Cisco Voice Gateway.

 

Should it be a chan_sip or chan_pjsip trunk int the FreePBX?

 

Any config example will be very helpful.

 

Thanks in advanced!

 

Regards, 

14 Replies 14

Aeby Vinod
Level 3
Level 3
You'd probably have more luck getting exact answers on a forum dedicated to Sangoma FreePBX or from their support.

But from experience, whenever I integrate non-Cisco products with Cisco and when there are no clear manuals, I find a lot of answers by trial and error and by trying out different combinations.

and probably looks at documents such as this one to have a basic idea about the config even though it doesn't talk about CUBE anywhere.
https://community.freepbx.org/t/how-to-connect-freepbx-13-pjsip-sangoma-vega/31319

Please rate if you find this helpful.

Regards,
Aeby



Please rate if you find this helpful.

Regards,
Aeby

Hi Aeby and thanks for your reply;

 

    What about the Cisco side?

 

I have the following configured:

The ip address of the FreePBX is 10.199.4.65

 

sip-ua
credentials username cube password 7 105D081702181F0A5D realm na.am.lilly.com
authentication username cube password 7 00171208035406075E
retry invite 3
retry response 3
retry bye 3
retry cancel 3
retry register 10
timers trying 1000
registrar ipv4:10.199.4.65 expires 3600
sip-server ipv4:10.199.4.65
!
voice service voip
ip address trusted list
ipv4 10.199.4.65
mode border-element
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
supplementary-service h450.12
no supplementary-service sip moved-temporarily
no supplementary-service sip refer
no supplementary-service sip handle-replaces
redirect ip2ip
signaling forward unconditional
fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711ulaw
sip
bind control source-interface GigabitEthernet0/0/1
bind media source-interface GigabitEthernet0/0/1
min-se 86400 session-expires 86400
options-ping 60
midcall-signaling block
midcall-signaling preserve-codec
early-offer forced
call-route url
g729 annexb-all
!
!
voice class uri 2 sip
host 10.199.4.65
voice class codec 1
codec preference 1 g729r8
codec preference 2 g711ulaw
codec preference 3 g711alaw
codec preference 4 g722-64

Your config seems to be fine. A couple of pointers though -
1. You need registrar if you would want the SIP trunk to be registered, else only sip-server should suffice. If sip-server is configured in "sip-ua", your dial-peers will have a session target as "sip-server" rather than an IP address.
2. Add your freepbx IP to the trust list to allow inbound calls.

Rest will depend what works when you test and what does not based on your pbx. Changes can be done later on.

Hello and thanks for your reply;

 

   How to check if registration is successful on the CUBE?

 

Regards, 

"show sip-ua register status" for a show command and debug ccsip message and debug ccsip non-call for a debug.

Hello;

 

  I get the following:

 

Registrar is not configured

Add an output for "show run | s sip-ua"

Here you go:

 

SPC02TCa-Backup_SBC_CUBE#show run | s sip-ua
sip-ua
credentials username cube password 7 105D081702181F0A5D realm na.am.lilly.com
authentication username cube password 7 00171208035406075E
retry invite 3
retry response 3
retry bye 3
retry cancel 3
retry register 10
timers trying 1000
sip-server ipv4:40.199.4.65

So you do not have a registrar configured hence the output.
Add -

sip-ua
registrar ipv4:X.X.X.X >> IP of registrar server

Hello;

 

Looks better but I think still not registered, correct me if Im wrong:

 

SPC02TCa-Backup_SBC_CUBE#show sip-ua register status
Line peer expires(sec) reg survival P-Associ-URI
================================ ========== ============ === ======== ============
cube -1 149 no normal

It is not registered. Enable the debugs that I posted earlier and wait for a couple of minutes. Send them across.

Here some debugs:

 

Jun 15 17:53:49.932: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
OPTIONS sip:cube@40.199.4.67:5060 SIP/2.0
Via: SIP/2.0/UDP 40.199.4.65:5060;rport;branch=z9hG4bKPje69a21c2-e357-40fb-88c7-c41decc4ea6b
From: <sip:cube@40.199.4.65>;tag=32927e45-121a-4625-9bad-7c97db7b2fdc
To: <sip:cube@40.199.4.67>
Contact: <sip:cube@40.199.4.65:5060>
Call-ID: 66ecf83d-31fe-4d07-9895-b9f31bb85a4e
CSeq: 33179 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-14.0.1.24(13.18.4)
Content-Length: 0


Jun 15 17:53:49.932: VOICE_REG_POOL: No entry for (cube) found in contact table
Jun 15 17:53:49.933: //215/E4B4A88980B9/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 40.199.4.65:5060;rport;branch=z9hG4bKPje69a21c2-e357-40fb-88c7-c41decc4ea6b
From: <sip:cube@40.199.4.65>;tag=32927e45-121a-4625-9bad-7c97db7b2fdc
To: <sip:cube@40.199.4.67>;tag=47FD84F-F11
Date: Fri, 15 Jun 2018 13:53:49 GMT
Call-ID: 66ecf83d-31fe-4d07-9895-b9f31bb85a4e
Server: Cisco-SIPGateway/IOS-15.5.3.S4b
CSeq: 33179 OPTIONS
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
Allow-Events: telephone-event
Accept: application/sdp
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Content-Type: application/sdp
Content-Length: 369

v=0
o=CiscoSystemsSIP-GW-UserAgent 3879 3482 IN IP4 40.199.4.67
s=SIP Call
c=IN IP4 40.199.4.67
t=0 0
m=audio 0 RTP/AVP 18 0 8 9 4 2 15 3
c=IN IP4 40.199.4.67
m=image 0 udptl t38
c=IN IP4 40.199.4.67
a=T38FaxVersion:0
a=T38MaxBitRate:9600
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:200
a=T38FaxMaxDatagram:320
a=T38FaxUdpEC:t38UDPRedundancy

 

 

 

Regards, 

The starnge thing is that it appears as available in the FreePBX:
Endpoint: cube Not in use 0 of inf
OutAuth: cube/cube
Aor: cube 0
Contact: cube/sip:cube@40.199.4.67:5060 595cceb131 Avail 2.248
Transport: 0.0.0.0-udp udp 0 0 0.0.0.0:5060
Identify: cube/cube
Match: 40.199.4.67/32


Also, when a call is placed, the CUBE receives the call from the Freepbx AND and matches the incoming dial peer.

If the freePBX won't restrict calls to and from to the IOS router irrespective of the fact whether the account that you created is registered or not, it should not matter.
IOS receives a call and the router acts on it. It does not check whether the call came in on a registered trunk or not.