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?
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Making ANI clean in SIP environment
1. How to make ANI simple
in SIP
environment
Pavel Růžička, February 2012
T-Mobile Czech Republic
2. 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?
2
Pavel Růžička, February 2012
T-Mobile Czech Republic
3. 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:00420603416974@10.245.155.2
follows scheme:
sip:user:password@host:port;uri-parameters?headers
3
Pavel Růžička, February 2012
T-Mobile Czech Republic
4. 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
4
Pavel Růžička, February 2012
T-Mobile Czech Republic
5. 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 00420603416974@10.11.0.2
5
Pavel Růžička, February 2012
T-Mobile Czech Republic
6. 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)
6
Pavel Růžička, February 2012
T-Mobile Czech Republic
7. 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
7
Pavel Růžička, February 2012
T-Mobile Czech Republic
8. 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
8
Pavel Růžička, February 2012
T-Mobile Czech Republic
9. 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
9
Pavel Růžička, February 2012
T-Mobile Czech Republic
10. 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"
10
Pavel Růžička, February 2012
T-Mobile Czech Republic
11. 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
11
Pavel Růžička, February 2012
T-Mobile Czech Republic
12. Pavel Růžička
Programmer – Analyst
Service Development Department
T-Mobile Czech Republic a.s.
Tomíčkova 2144/1, 149 00 Praha 4
T-Mobile: +420 603 416 974
E-Mail: pavel.ruzicka@t-mobile.cz
12
Pavel Růžička, February 2012
T-Mobile Czech Republic