Author |
Message |
skb007 Brekeke Guru
Joined: 05 Oct 2015 Posts: 152
Location: USA
|
Posted: Thu Apr 30, 2020 10:32 am Post subject: How to extract the Dialed Number From INVITE header |
|
|
1. Brekeke Product Name and Version:3
2. Java version:1.8
3. OS type and the version:RHEL7
4. UA (phone), gateway or other hardware/software involved:NA
5. Your problem:
I am receiving different digits in INVITE and TO header. I would like to extract the phone number from the INVITE field instead of the To header.
INVITE sip:8005551212@10.10.10.10:5060;user=phone SIP/2.0
How do I extract 8005551212 into "%1" variable? |
|
Back to top |
|
Tata Brekeke Master Guru
Joined: 27 Jan 2008 Posts: 223
|
Posted: Thu Apr 30, 2020 3:09 pm Post subject: |
|
|
Use $request variable in the Matching Patterns
https://docs.brekeke.com/sip/request
For example,
Matching Patterns | $request = ^INVITE $request = sip:(.+)@
|
|
|
Back to top |
|
skb007 Brekeke Guru
Joined: 05 Oct 2015 Posts: 152
Location: USA
|
Posted: Thu Apr 30, 2020 3:20 pm Post subject: |
|
|
Thanks for your reply.
I was doing trial and error and it got it working with
$request = INVITE sip:(.+)@ |
|
Back to top |
|
|