1. Brekeke Product Name and version: 2.4.3.0/286
2. Java version: 1.6.0
3. OS type and the version: RHEL 2.6.18-164.10.1.el5xen
4. UA (phone), gateway or other hardware/software involved:
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
6. Your problem:
Hello All, I am looking for some documentation or a little how to on Diversion Headers. Here is what I am looking to do:
Customer calls one of 7000 phone numbers listed in the Yellow Pages. Our call statistics provider receives the call, captures call statistics and then reroutes the call to a single uri with the original called number in the diversion header.
I am almost certain they are doing it this way to prevent a nightmare in their dialplan. The issue is that I need to convert that number in the Diversion header to "TO:user@sip-server". This way my servers know what app to run.
Is it as simple as "Diversion="?
Is there any documentation covering Diversions? I have looked but I don't know if I am looking in the right place.
Thanks for any ideas.
Perry
Need help on how to read and route on Diversion Headers
Moderator: Brekeke Support Team
Thanks for the response. That is great information. What I want to do is read from the diversion header in the invite and then rewrite the header so that what is in the diversion header is now in the To: section.
I am all set up to try some things out so I am going to work on in based on your info.
Thanks again,
Perry
I am all set up to try some things out so I am going to work on in based on your info.
Thanks again,
Perry
After much reading and trial and error, I have finally figured this out. I would like to share just in case someone else is looking for this.
It actually doesn't have very much to do with Diversions other than the fact that they are a URI and I am getting the URI for Diversion and Replacing the URI for To.
Here's what mine looks like:
I hope this helps someone.
Thanks,
Perry
It actually doesn't have very much to do with Diversions other than the fact that they are a URI and I am getting the URI for Diversion and Replacing the URI for To.
Here's what mine looks like:
Code: Select all
[Matching Pattern]
$request=^INVITE
$geturi(Diversion)=sip:(.+)@Your.com
To=sip:14045551212
[Deploy Pattern]
$target=Your.com
To=sip:%1@your-sip-server.com
$replaceuri=true
Thanks,
Perry
Hi Perry,
Cool! Thank you for the info.
-------------------
[Matching Pattern]
$request = ^INVITE
$geturi(Diversion) = sip:(.+)@(.+)
To=sip:14045551212
[Deploy Pattern]
$target = %2
To = sip:%1@your-sip-server.com
$replaceuri = true
-------------------
This DialPlan rule can be used with any domain not only "Your.com".
Cool! Thank you for the info.
-------------------
[Matching Pattern]
$request = ^INVITE
$geturi(Diversion) = sip:(.+)@(.+)
To=sip:14045551212
[Deploy Pattern]
$target = %2
To = sip:%1@your-sip-server.com
$replaceuri = true
-------------------
This DialPlan rule can be used with any domain not only "Your.com".