Author |
Message |
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Fri Jul 12, 2013 8:55 am Post subject: To modify sip headers |
|
|
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 |
|
Beenie Brekeke Member
Joined: 28 Jul 2008 Posts: 10
|
Posted: Fri Jul 12, 2013 10:50 am Post subject: |
|
|
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 |
|
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Sun Jul 14, 2013 9:16 am Post subject: |
|
|
Thanks Beenie for the hint.
I have narrowed the messages down and applied the rule.
Thanks. |
|
Back to top |
|
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Thu Aug 08, 2013 1:14 pm Post subject: |
|
|
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 |
|
ambrosio Brekeke Master Guru
Joined: 27 Mar 2008 Posts: 215
|
Posted: Thu Aug 08, 2013 9:58 pm Post subject: |
|
|
Session Plugin API can manipulate any SIP packets and any SIP headers. |
|
Back to top |
|
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Sat Aug 10, 2013 4:37 am Post subject: |
|
|
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 |
|
ambrosio Brekeke Master Guru
Joined: 27 Mar 2008 Posts: 215
|
Posted: Sat Aug 10, 2013 11:20 pm Post subject: |
|
|
DialPlan doesn't allow to catch PRACK, ACK, CANCEL and BYE.
Do you have any reason to modify BYE? |
|
Back to top |
|
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Mon Aug 12, 2013 11:49 am Post subject: |
|
|
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 |
|
ambrosio Brekeke Master Guru
Joined: 27 Mar 2008 Posts: 215
|
Posted: Tue Aug 13, 2013 9:18 am Post subject: |
|
|
How do you want to strip the Contact header? |
|
Back to top |
|
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Tue Sep 03, 2013 9:03 am Post subject: |
|
|
If i could catch BYE request then i may just simply remove Contact header...
Contact=
in deploy pattern |
|
Back to top |
|
|