How Can I Dial Local Directory Service When A User Dials 411?
When a SIP user dials 411 we want replace the 411 portion of the R-URIi with their local area code and then append 5551212 to the R-URI.
So in our example if my SERi username is 4075660990 and I dial 411 then the R-URI will be transformed to 4075551212 - which is the local directory service.
Here is how we do it.
Line 1 stores the user in a temporary "variable" or AVP called i:34 which is been arbitrarily chosen.
Line 2 changes the request URI (R-URI) to be that of the header. This is how we get the area code portion of the local directory service.
Line 3 then removes the last 7 digits of the R-URI, which in our example leaves us with just sip:email@example.com
Line 4 now appends the numeric digits 5551212 to the request URI. This uses regular expression string replacment to perform its magic.
NOTE: There is an illegal space before the second ampersand in this example which should be removed - but it is included here for formatting purposes.
Line 5 then frees the resources that were previously allocated.