If header exists, modify it

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

If header exists, modify it

Post by mbylica »

1. Brekeke Product Name and version:
BSS, 2.4.8.6

2. Java version:
1.6.0_25

3. OS type and the version:
linux centos 5.5

4. UA (phone), gateway or other hardware/software involved:
doesn't matter

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
Pattern 9

6. Your problem:
I would like to make some modifications on Remote-Party-ID header.
The problem i have just encountered is that if incoming SIP request does not have RPID header, then the rule is omited.
Is there any way to check if Remote-Party-ID header exists among sip invite headers. If it exists then i should be able to modify it (add prefix or so). Otherwise no RPID should be added.

I was playing around with $math.gt as well as $str.equals but without success.

Could sb advice how to create such pattern?
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

Does the following meet the requirement??

Put this in the top of dialplan rule list.
-------------------------
[Matching Patterns]
$request = ^INVITE
Remote-Party-ID = (.+)

[Deploy Patterns]
Remote-Party-ID = Prefix%1
$continue = true
-------------------------
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

Post by mbylica »

Thanks for prompt answer.
I guess that your config should be ok - I missed continue in my previous tests :)

I am about to put this in my dialplan and give you feedback later here.
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

Have a fan :-)
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

Post by mbylica »

Laurie wrote:Have a fan :-)
It works fine, thx again.
Post Reply