cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3753
Views
35
Helpful
19
Replies

SIP Trunk using CME

moustafa.idc
Level 1
Level 1

Hello Everyone,


I need some help in setting up SIP Trunk on CME to send and receive all calls (local, domestic & international)


here is a copy of the voice related setting that I have:


ip dhcp excluded-address 10.10.20.1 10.10.20.20
!
ip dhcp pool Voice
network 10.10.20.0 255.255.255.0
default-router 10.10.20.1
dns-server 8.8.8.8
option 150 ip 10.10.20.1
!

!
voice call carrier capacity active
!
voice service voip
ip address trusted list
ipv4 10.10.10.0 255.255.255.0
ipv4 10.10.20.0 255.255.255.0
ipv4 185.111.128.0 255.255.255.0
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
supplementary-service h450.12
fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback none
sip
early-offer forced
midcall-signaling passthru
!

voice class codec 1
codec preference 1 g711alaw
codec preference 2 g711ulaw
codec preference 3 g729br8
!
voice class sip-profiles 1
!
!
!
!
voice translation-rule 1
rule 1 /^9\(011.*\)/ /\1/
!
voice translation-rule 2
rule 1 /5011/ /02037752050/
!
!
voice translation-profile SIP
translate calling 2
translate called 1
!
!

!
mgcp profile default
!
!
dial-peer voice 100 voip
description **** OUTBOUND CALLS to telecoms *****
translation-profile outgoing SIP
destination-pattern 9T
session protocol sipv2
session target sip-server
voice-class sip options-keepalive up-interval 100 down-interval 50 retry 6
dtmf-relay rtp-nte
codec g711alaw
no vad
authentication username user password 7 094A453809081A3738345D72 realm sip.telecoms.com
!
!
gateway
timer receive-rtp 1200
!

sip-ua
credentials username user password 7 01150D354B060B2A12741751 realm sip.telecoms.com
authentication username user password 7 094A453809081A3738345D72 realm sip.telecoms.com
registrar dns:sip.telecoms.com expires 3600
sip-server dns:sip.telecoms.com
!
!
!
gatekeeper
shutdown
!
!
telephony-service
max-ephones 25
max-dn 25
ip source-address 10.10.20.1 port 2000
auto assign 1 to 25
timeouts interdigit 4
max-conferences 12 gain -6
transfer-system full-consult
create cnf-files version-stamp 7960 Oct 08 2019 04:33:05
!
!
ephone-dn 1
number 5001 no-reg primary
label PH-1
name PH-1
!
!
ephone-dn 2
number 5002 no-reg primary
label PH-2
name PH-2
!
!
ephone-dn 3
number 5003 no-reg primary
label PH-3
name PH-3
!
!
ephone-dn 4
number 5004 no-reg primary
label PH-4
name PH-4
!
!
ephone-dn 5
number 5005 no-reg primary
label PH-5
name PH-5
!
!
ephone-dn 6
number 5006 no-reg primary
label PH-6
name PH-6
!
!
ephone-dn 7
number 5007 no-reg primary
label PH-7
name PH-7
!
!
ephone-dn 8
number 5008 no-reg primary
label PH-8
name PH-8
!
!
ephone-dn 9
number 5009 no-reg primary
label PH-9
name PH-9
!
!
ephone-dn 10
number 5010 no-reg primary
label PH-10
name PH-10
!
!
ephone-dn 11
number 5011 no-reg primary
label PH-11
name PH-11
!
!
ephone-dn 12
number 5012 no-reg primary
label Meeting Room
name Meeting Room
!
!
ephone-dn 13
number 5020 no-reg primary
label SIP
name SIP
!
!
ephone 1
device-security-mode none
mac-address 000E.3857.275B
type 7945
button 1:1
!
!
!
ephone 2
device-security-mode none
mac-address 000E.3833.A235
type 7945
button 1:2
!
!
!
ephone 3
device-security-mode none
mac-address 000D.BC80.ECD0
type 7945
button 1:3
!
!
!
ephone 4
device-security-mode none
mac-address 000E.3888.E6DB
type 7945
button 1:5
!
!
!
ephone 5
device-security-mode none
mac-address 000E.3857.2975
type 7945
button 1:4
!
!
!
ephone 6
device-security-mode none
mac-address 000E.38E4.6766
type 7945
button 1:6
!
!
!
ephone 7
device-security-mode none
mac-address 000E.3888.E116
type 7945
button 1:7
!
!
!
ephone 8
device-security-mode none
mac-address 000D.BC50.F87B
type 7945
button 1:8
!
!
!
ephone 9
device-security-mode none
mac-address 0011.20B6.229D
type 7945
button 1:9
!
!
!
ephone 10
device-security-mode none
mac-address 0011.20B6.22B6
type 7945
button 1:10
!
!
!
ephone 11
device-security-mode none
mac-address 000D.BC26.1B5D
type 7945
button 1:11
!
!
!
ephone 12
device-security-mode none
mac-address 001A.6C7B.56AF
type 7945
button 1:12
!
!
!
ephone 13
device-security-mode none
mac-address 14AB.C558.0395
type CIPC
keep-conference
button 1:13
!

