Author |
Message |
gary_d Brekeke Newbie
![](images/spacer.gif)
Joined: 16 Nov 2023 Posts: 3
|
Posted: Fri Nov 17, 2023 1:42 am Post subject: Strip square brackets in Via/received for ipv6 REG response |
|
|
1. Brekeke Product Name and Version:
3.14.3.5/560
2. Java version:
OpenJDK 64-Bit Server VM 11.0.20
3. OS type and the version:
Ubuntu Linux
OS verion 5.4.0-163-generic
OS architecture amd64
4. UA (phone), gateway or other hardware/software involved:
TG2492 cable modem
5. Your problem:
During registration CM SIP Parser gets SIP/2.0 200 OK response from BSS with the following Via header
Code: |
Session Initiation Protocol (200)
Status-Line: SIP/2.0 200 OK
...
Message Header
Via: SIP/2.0/UDP [3005:3003:100::d10f]:5060;branch=z9hG4bK-a3a0d-27f2c43a-4ad98d86;received=[2001:580:2f1b:317::20] |
and fails to parse square brackets in
Code: |
received=[2001:580:2f1b:317::20] |
Can I strip square brackets in received=[ipv6] param via Dial Plan rules or other? Could you provide a match/deploy pattern example? |
|
Back to top |
|
Tata Brekeke Master Guru
![](images/spacer.gif)
Joined: 27 Jan 2008 Posts: 223
|
Posted: Fri Nov 17, 2023 6:01 pm Post subject: |
|
|
Try DialPlan rule like this.
Matching Patterns | $request = ^REGISTER $addrtype = 6 $param(Via,"received") = \[(.+)\] $removeparam(Via,"received") = (.+)
| Deploy Patterns | Via = %2;received=%1 $continue = true
|
|
|
Back to top |
|
gary_d Brekeke Newbie
![](images/spacer.gif)
Joined: 16 Nov 2023 Posts: 3
|
Posted: Sun Nov 19, 2023 8:56 pm Post subject: |
|
|
It just works. Thanks a lot. |
|
Back to top |
|
gary_d Brekeke Newbie
![](images/spacer.gif)
Joined: 16 Nov 2023 Posts: 3
|
Posted: Thu Nov 23, 2023 6:07 am Post subject: |
|
|
Tata wrote: |
Try DialPlan rule like this.
Matching Patterns | $request = ^REGISTER $addrtype = 6 $param(Via,"received") = \[(.+)\] $removeparam(Via,"received") = (.+)
| Deploy Patterns | Via = %2;received=%1
$continue = true |
|
Hello. A bit more on topic. Brackets in "received" param also live in status messages like 100 Trying/180 Ringing. Is there a way to strip them there too? |
|
Back to top |
|
|