To modify sip headers

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

To modify sip headers

Post by mbylica »

1. Brekeke Product Name and version:
BSS, 2.4.8.6, 3.1.7.8

2. Java version:
1.6.0_25, 1.6.0_45

3. OS type and the version:
linux centos 5.5

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

5. Your problem:
Could BSS modify SIP headers that are a part of non-INVITE messages?
In other words, i would like to modify some headers in OK message that is within the sip dialog.

I tried with $request and $response but without any success.

Thanks in advance for any hint.
Beenie
Posts: 10
Joined: Mon Jul 28, 2008 10:30 am

Post by Beenie »

Put _ in the front of the header name in DeployPatterns.
It means for a response packet.

If the header name is "Test", you need to put "_Test" in DeployPatterns.
Let you try.
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

Post by mbylica »

Thanks Beenie for the hint.
I have narrowed the messages down and applied the rule.

Thanks.
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

Post by mbylica »

Hello,

One more question has just crossed my mind.
How can i modify some headers but only inside BYE message?
The rest of sip messages should be left unchanged.

I know that BYE is mid-session request and dialplan matched only requests which have unique Call-ID, thereby i cannot use:
request=^BYE in this case.

Is there any wayout here? (i need to strip Contact header in BYE request).

Thx in advance
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

Session Plugin API can manipulate any SIP packets and any SIP headers.
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

Post by mbylica »

right, but following settings should work:

Matching Patterns
Call-ID=(.+)@10.10.10.5
CSeq=(.+)BYE

Deploy Patterns
_X-Test=test
$continue=true

but new header is not incorporated into BYE that is passing through BSS.
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

DialPlan doesn't allow to catch PRACK, ACK, CANCEL and BYE.

Do you have any reason to modify BYE?
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

Post by mbylica »

Yes i need to strip Contact header there.
Some of softswitches are using this header without any reason, which is a problem in my case.
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

How do you want to strip the Contact header?
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

Post by mbylica »

If i could catch BYE request then i may just simply remove Contact header...

Contact=

in deploy pattern
Post Reply