[cisco-voip] Privacy headers support

Robert Kulagowski rkulagow at gmail.com
Fri May 10 15:53:02 EDT 2013


On Mon, May 6, 2013 at 10:20 AM, Maciej Bylica <mbsip at gazeta.pl> wrote:
> It is working ... but i need to copy calling number from PAI and paste to
> new originated RPID or PAI.
>
> In other words...
> Incoming PAI:
> P-Asserted-Identity: <sip:222334455 at wog.pl;user=phone>
> Privacy: id
>
> Outgoing PAI
> now P-Asserted-Identity: "Anonymous" <sip:anonymous at 10.10.10.19>
> Privacy: id
> should be P-Asserted-Identity: "Anonymous" <sip:222334455 at 10.10.10.19>
> Privacy: id
>
> or Outgoing RPID:
> now Remote-Party-ID:
> "Anonymous"<sip:anonymous at 10.10.10.19>;party=calling;screen=no;privacy=full
> should be Remote-Party-ID:
> "Anonymous"<sip:222334455 at 10.10.10.19>;party=calling;screen=no;privacy=full
>
> As far as i know sip-profile unfortunately cannot copy any data from
> incoming dial-peer and use it in sip-profile acceptable on outgoing
> dial-peer only.
> Am i right?

I'm trying to determine the same thing. According to

http://www.cisco.com/en/US/products/sw/voicesw/ps5640/products_configuration_example09186a0080982499.shtml

Additional Configuration Notes

<snip>

Regular expression variables can be used to extract and store
parameters from an existing header, but the values stored in variables
in one rule can be used ONLY in the replace-pattern of the same rule;
it can NOT be used by any other rules, which means you cannot insert
the values extracted by one rule into another rule.

So now I'm looking at conditional SIP formatting, but it doesn't seem
to be working.

http://www.cisco.com/en/US/docs/ios/voice/cube/configuration/guide/vb-gw-sipsip.html#wp1462605

I've defined:
voice class sip-profiles 300
 request INVITE peer-header sip From copy "sip:(.*)@" u01
 request INVITE sip-header Remote-Party-ID add "Remote-Party-ID:
\"UNKNOWN\" <sip:\u01 at xx.xx.xx.xx>;party=calling;screen=yes;privacy=full"
!
voice class sip-copylist 1
 sip-header From

and then in the dial-peers:
dial-peer voice 1 voip
 preference 1
 destination-pattern 22....
 progress_ind setup enable 3
 progress_ind progress enable 8
 session protocol sipv2
 session target ipv4:xx.xx.xx.xx
 voice-class codec 1
 voice-class sip copy-list 1
 dtmf-relay rtp-nte
 fax-relay ecm disable
 ip qos dscp cs3 signaling
 no vad


dial-peer voice 40000 voip
 description Outbound SIP to Bandwidth.com
 destination-pattern +T
 session protocol sipv2
 session target dns:ot.bandwidth.com
 voice-class sip dtmf-relay force rtp-nte
 voice-class sip profiles 300
 dtmf-relay rtp-nte
 codec g711ulaw
 fax-relay ecm disable
 ip qos dscp cs5 media
 ip qos dscp cs4 signaling
 no vad


but what's getting sent out from CUBE is:
INVITE sip:+16307749821 at ot.bandwidth.com:5060 SIP/2.0
Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK4F1E7F
From: "Robert Kulagowski" <sip:223928 at xx.xx.xx.xx>;tag=54034C4-AE9
To: <sip:+16307749821 at ot.bandwidth.com>
Date: Fri, 10 May 2013 19:39:07 GMT
Call-ID: 1CE50BAF-B8E011E2-80BF8EE1-263D2AC2 at xx.xx.xx.xx
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE:  1800
Cisco-Guid: 0484652702-3101692386-2159644385-0641542850
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER,
SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1368214747
Contact: <sip:223928 at xx.xx.xx.xx:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Session-Expires:  1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 253
Remote-Party-ID: "UNKNOWN"
<sip:\u01 at xx.xx.xx.xx>;party=calling;screen=yes;privacy=full

The R-PID that I'm adding isn't expanding the \u01 into "223928"; it's
sending the literal "\u01", and that causes the other side to reject
my INVITE.

Anyone have this working? What am I missing about conditional SIP profiles?


More information about the cisco-voip mailing list