cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
351
Views
2
Helpful
14
Replies

Control outgoing calls to SIP trunk provider with multiple "lines"

coult45usmc
Level 1
Level 1

I have CUCME 14.1 running in a test environment for learning. I purchased an account with a SIP trunk provider that has 3 separate "lines":

sip-ua
credentials username 17772324654 password 7 1437534F496548072B3C202E075343 realm callcentric.com
credentials username 17772324654101 password 7 011009115713245645F430A realm callcentric.com
credentials username 17772324654102 password 7 0307541EEA5475195B1A1406 realm callcentric.com
authentication username 17772324654 password 7 052B474B6479DA6543A0618070718507F

Each of these SIP usernames corresponds to a PSTN phone number that I purchased:
17772324654 = 3037120078
17772324654101 = 3034400465
17772324654102 = 3038271267

Incoming calls work perfectly...For example:

voice translation-rule 2
rule 1 /17772324654102/ /2002/

voice translation-profile INCOMING_CALLS_102
translate called 2

dial-peer voice 3 voip
description Incoming calls from callcentric
translation-profile incoming INCOMING_CALLS_102
session protocol sipv2
session target sip-server
incoming called-number 17772324654102
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
no vad

voice register dn 7
number 2002
call-forward b2bua busy 9999
call-forward b2bua noan 9999 timeout 18
name ExternalLine3
label (303)827-1267

voice register pool 4
busy-trigger-per-button 5
id mac D4AD.71FA.77DC
type 8865
number 1 dn 7
template 1
dtmf-relay rtp-nte
username Admin password Cisco1
description Bob
codec g711ulaw

The problem that I'm having is trying to find a way to control outgoing calls. The choice to pick a particular outgoing dial-peer appears to be random. I would like for a particular local extension (2002 in this example) to be forced to use "SIP username 17772324654102" when placing a call to the PSTN via my SIP trunk provider. I've been trying out different solutions with corlists and outgoing dial-peers. But nothing is working properly. Here is an example outgoing dial-peer that I've been using:

voice translation-rule 5
rule 1 /^.*/ /17772324654102/

voice translation-rule 3
rule 1 /^\([2-9].........\)$/ /1\1/
rule 2 /^\([2-9]......\)$/ /1303\1/

voice translation-profile OUTGOING_EXT102
translate calling 5
translate called 3

dial-peer voice 7 voip
description Outgoing calls to callcentric
translation-profile outgoing OUTGOING_EXT102
destination-pattern .T
session protocol sipv2
session target sip-server
voice-class codec 1
dtmf-relay rtp-nte
no vad

Again, the above configurations work for incoming and outgoing calls. However, for outgoing calls, I have no control over which outgoing dial-peer (SIP account) gets used for a given call. Any ideas would be greatly appreciated. Thank you.

2 Accepted Solutions

Accepted Solutions

COR would be what I would use for this. If you share your full running configuration and outline in detail what you’d want to achieve we can see if we can help you out with the needed configuration for this.



Response Signature


View solution in original post

In that case, I would suggest using a prefix to differentiate the calls and ensure they land on the desired dial-peer matching the calls.

This is specifically for users who use three lines on the same phones.Since the SIP COR will be on the pool and not the DN like the SCCP.



Response Signature


View solution in original post

14 Replies 14

COR would be what I would use for this. If you share your full running configuration and outline in detail what you’d want to achieve we can see if we can help you out with the needed configuration for this.



Response Signature


These articles should summarize quite well what you'd need to do.

Configuration Cisco CME COR List 

Configuring Class of Restrictions (COR) 

Do note that if you're using SIP devices in CME those are configured with other configuration elements than ephone, so that part needs to be adopted to fit your needs.

Basically what you'd need is a corlist that is used in the inbound direction on the ephone dn and/or voice register pool and then another, or the same could also work depending on your needs, that is used in the outbound direction on the dial peer that uses the specific translation for that PSTN phone number.

Something like this could work as an example for one of the numbers you outlined.

 

 

dial-peer cor custom
 name PSTN-101
 name PSTN-102
 name PSTN-654
 name CME
!
dial-peer cor list PSTN-IN
 member CME
!
dial-peer cor list CME-OUT
 member CME
!
dial-peer cor list PSTN-101-IN
 member CME
 member PSTN-101
!
dial-peer cor list PSTN-101-OUT
 member PSTN-101
!
dial-peer cor list PSTN-102-IN
 member CME
 member PSTN-102
!
dial-peer cor list PSTN-102-OUT
 member PSTN-102
!
dial-peer cor list PSTN-654-IN
 member CME
 member PSTN-654
!
dial-peer cor list PSTN-654-OUT
 member PSTN-654
!

voice register pool 4
 cor incoming PSTN-102-IN
 cor outgoing CME-OUT
