Forums Read-only archive

Stripping Lead 1 on Inbound Calls

3 posts · Brekeke SIP Server Forum

ajlindy Original post
1. Brekeke Product Name and Version: 3.9.4.3/517-1

2. Java version: 1.8.0_231

3. OS type and the version: Win 2k12 R2 64-bit

4. UA (phone), gateway or other hardware/software involved: Unknown (I don't maintain)

5. Your problem:
I think I have it, but before I go messing with a production environment I'd like to be sure.

I want to take any inbound call that hits this proxy and matches a certain pattern to strip the Lead 1 before it goes to the next machine.

Matching Patterns

$request = ^INVITE
To = sip(.+)@
From = 1(..........)@
$addr = <list of addresses>

Deploy Patterns

$b2bua = true
$To = sip:%1@<specifically different IP:5060>
From = %2@%3
$replaceuri.from = true


And I want to test this specifically with a single phone I will be using to call inbounds, so I think I can make a Dialing Plan rule that has a higher priority than my catch-all inbound rules and make this:

Matching Patterns
From = 1(5551112233)@

That way, if I screw something up only inbound calls from my own phone will be messed up and the other inbounds will not be touched.

Right?
Harold
Do you want to strip the lead 1 from the From-URI?

[Matching Patterns]
$request = ^INVITE
From = sip:1(5551112233)@
$addr = <list of addresses>

[Deploy Patterns]
From/uri/user = %1
To/uri/host = <specifically different IP:5060>
$b2bua = true
ajlindy
Yes, I want any phone call that hits the SIP Proxy with an 11-digit caller ID (and they all have that, and they all start with 1) to strip the 1 before sending the call to our contact platform (aka dialer), so that it's only the normal 10-digit ANI that our agents see.

Thank you! I'll test with a personalized dial plan right now.