Change calling number over SIP trunk

Many SIP trunk providers will require you to send outbound caller-id as a number within the range of DID numbers assigned to your trunk; however, a few providers will allow you to change the caller-id to any number by inserting what’s referred to as “Screened Telephone Number (STN)” into the p-asserted-id SIP header field. The p-asserted-id header typically contains the same info as the &#60FROM&#62 header. Using SIP profiles on our CUBE router, we can modify the p-asserted-id header to insert the STN which associates the call to the correct billing account and e911 location thereby prompting the carrier to pass through the info in the &#60FROM&#62 header as “Unscreended ANI”.

In this case, the original unscreened ANI is inserted using the External Number Mask assigned to the directory number in Unified Communications Manager, or via the External Number Mask on the Route Pattern, or Route List, also in Communications Manager.

The code snippet below will inform the carrier to allow the outbound ANI of 8885551212 because we’re replacing the default p-asserted-id associated to the call with our carrier defined STN of 8165551212.
request INVITE sip-header P-Asserted-Identity modify "<sip:8889991212@(.*)>" "<sip:8165551212@>"

Follow the steps below to configure a SIP profile and associate it to an outbound dial peer.

Prior to configuring the SIP profile on the CUBE router, you must enable p-asserted-id on the SIP trunk in Communications Manager.

1. Configure a SIP profile on the CUEBE route to define the p-asserted-id header info.
NOTE: The first SIP address below (“&#60sip:8889991212@(.*)&#62”) in the INVITE header is the original p-asserted-id field received by CUBE from UCM. The second SIP address (“&#60sip:8165551212@”) is the STN we want to inject into the header in place of the original address.

voice class sip-profiles 1
request INVITE sip-header P-Asserted-Identity modify "<sip:8889991212@(.*)>" "<sip:8165551212@>"

2. Assign the SIP Profile to the appropriate outbound dialpeer:

dial-peer voice 91001 voip
description * ALL CALLS TO SIP TRUNK *
preference 1
destination-pattern 9T
session protocol sipv2
session target sip-server
voice-class sip profiles 1
dtmf-relay rtp-nte
no vad

UCM 8.5(1), IOS CUBE 15.1(3)T, Verizon SIP Trunk