Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
strip part of caller ID
Author Message
desmondholt
Brekeke Newbie


Joined: 18 Aug 2016
Posts: 3
Location: Nashville

PostPosted: Thu Apr 06, 2017 7:00 am    Post subject: strip part of caller ID Reply with quote

1. Brekeke Product Name and Version: 3.5.2.8

2. Java version:7.79

3. OS type and the version:server 2008 R2

4. UA (phone), gateway or other hardware/software involved: Ascom phone system going through Rauland Gateway server (Brekeke installed on gateway server)

5. Your problem: I need to strip the bed number out of the caller ID. The information coming across (captured in wireshark) is area, room, bed and call - example: 3S-333_1 Water

I need to remove the _1 from the caller ID so the annunciation doesn't announce the bed number. I have tried for several hours and testing to get this to work with no luck. Below is my dial plan I tried last.

Matching Patterns
$request = INVITE
$registered = true
To = sip:44444@10.105.236.250
From = (.+)(_[0-9])(.+)

Deploy:
To=sip:%1@10.105.151.155
From=%1%3

Any help or advice is appreciated. I am pretty new to editing general expressions for dial plans, I have always just copied old ones to get things to work until now.

Thanks!

Adam Holt
Back to top
View user's profile Send e-mail
snuyzm
Brekeke Talented


Joined: 11 Feb 2015
Posts: 97

PostPosted: Mon Apr 10, 2017 12:46 pm    Post subject: Reply with quote

The reason your DialPlan doesn't work is because "To=" in Deploy Patterns pointed %1 even though "To=" in Matching Pattern doesn't have ().


Try this
Matching Patterns
$request = INVITE
$registered = true
To = sip:(44444)@10.105.236.250
$getdisplayname(From) = (.+)_[0-9]+(.+)
Deploy Patterns
To = sip:%1@10.105.151.155
From/displayname = %2%3
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1