[cisco-voip] What's the best way to emulate "clid restrict" on a SIP trunk?

Robert Kulagowski rkulagow at gmail.com
Tue Jun 18 11:24:10 EDT 2013


OK, between me and TAC we were able to get this to work, but it wasn't easy.

To wit: I want to take a header on the INVITE coming from Call Manager
into CUBE, rewrite it, and put that into the outgoing INVITE.

What we found was that there's a few different ways to accomplish
this. If I set "Restricted" on the route pattern in CUCM, and add
"remote party id" in sip-ua on CUBE, it could work. But the issue is
that during the ring out, the phone displays "To: Private" and that's
too big a leap for our users. We also wanted to do any manipulation on
the CUBE, so that if CUBE is down or busy that PRIs could be used for
overflow without needing to reprogram a whole bunch of dial-peers on
other devices.

I needed to set a Remote Party ID because that will show up in the
billing report from my provider, so that I can do proper internal
billback. But I don't want to send the calling party number to the
called party.

The other issue is that SIP Conditional Header rewrites don't work
quite the way you expect. You can't do an "add" with a copied
variable; instead you need to add a header with a bogus value, and
then do a modify on it. If you try to do an add with something copied
from another dial-peer, what you get is the literal "u01" in the
header instead of the value that it's holding. Smells like a bug,
because doing an add/modify seems like a kluge.

voice class sip-copylist 10
 sip-header Remote-Party-ID
! What we're going to copy from the CUCM; it is applied to the
dial-peer from the CUCM

voice class sip-profiles 999
! CUCM sends us 6 digit calling party. Put that into "u01"
 request INVITE peer-header sip Remote-Party-ID copy "<sip:(......)" u01

! Here's the added header, but with a fake "number" field for the
calling party. We add the privacy part. ip.add.re.ss is a real IP but
replaced in the example
 request INVITE sip-header Remote-Party-ID add "Remote-Party-ID:
\"UNKNOWN\" <sip:number at ip.add.re.ss>;party=calling;screen=yes;privacy=full"

! Here we take the header that we just added and do a modify on it.
Take "fake number at ip" and replace it with 4 0's and the 6-digit
calling party so that we send 10 digits to the provider
 request INVITE sip-header Remote-Party-ID modify
"<sip:(number at ip.add.re.ss)>" "<sip:0000\u01 at ip.add.re.ss>"


On the dial peers:
dial-peer voice 1 voip
! Incoming dial-peer from CUCM; it's going to be a 6-digit extension
 destination-pattern ^[2-4].....$
 progress_ind setup enable 3
 progress_ind progress enable 8
 session protocol sipv2
 session transport tcp
 voice-class codec 1
 voice-class sip copy-list 10
 dtmf-relay rtp-nte
 fax-relay ecm disable
 ip qos dscp cs3 signaling
 no vad

Outgoing dial-peer
dial-peer voice 10000 voip
 description Outbound SIP to Bandwidth.com
 translation-profile outgoing SIP-OUT
 destination-pattern 8T
 session protocol sipv2
 session target dns:ot.bandwidth.com
 voice-class sip dtmf-relay force rtp-nte
 voice-class sip profiles 999
 dtmf-relay rtp-nte
 codec g711ulaw
 ip qos dscp cs5 media
 ip qos dscp cs4 signaling
 no vad


More information about the cisco-voip mailing list