Author |
Message |
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Tue May 22, 2012 4:37 pm Post subject: If header exists, modify it |
|
|
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/networkpatterns.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? |
|
Back to top |
|
Laurie Brekeke Master Guru
Joined: 07 Jan 2008 Posts: 245
|
Posted: Tue May 22, 2012 6:41 pm Post subject: |
|
|
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 |
|
|
Back to top |
|
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Wed May 23, 2012 9:25 am Post subject: |
|
|
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. |
|
Back to top |
|
Laurie Brekeke Master Guru
Joined: 07 Jan 2008 Posts: 245
|
Posted: Wed May 23, 2012 1:40 pm Post subject: |
|
|
Have a fan |
|
Back to top |
|
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Sun May 27, 2012 2:47 pm Post subject: |
|
|
Laurie wrote: |
Have a fan |
It works fine, thx again. |
|
Back to top |
|
|