12
Pavel Růžička, February 2012 T-Mobile Czech Republic How to make ANI simple in SIP environment

Making ANI clean in SIP environment

Embed Size (px)

DESCRIPTION

Are you upgrading your media platform to use SIP? Don't you want to see a long SIP ANI in Logs, Control Center, Infostore etc. ? Would you like to revert the SIP ANI format to the old number format? Do you want to make SIP ANI format compatible with the old one which is just MSISDN?

Citation preview

Page 1: Making ANI clean in SIP environment

Pavel Růžička, February 2012T-Mobile Czech Republic

How to make ANI simplein SIP environment

Page 2: Making ANI clean in SIP environment

2

Pavel Růžička, February 2012T-Mobile Czech Republic

The classic ANI is not the SIP ANI?

•Are you upgrading your media platform to use SIP?

•Don't you want to see a long SIP ANI in Logs, Control Center, Infostore etc. ?

•Would you like to revert the SIP ANI format to the old number format?

•Do you want to make SIP ANI format compatible with the old one which is just MSISDN?

Page 3: Making ANI clean in SIP environment

3

Pavel Růžička, February 2012T-Mobile Czech Republic

What has happened to the value of ANI in SIP environment?

•In SIP environment the value of ANI uses format of SIP URI•SIP URI is more complex than just simple number known from the classic ANI

•Classic ANI: 00420603416974•SIP URI: sip:[email protected]

follows scheme:sip:user:password@host:port;uri-parameters?headers

Page 4: Making ANI clean in SIP environment

4

Pavel Růžička, February 2012T-Mobile Czech Republic

Parse SIP URI – is the ANI in SIP form?•First of all it is good to know if ANI looks like SIP URI

•STARTSWITH function tells us if yes – if it begins with "sip:" part

Page 5: Making ANI clean in SIP environment

5

Pavel Růžička, February 2012T-Mobile Czech Republic

Parse SIP URI – cut sip: scheme

•Secondly we need to remove "sip:" prefix from the original ANI•MID function gives us the rest of the string without first 4 chars•then we have something like [email protected]

Page 6: Making ANI clean in SIP environment

6

Pavel Růžička, February 2012T-Mobile Czech Republic

Parse SIP URI – username & password

•Then we need to extract the user & password part•PREFIX function gives us everything before @•then we have 00420603416974 or 00420603416974:SomePassword (if it contains a password)

Page 7: Making ANI clean in SIP environment

7

Pavel Růžička, February 2012T-Mobile Czech Republic

Parse SIP URI – is there a password?

•It's good to be sure that there is no password in the part of the ANI before @

•FIND function tells us if there is ":" in it

Page 8: Making ANI clean in SIP environment

8

Pavel Růžička, February 2012T-Mobile Czech Republic

Parse SIP URI – cut password

•If it contains password we need to extract username only•CONDITIONAL function returns whole extracted string before @ or the exctracted part before ":"•then we finally have clean number 00420603416974 without any other parts

Page 9: Making ANI clean in SIP environment

9

Pavel Růžička, February 2012T-Mobile Czech Republic

Revert SIP form of ANI to a simple number•Since the ANI is internally maintained in session we can "hack" it's value

•SESSION function will overwrite the internal value of ANI to the classic number value•the precondition defines that the "hack" will be applied only when ANI contains sip: URI

Page 10: Making ANI clean in SIP environment

10

Pavel Růžička, February 2012T-Mobile Czech Republic

Revert SIP form of ANI in the first dialog step

•Put the "hack" expression at the very beginning of your starting module

•to ensure it is processed in the first dialog step•then ANI in the classic form will be used for system logging, tracing...

•as you can see on the picture bellow – in the first call in the same environment but with the "hack"

Page 11: Making ANI clean in SIP environment

11

Pavel Růžička, February 2012T-Mobile Czech Republic

Summary

• Create a special expression that "hacks" the internal ANI value in the session to the old MSISDN form

• It is the best when you put the expression to a library and make it available to all of your applications

• You can use the same approach to the value of DNIS that is also affected in SIP environment

• Here is a source code of the expression ANI_As_SIP_URI_S

et_ANI_As_MSISDN.xml

Page 12: Making ANI clean in SIP environment

12

Pavel Růžička, February 2012T-Mobile Czech Republic

Pavel RůžičkaProgrammer – AnalystService Development Department

T-Mobile Czech Republic a.s.Tomíčkova 2144/1, 149 00 Praha 4T-Mobile: +420 603 416 974E-Mail: [email protected]