Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Adaptation in SMGR to correct SIP Diversion Header

Status
Not open for further replies.

learningSkype

IS-IT--Management
Jun 6, 2016
213
US
morning all, as usual I have the hardest task hitting me and this one is super fun.

if you can help, much appreciated:

so we switched carriers from AT&T to Lumen. most of our DID calls are working fine but we have this one little issue where some callers can't reach our DID's. what we discovered is that the call is hitting our SBC with a diversion header and then going to ASM which tries to route the call to a station, VDN, other.

the problem is that when the call has a Diversion header included, the phone number in the To: section of the SIP messaging has the wrong information. example, the Invite shows phone # 2103459933 but the To section shows 3324409944.

really weird.

so we called Lumen and complained and Lumen said that the call is correct, the problem is that Avaya needs to route the call based on RURI. but I don't know how to do that...I know that the Adaptation can be tweaked for incoming and outgoing calls but how do I tell SMGR to look at the RURI versus the To: field?

I know that any Adaptation can have parameters changed but I don't know which one would do the trick:

fromto
adaptForeignURI
iRHdrs
eRHdrs

does anyone know how to fix this or seen this before? how did you resolve?



 
That's weird.

On my PBX, let's say A is CFWD to B. Outsider C calls A and the call should hit the the SBC with a Request URI and To: header of B and a P-Asserted-Identity of B's DID and a Diversion header of A's DID.
My carrier won't let that pass, so, this script replaces it.
That says "Where a diversion header is present, put it in the PAI."


p330 for what the parameters do:

But regardless, they'd only match the adaptarion. If I'm understanding your example correctly, the call with R-URI 2103459933 and To: 3324409944 is being processed by SM as being "to" 3324409944 and it should be for 2103459933. is that correct? I'd bug Avaya, The way I read the admin doc, I'd think it should be based on the R-URI as well.

So taking that Avaya script for my example - If a diversion is present, use that diversion for FROM. Let's see if this does what I think you want: If a diversion is present, use the "to" header in the "request URI"
Code:
within session "ALL"

{
  act on message where %DIRECTION="INBOUND" and %ENTRY_POINT="PRE_ROUTING"
    {
   if(exists(%HEADERS["Diversion"][1]))then
     {
      %HEADERS["FROM"][1].URI.USER = %HEADERS["Diversion"][1].URI.USER;  
     
      }
    }
}

I would instead try this on the Lumen side:

Code:
within session "ALL"

{
  act on message where %DIRECTION="INBOUND" and %ENTRY_POINT="PRE_ROUTING"
    {
   if(exists(%HEADERS["Diversion"][1]))then
     {
      %HEADERS["Request_Line"][1].URI.USER = %HEADERS["To"][1].URI.USER;  
     
      }
    }
}

I cobbled it together with page 528 of this:
Showing that you can replace the URI.USER part of a Request Line.
 
where are you doing this script writing? I can't write a script for SMGR. it's all GUI based.
 
ok I don't have an Avaya SBC. my SBC is Ribbon and I don't have the expertise to write scripts for Ribbon.

now, I'll look at the Avaya documentation to see what I can use, if any of it, thanks.
 
Ribbon (Sonus) has a way to do header manipulation. You will need someone that is well versed in how to program it. It's very easy (Read-hazardous to call delivery of ALL calls) to mess up manipulating headers in a Sonus SBC so you will need to engage someone who knows what they are doing.
 
New R8 SMGR can do Regex Adaptations. That could also help you. It’s not easy but once you understand it, you can do a lot!

Freelance Certified Avaya Aura Engineer

 
yes I found about Regular Expressions in Routing but all your Session Managers have to be on the same version and we have 8 ASM's, four of them are running version 8.0.1 while the other four are running version 6.3.

bcos of the four servers running on version 6.3, I can't turn on Regular Expressions... :(

sucks to be me right now...
 
I've decided to have my SBC guy look into fixing this via the SBC headers or config.

in the interim, does anyone know if you can use Wildcards in either Adaptations or in a Dial Pattern?

example:

if I create an entry for 302-xxx-xxxx and strip all 10 digits, can I then send it to just any extension instead of to a proper 5-digit number?
 
You have a Ribbon SBCE, right? I can’t tell, sorry. And I understand about the regex adaptations.

Freelance Certified Avaya Aura Engineer

 
Yes, wildcards are allowed in Dial Patterns for sure. I've never used them in Adaptations. If you go to dial patterns on your SMGR just click the little "Help" link in the upper right corner for explanations of what characters are allowed.
 
Yes, we do this with adaptations at various levels

Once an adaptation finds a match it will then action so if you create one for

302 -- delete 10 digits -- insert "extn number"

As soon as it sees a DDI that starts with 302 it will activate and delete/insert the digits you want.

We use this for specific 11 digit DDIs and convert them to 5 digit extn numbers and for a range i.e we used to have a DDI range on 02380-443800>443999 on an old system, we now just send those calls to a generic admin hunt group

02380443 -- delete 11 digits -- insert 12345 (hunt group)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top