Tuesday, 15 July 2014

Handling few International Dialing Formats to support CDRTool | Few popular International dialing formats handling for CDRTool

By vm  |  03:11 No comments

Handling few International Dialing Formats to support CDRTool  :        

                      if ($rU=~"\+[1-9][0-9]+") {
                                # User Dialed phone number in E164 format 
                                strip(1);
                                prefix("00");
                                $avp(can1)= $ru;
                                $avp(can_uri) = $ru;
                        } else if($rU=~"^00[1-9]+") {
                                # User Dialed phone number in UK  Int format 
                                xlog("L_INFO","00 UK Format, no need to do any changes");
                                $avp(can1)= $ru;
                                $avp(can_uri) = $ru;
                        } else if($rU=~"^011+") {
                                #user dialed number in 011 international format
                                xlog("L_INFO","011 format International Number strip 011, then prefix 00 ");
                                strip(3);
                                prefix("00");
                                $avp(can1)= $ru;
                                $avp(can_uri) = $ru;                    
                        } else if($rU=~"^[2-9]+") {
                                #  user dialed 10 digit US number, so add prefix("1")
                                xlog("L_INFO"," 10 digit US number add 001 before it ");
                                prefix("001");
                                $avp(can1)= $ru;
                                $avp(can_uri) = $ru;
                        } else if ($rU=~"^1[2-9]+") {
                                #  user dialed 11 digit US number, so add prefix 00
                                xlog("L_INFO"," 11 digit US number add 00 before it ");
                                prefix("00");
                                $avp(can1)= $ru;
                                $avp(can_uri) = $ru;
                        } else {
                                xlog("L_INFO","What format is this?  Lets print rU: $rU");
                        }

vm Author: vm

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

Related Posts

0 comments:

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles

© 2014 VOIP4Learn. WP themonic converted by Bloggertheme9. Powered by Blogger.