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

CUBE and SIP profiles header manipulation

MrMartin
Level 1
Level 1

Hi there!

Im trying to figure out how to use sip-profiles in CUBE to modify a SIP invite header. So for example when i call sip:12345@someip i would like the CUBE to modify it to alphanumeric SIP:martin@someip and route that out to a specific dial-peer.

Is this possible and how can i achieve this ?

I have configured as below, but that is not working.

thanks for any help! BR Martin

 

voice class uri martin sip
user-id martin
!
voice class sip-profiles 1
rule 1 request INVITE sip-header To modify "(<.*:)(.*@)" "\1martin@"
rule 2 request INVITE sip-header From modify "(<.*:)(.*@)" "\1martin@"

 

CUBE1#sh run dial-peer
Current configuration:
!
dial-peer voice 101 voip
description Incoming Calls from PBX
session protocol sipv2
incoming called-number .
voice-class sip profiles 1 inbound
voice-class sip bind control source-interface GigabitEthernet1.10
voice-class sip bind media source-interface GigabitEthernet1.10
codec transparent
no vad
!
dial-peer voice 102 voip
description Incoming Calls from Second CUBE
session protocol sipv2
incoming called-number .
voice-class sip bind control source-interface GigabitEthernet2
voice-class sip bind media source-interface GigabitEthernet2
codec transparent
no vad
!
dial-peer voice 201 voip
description Outbound to PBX
destination-pattern ......
session protocol sipv2
session target ipv4:10.10.10.97
voice-class sip bind control source-interface GigabitEthernet1.10
voice-class sip bind media source-interface GigabitEthernet1.10
codec transparent
no vad
!
dial-peer voice 202 voip
description Outbound to Second CUBE
destination-pattern .....
session protocol sipv2
session target ipv4:10.20.20.2
destination uri martin
voice-class sip bind control source-interface GigabitEthernet2
voice-class sip bind media source-interface GigabitEthernet2
codec transparent
no vad
!
end

2 Replies 2

Have you turned on use of inbound SIP profile globally?

voice service voip
 sip
  sip-profiles inbound

This document is one of the most linked to when it comes to IOS call routing. Explain Cisco IOS and IOS XE Call Routing 

I would suggest that you'd do some changes to you dial peers as they are somewhat not optimally crafted.

voice class uri PBX sip
 host ipv4:<IP of PBX as sent in VIA header>
 host ipv4:<add more lines as needed up to the maximum of 10>

voice class uri CUBE sip
 host ipv4:<IP of CUBE as sent in VIA header>
 host ipv4:<add more lines as needed up to the maximum of 10>

dial-peer voice 101 voip
 no incoming called-number .
 incoming uri via PBX !Uses information in VIA header to match inbound dial peer
 
dial-peer voice 102 voip
 no incoming called-number .
 incoming uri via CUBE !Uses information in VIA header to match inbound dial peer
 
 
dial-peer voice 201 voip
 destination-pattern <change this to something that is more specific than destination-pattern ...... as that maches any 6 digits>

dial-peer voice 202 voip
 no destination-pattern ..... !As you're intending to match on information in the destination uri this is redundant
 


Response Signature


MrMartin
Level 1
Level 1

Thanks! i will have a look at this.

I also found this tools very helpful https://cway.cisco.com/csa-new/#/sipprofiletest.

Best regards Martin