Forums Read-only archive

Changing the FROM uri on deploy pattern

3 posts · Brekeke SIP Server Forum

britchey Original post
1. Brekeke Product Name and Version:

2. Java version:

3. OS type and the version:

4. UA (phone), gateway or other hardware/software involved:

5. Your problem: I am trying to strip characters from the "From" URI. The incoming call is from (example) 1*123*D. My matching pattern is
From=sip:(.+\*)(.+)\*(D)@(.+). I want to change the FROM URI to only deploy the 1*123.

I've tried Deploy pattern From=sip:%1%2@, but it does not work. Any help appreciated.
britchey
I was able to get it working using

[$request=^Invite, $getUri(From)=sip:(.+\*)(.+)\*(D)@]

[From/uri = sip:%1%2@ipaddress,$continue=true]
Niloc
Mine is like this.
[Matching Patterns]
$request = ^INVITE
$getSIPuser(From) = ^(\S+\*\S+)\*\S+

[Deploy Patterns]
From/uri/user = %1
$continue = true