cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1000
Views
15
Helpful
12
Replies

Strip domain in VCS using CPL

Gordon Ross
Level 9
Level 9

I have CUCM 10.5 connected to VCS-C via a SIP trunk. The VCS then connects to a VCS-E. Beyond the VCS-E is a H.323 system. (The VCSs are running X8.5 software) I've got the basic signalling flowing from CUCM -> VCS-C -> VCS-E OK.

 

When calls originate on CUCM as SIP, the To & From addresses have domain names appended to them. On the VCS-E, I've got a transform setup to strip the domain from the To address, and that's working fine. But I need to strip the domain from the From address too. There's no simple way to do this on VCS, so you have to use CPL. I can't find much on CPL, expect a previous forum posting supportforums.cisco.com/discussion/11403986/replacing-source-alias-vcs which unfortunately has broken XML.

 

I've tried a CPL script of:

<?xml version="1.0" encoding="UTF-8" ?>
<cpl xmlns="urn:ietf:params:xml:ns:cpl" xmlns:taa="http://www.tandberg.net/cpl-extensions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:cpl cpl.xsd">
    <taa:routed>
        <address-switch field="registered-origin">
            <address regex="(004401234\d{5})@192\.168\.0\.1">
                <taa:location clear="yes" regex="(.*)@.*" replace="\1" >
                </taa:location>
            </address>
        </address-switch>
    </taa:routed>
</cpl>

But this doesn't seem to work. Any pointers as to how to achieve what I want?

 

Thanks,

 

GTG

Please rate all helpful posts.
12 Replies 12

Patrick Sparkman
VIP Alumni
VIP Alumni

Hopefully this will get you started, it's what I use to rewrite a few source addresses with our VCS, see attached file.  Reference the CPL locations section of the VCS Admin Guide starting on the bottom of pg 408 for reference on the syntax of the CPL script.

Regarding the TO address, I even have a case open and the result of my issue is exactly that issue, the TO address, and there is no way to change it.

I'm not sure this is working. When I look at the logs I still see the IP address:

2015-04-15T07:40:41+01:00 dev-vcs-e tvcs: UTCTime="2015-04-15 06:40:41,485" Module="network.h323" Level="INFO":  Action="Sent"  Dst-ip="194.80.134.35"  Dst-port="1719"
  Detail="Sending RAS LRQ  SeqNum=2155  DestAlias='004401205'  Bandwidth=384Kb/s  SrcAlias='00440123448605@192.168.0.1'  Hopcount=14 "

GTG

 

Please rate all helpful posts.

You'll need to edit the CPL to fit your needs, I just filled in a few values based on your original post, but with the script and admin guide it should get you started.

One thing I didn't think of is, depending on the source, you might have to change the unauthenticated-orgin to just orgin if the request is seen coming from an authenticated source.

I use the script to convert/format an IP address coming from Conductor to become a URI.

I did do that ;-)

 

One other thing I changed, was the source-url-for-message-replace attribute: Surely that should be \1, indicating that it's the saved portion of the source-url-for-message-regex (the as the regex & replace attribute pair)

 

In the diagnostic logs I can see:

 

Detail="CPL: <location...> rewrote source alias 00440123448605@192.168.0.1 to 00440123448605 "

 

I'll have to check what the other end is seeing.

 

Thanks,

 

GTG

Please rate all helpful posts.

The VCS diagnostic logs show the original address in the H.323 message, despite earlier log lines showing the address being re-written:

 

Sending RAS PDU:
 value RasMessage ::= locationRequest :
 {
   requestSeqNum 3847,
   destinationInfo
   {
     dialedDigits : "004401205"
   },
...
   bandWidth 7680,
   sourceEndpointInfo
   {
     h323-ID : "00440123448605@192.168.0.1"
   }
 }

 

I also checked with the other end, and they're still seeing "00440123448605@192.168.0.1" too.

GTG

Please rate all helpful posts.

So you're saying the VCS is changing the source address, but it's really not?

Thanks for sharing this CPL Script !

      I have the same problem, but in my situation I need to replace source domain_internal on SIP URI, to externals calls.. just only calls go to VCS-E .. for example:

source end point: 7xxx@domain_internal (CUCM -> VCS-C -> Microsoft Interop) OK !

source end point: 7xxx@domain_internal (CUCM -> VCS-E -> Internet) NOT OK
I need source domain internal replace to 7xxx@domain_External 'cause te internet can reply calls for me by the de VCS-E, calling to number@external_domain !

Can I user this script on VCS-C for replace domain just for calls to zone or neighbor VCS-E ?

*domain_internal -> replace *domain_external ?

I haven't tested it, but you can try and use the following.  Replace the taa:rule line with the one below, it will match calls originating from a particular zone, for example a traversal zone coming from a VCS-C.

<taa:rule originating-zone="TraversalZone" destination=".*">

You can also try to use (?!.*@internal.\domain$).* for the destination, which should match any address that doesn't use your internal domain.

Thanks so much.. I'll try it .. one question: Can I put this script on VCS-E too rather than VCS_C?

' Because calls to Skype for example .. I want to keep 70xx@Internal_domain !!

You should put the CPL on your VCS-E, since it is the last point before the call would leave your network, and you only want external calls to be altered. 

Something to keep in mind if you have any endpoints locally registered to your VCS-E, if you want the CPL to apply to them as well, you'll need to add another rule to match the zone they're registered to on the VCS, or you could use the taa:rule in the original CPL in this thread, however use (?!.*@internal.\domain$).* for the destination. 

Thanks for Reply !

My Endpoints are registered only on CUCM, I'll try this CPL script on VCS-E !

Thanks so munch !!!