------------------------------------------------------

 

Also here is the output  of show call active voice compact

 

<callID> A/O FAX T<sec> Codec type Peer Address IP R<ip>:<udp>
Total call-legs: 9
130380 ANS T0 g711ulaw VOIP P1012 192.168.1.83:25282
130381 ANS T0 g711ulaw VOIP P7009 192.168.1.83:25282
130382 ANS T0 g711ulaw VOIP P170001 192.168.1.83:25282
130383 ANS T0 g711ulaw VOIP Pil 192.168.1.83:25282
130384 ANS T0 g711ulaw VOIP P1012 192.168.1.83:25282
130385 ANS T0 g711ulaw VOIP P526 192.168.1.83:25282
130386 ANS T0 g711ulaw VOIP P1012 192.168.1.83:25282
130387 ANS T0 g711ulaw VOIP P606060 192.168.1.83:25282
130388 ANS T0 g711ulaw VOIP Pistat 192.168.1.83:25282

2 Accepted Solutions

Accepted Solutions

Hi,

For incoming call you are receiving 02037752050 from service provider. In your configuration it is matching dial-peer 9000 but there is no outbound dial-peer. Please apply below configuration:

!
voice translation-rule 11
 rule 1 /^02037752050$/ /5020/
!
voice translation-profile PSTN_INCOMING
 translate called 11
!
dial-peer voice 9000 voip
 translation-profile incoming PSTN_INCOMING
!

For outbound calls, change below configuration:

!
voice translation-rule 1
 rule 1 /^9\(.*\)/ /\1/
!

Once you test again, please post outbound and inbound logs separately. 

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

View solution in original post

Hi,

Can you try below configuration:

voice class sip-profiles 1
 request INVITE sip-header From modify "sip.bluetelecoms.com" "37.236.146.168"
 request INVITE sip-header P-Asserted-Identity modify "sip.bluetelecoms.com" "37.236.146.168"
 !
dial-peer voice 100 voip
  voice-class sip profiles 1
 !

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

View solution in original post

19 Replies 19

Vaijanath Sonvane
VIP Alumni
VIP Alumni

Hi,

Do you have DNS servers configured on our CME router? Are you able to resolve sip.telecoms.com to IP Address from your CME? If you are not able to resolve sip.telecoms.com then configure IP Address instead of hostname. 

 

Try below configuration on your CME router:

!
voice service voip
 no supplementary-service sip moved-temporarily
 no supplementary-service sip refer
 supplementary-service media-renegotiate
 sip
  bind control source-interface  <Interface> ------------------> Bind SIP Signaling Interface
  bind media source-interface  <Interface> ------------------> Bind SIP Media Interface
  header-passing
  registrar server expires max 600 min 60
  privacy-policy passthru
!
dial-peer voice 9000 voip
 description ** INBOUND CALLS from telecoms **
 session protocol sipv2
 incoming called-number .
 voice-class codec 1  
 voice-class sip early-offer forced
 dtmf-relay rtp-nte
 no vad
!
dial-peer voice 100 voip
 description **** OUTBOUND CALLS to telecoms *****
 translation-profile outgoing SIP
 destination-pattern 9T
 session protocol sipv2
 session target sip-server
 voice-class codec 1  
 voice-class sip early-offer forced
 dtmf-relay rtp-nte
 no vad
!

Also, make sure you have correct IP Routing configured to reach your ISP.

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

yes I'm able to ping

Have you tried other configuration. Can you post inbound and outbound call logs for below commands:

  • debug ccsip messages
  • debug voip ccapi inout
  • debug dial-peer

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

Here is the debug output, I applied the config you sent already.

 

calling from IP phone 5020 to 912146043977 and the other direction from +12146043977 to 5020 (02037752050) UK

 

Thanks for your help!

Here is the full config

Hi,

For incoming call you are receiving 02037752050 from service provider. In your configuration it is matching dial-peer 9000 but there is no outbound dial-peer. Please apply below configuration:

