Dial Plan-Match on 2 Variables

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
tlsoren
Posts: 38
Joined: Wed Feb 15, 2012 8:54 am
Location: Raleigh, NC

Dial Plan-Match on 2 Variables

Post by tlsoren »

1. Brekeke Product Name and Version: 3.14.5.17/563.2

2. Java version: 11.0.15

3. OS type and the version: Server 2012R2

4. UA (phone), gateway or other hardware/software involved: R5 Alerts out via SIP to Middleware

5. Your problem: Looking for Dial Plan Assistance. I need to add 3 new dial rules to 3 existing Dial rules to match of off 2 variables within the SIP Header, and replace one of those variables in the Deploy, and keep he existing rules active.

Existing Dial Plan Example:
Matching: Deploy:
$Request=^Invite To=sip%1@10.10.10.10
$registered=false
To=sip:(8888)@

New rule needs to Match on 8888 destination and also match on if SIP Header contains the string GGGxx. In the deploy, we still send to 8888 and also replace GGGxx string with GGG in the SIP Header.

I am not sure of the syntax to match on 2 variables, and how to replace the GGGxx part in the deploy.

Thank you in advance for any assistance.
TLS
tlsoren
Posts: 38
Joined: Wed Feb 15, 2012 8:54 am
Location: Raleigh, NC

Post by tlsoren »

This what we have created to try.

Matching: Deploy:
$Request=^Invite To=sip%1@10.10.10.10
$registered=false From=GGG
To=sip:(8888)@
From=GGGxx

Not sure if if the Deploy will replace the whole From Header, we just need it to replace GGGxx with GGG

An input would be appreciated. We cannot test this unfortunately until a test on the live system is scheduled.

Issue: New rule needs to Match on 8888 destination and also match on if SIP Header contains the string GGGxx. In the deploy, we still send to 8888 and also replace GGGxx string with GGG in the SIP Header.
TLS
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

Can you try the DialPlan rule like this?
========================
[Matching Patterns]
$request = ^INVITE
$registered = false
To = sip:(8888)@
$getdisplayname(From) = GGGxx

[Deploy Patterns]
To = sip:%1@10.10.10.10
From/displayname = GGG
========================
tlsoren
Posts: 38
Joined: Wed Feb 15, 2012 8:54 am
Location: Raleigh, NC

Post by tlsoren »

Thank you Laurie! We will have testing scheduled tomorrow and I will update the results.

We also just got an additional request from the customer, to Match on the incoming dial back destination string 50* (To) and replace that string before deploying to 150*

Using your help in the dial plan above, I have created this rule. Please let me know if it looks good.

Matching: Deploy:
$addr = ^192\.168\. To = sip%1@10.10.10.10
$Request = ^Invite To/displayname = 150*
To=sip:(.+)@
$getdisplayname(To) = 50*
TLS
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

If it is a dialed number, you don't have to use a displayname.
==============
[Matching Patterns]
$request = ^INVITE
$addr = ^192\.168\.
To = sip:50\*(.+)@

[Deploy Patterns]
To = sip:150\*%1@10.10.10.10
==============
tlsoren
Posts: 38
Joined: Wed Feb 15, 2012 8:54 am
Location: Raleigh, NC

Post by tlsoren »

Hello Laurie,

We tested this outbound dial plan, and it failed.
[Matching Patterns]
$request = ^INVITE
$registered = false
To = sip:(8888)@
$getdisplayname(From) = GGGxx

[Deploy Patterns]
To = sip:%1@10.10.10.10
From/displayname = GGG

The Invite did Match to the rule, and did strip away the xx, but it also stripped away the rest of the information in the From. We were only looking to Match on GGGxx, and replace with GGG while keeping the rest of the From field intact.

Here is the From field for these Alert prior to hitting the rule:
From: GGGxxC556_1 Patient<sip:R5_RGS@10.68.32.41:5060> ;tag=1db25e65-66995d8a-1c95ed-62b1748-2020440a-13c4-759
SIP from display info: 5GJxxC556_1 Patient

Here is the From after hitting the above rule:
From: "GGG" <sip:R5_RGS@10.68.32.41:5060>;tag=b18f865e4s
SIP from display info: "5GJ"

Can you help with matching to GGGxx, but only replacing it to GGG and keeping the rest of the From intact?
TLS
tlsoren
Posts: 38
Joined: Wed Feb 15, 2012 8:54 am
Location: Raleigh, NC

Post by tlsoren »

I had a typo in that last post, here is the correct overview:

Here is the From field for these Alert prior to hitting the rule:
From: GGGxxC556_1 Patient<sip:R5_RGS@10.68.32.41:5060> ;tag=1db25e65-66995d8a-1c95ed-62b1748-2020440a-13c4-759
SIP from display info: GGGxxC556_1 Patient

Here is the From after hitting the above rule:
From: "GGG" <sip:R5_RGS@10.68.32.41:5060>;tag=b18f865e4s

Can you help with matching to GGGxx, but only replacing it to GGG and keeping the rest of the From intact?SIP from display info: "GGG"
TLS
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

How about this?
=============
[Matching Patterns]
$request = ^INVITE
$registered = false
To = sip:(8888)@
$getdisplayname(From) = GGGxx(.+)

[Deploy Patterns]
To = sip:%1@10.10.10.10
From/displayname = GGG%2
=============
Post Reply