!
dial-peer voice 3 voip
 cor incoming PSTN-IN
!
dial-peer voice 7 voip
 cor outgoing PSTN-102-OUT

 

 



Response Signature


coult45usmc
Level 1
Level 1

Thank you for the quick reply. I've had success using corlists to achieve this result in the past on an older version of CME. But, I was using 100% SCCP phones. Now that I'm using 100% SIP phones in this new environment, I see that the cor commands go on the voice register pool, rather than the voice register dn (with SCCP phones, they go on the ephone-dn). I'm struggling with this new concept because...what if the pool has all three lines assigned to it? That's good to know that I can achieve the same result with corlists and only need to find the right config. Thanks for your config example. I'll do some additional reading and give it a another shot this weekend and provide an update. 

You mentioned in your post that you have tried a solution based on the Corlist. However, there is no configuration required for the core on the shared configuration for that to work.

I echo @Roger Kallberg : COR will be the solution for you.



Response Signature


coult45usmc
Level 1
Level 1

I must be missing something. Assume that I've got dial-peers and everything configured for all three SIP trunk extensions, just like extension 102 in my original post, but also for 100 and 101.

17772324654 = 2000
17772324654101 = 2001
17772324654102 = 2002

voice register dn 5
number 2000

voice register dn 6
number 2001

voice register dn 7
number 2002


voice register pool 4
number 1 dn 7
number 2 dn 5
number 3 dn 6
cor incoming PSTN-102-IN
cor outgoing CME-OUT


It seems to me that regardless of which line I choose to make a call with this SIP phone, it's going to use extension 102. Am I wrong?

Well you never said anything about that you’d be using all 3 numbers on the same device. That’s an entirely different thing.



Response Signature


coult45usmc
Level 1
Level 1

I was able to get it to work perfectly with SCCP phones because the corlist config went on the ephone-dn. 

coult45usmc
Level 1
Level 1

The design requirement is that three phones will each have only one of the three extensions assigned to it and that's it. But, the fourth phone will need to have access to all three lines. 

In that case, I would suggest using a prefix to differentiate the calls and ensure they land on the desired dial-peer matching the calls.

This is specifically for users who use three lines on the same phones.Since the SIP COR will be on the pool and not the DN like the SCCP.



Response Signature


Just to make sure I understand your idea... Are you suggesting that I set things up so that I'll have to dial a specific number, similar to the "dial 9 to get an outside line" concept? But in my case, I would have a different number assigned to each line which would allow the caller to match the desired outbound dial-peer?

coult45usmc
Level 1
Level 1

I haven't tested this yet. But, I think what I'll do is leave the cor config in place for the SIP phones that have only one PSTN line assigned. Then, I'll create totally separate outgoing dial-peers each for extensions 100, 101, and 102 (with no COR) for the user at the SIP phone with all three PSTN lines assigned. When that user needs to make a PSTN call, they'll just have to remember to dial the prefix associated with the PSTN line that they want to use for the call.

For example:

voice translation-rule 101
rule 1 /^101/ //
rule 2 /^\([2-9].........\)$/ /1\1/
rule 3 /^\([2-9]......\)$/ /1303\1/

voice translation-rule 8
rule 1 /^.*/ /17772324654101/

voice translation-profile OUTGOING_EXT101
translate calling 8
translate called 101

dial-peer voice 8 voip
description EXT101_OUTGOING
translation-profile outgoing OUTGOING_EXT101
destination-pattern 101T
session protocol sipv2
session target sip-server
voice-class codec 1
dtmf-relay rtp-nte
no vad

This solution feels messy to me. I consider it to be a "workaround". It'd be nice if the powers that be at Cisco changed the cor config parameter to exist on the dn rather than the pool (just like SCCP phones). That gives the admin much more control. The other thing that would be useful is if there was a parameter on the outgoing dial-peer to match based on the calling extension rather than a destination pattern, or both.

Just be aware of if you do not have COR on the dial peers that you intend to be used by the phone that has all 3 DNs there is nothing stopping the other phones to use these dial peers as well. See this table from this document, Configuring Class of Restrictions (COR), for more details.

Snag_1deb291.png

You might want to have a look at this great document on what is possible for call routing in IOS. Explain Cisco IOS and IOS XE Call Routing Although do note that since your using CME there are limitations as the inbound dial-peer for the devices would be the one that the system creates for you based on the CME configuration. So I'm afraid not all options are on the table. Hopefully there are some nuggets in it, if not for this I'm sure you'll return to it many times as it's one of the most useful documents in my view.



Response Signature


coult45usmc
Level 1
Level 1

Thanks Roger and Nithin for your help. 

coult45usmc
Level 1
Level 1

I've got an update for anyone else experimenting with COR and multiple lines on a SIP phone. COR is only applied to the primary extension on the voice register pool. Additional lines are ignored.