!
voice translation-rule 11
 rule 1 /^02037752050$/ /5020/
!
voice translation-profile PSTN_INCOMING
 translate called 11
!
dial-peer voice 9000 voip
 translation-profile incoming PSTN_INCOMING
!

For outbound calls, change below configuration:

!
voice translation-rule 1
 rule 1 /^9\(.*\)/ /\1/
!

Once you test again, please post outbound and inbound logs separately. 

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

Incoming call is working now. outgoing call from IP phone to the outside is not.

 

here is the debug message

 

debug file I did a test from ip phone 5020 calling 912146043977/90012146043977

Appreciate the time and efforts you spent.

 

Thanks

 

Hi,

I see that you marked this post as accepted solution. Is your outgoing calls working?

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

Hi Vaijanath ,

 

It worked for inbound (so 50 % is done)

I posted the call debug for the outbound if you can get a chance to look at along with the SIP parameters that we need to configure.

 

Please let me know.

 

Thanks alot for your great help!

Moustafa

Here is the SIP Parameters that the provider is asking for:

UK Endpoint:
You can send your INVITE requests to our primary UK SIP endpoint: sip.bluetelecoms.com
Authentication:
Every INVITE request is authenticated with digest authentication:
● username - user
● password - pass
Destination Numbers:
Recipient numbers must be in E.164 format: eg: 443334445558 (UK) / 19178103989 (US)
Caller ID / CLI:
Set the Caller Line Identity (CLI) in the From header using E.164 format.
Example: From: <sip:443336783333@sip.bluetelecoms.com>
Codecs
The following codecs are supported:
● PCMA / G711a
● PCMU / G711u

 

Carrier ID:BT-IN01

Protocol:SIP

[BT-IN01]
insecure=invite
type=friend
context= <YOUR_CONTEXT>
host=bt-in01.bluetelecoms.com
canreinvite=no
qualify=yes
disallow=all
allow=ulaw
allow=alaw

Hi, 

Can you post your latest configuration of your router?

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

Here is the current config

 

also I'm looking at the debug below

 

SIP/2.0 403 Forbidden auth ID
Via: SIP/2.0/UDP 37.236.146.168:5060;branch=z9hG4bK2681829
From: "PH-11" <sip:5020@sip.bluetelecoms.com>;tag=2951804-65D
To: <sip:12146043977@sip.bluetelecoms.com>;tag=be6cf535174b54f27be086b6ef2cfa5f.8df4
Call-ID: 551F00D5-EEA911E9-B5598701-93FAF327@37.236.146.168
CSeq: 102 INVITE
server: SBC
Content-Length: 0

Received:
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 37.236.146.168:5060;branch=z9hG4bK26D738
From: "PH-11" <sip:5020@sip.bluetelecoms.com>;tag=29695D8-1574
To: <sip:12146043977@sip.bluetelecoms.com>;tag=be6cf535174b54f27be086b6ef2cfa5f.97b2
Call-ID: 8F5FB96A-EEA911E9-B5D88701-93FAF327@37.236.146.168
CSeq: 101 INVITE
Proxy-Authenticate: Digest realm="sip.bluetelecoms.com", nonce="5da609c900004a97b9bd81d54c28ebc93015bf532ce628ca"
server: SBC
Content-Length: 0

---------------------

 

Is it telling us that user/pass is incorrect?

the provider says that they reply the data and get '401 Unauthorized' from us

 

Appreciate the time you spend to solve this issue

 

Thanks,

Moustafa

Hi,

Please try below configuration:

voice service voip
 sip
  min-se 3600 session-expires 3600
  registrar server expires max 3600 min 60
  asserted-id pai
  localhost dns:sip.bluetelecoms.com
!
dial-peer voice 100 voip
 no authentication username 4718367014 password 7 094A453809081A3738345D72 realm sip.bluetelecoms.com
!         
!
sip-ua 
 credentials number 4718367014 username 4718367014 password 7 01150D354B060B2A12741751 realm sip.bluetelecoms.com
 authentication username 4718367014 password 7 094A453809081A3738345D72 realm sip.bluetelecoms.com
 registrar dns:sip.bluetelecoms.com expires 3600
 sip-server dns:sip.bluetelecoms.com
!

Try below add-on command to earlier config if above configuration doesn't work:

sip-ua 
 calling-info pstn-to-sip remote-party-id number set 4718367014

Please post logs for "debug ccsip messages" commands only.

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

Hi

 

Here is the debug output, looks like same issue for the outbound calls.

 

Apprecaite the time you spend here!

 

Thx

Moustafa