Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
To modify sip headers
Author Message
mbylica
Brekeke Addict


Joined: 16 May 2011
Posts: 41
Location: Poland

PostPosted: Fri Jul 12, 2013 8:55 am    Post subject: To modify sip headers Reply with quote

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.
Back to top
View user's profile
Beenie
Brekeke Member


Joined: 28 Jul 2008
Posts: 10

PostPosted: Fri Jul 12, 2013 10:50 am    Post subject: Reply with quote

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.
Back to top
View user's profile
mbylica
Brekeke Addict


Joined: 16 May 2011
Posts: 41
Location: Poland

PostPosted: Sun Jul 14, 2013 9:16 am    Post subject: Reply with quote

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

Thanks.
Back to top
View user's profile
mbylica
Brekeke Addict


Joined: 16 May 2011
Posts: 41
Location: Poland

PostPosted: Thu Aug 08, 2013 1:14 pm    Post subject: Reply with quote

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
Back to top
View user's profile
ambrosio
Brekeke Master Guru


Joined: 27 Mar 2008
Posts: 215

PostPosted: Thu Aug 08, 2013 9:58 pm    Post subject: Reply with quote

Session Plugin API can manipulate any SIP packets and any SIP headers.
Back to top
View user's profile
mbylica
Brekeke Addict


Joined: 16 May 2011
Posts: 41
Location: Poland

PostPosted: Sat Aug 10, 2013 4:37 am    Post subject: Reply with quote

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.
Back to top
View user's profile
ambrosio
Brekeke Master Guru


Joined: 27 Mar 2008
Posts: 215

PostPosted: Sat Aug 10, 2013 11:20 pm    Post subject: Reply with quote

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

Do you have any reason to modify BYE?
Back to top
View user's profile
mbylica
Brekeke Addict


Joined: 16 May 2011
Posts: 41
Location: Poland

PostPosted: Mon Aug 12, 2013 11:49 am    Post subject: Reply with quote

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.
Back to top
View user's profile
ambrosio
Brekeke Master Guru


Joined: 27 Mar 2008
Posts: 215

PostPosted: Tue Aug 13, 2013 9:18 am    Post subject: Reply with quote

How do you want to strip the Contact header?
Back to top
View user's profile
mbylica
Brekeke Addict


Joined: 16 May 2011
Posts: 41
Location: Poland

PostPosted: Tue Sep 03, 2013 9:03 am    Post subject: Reply with quote

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

Contact=

in deploy pattern
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