×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    30

    Dailed Number Is Correct Or Not

    Hai Friends,

    Is There Any API In CTelephony To Know Whether The Dailed Number Is A Valid Number Or Not Before EStatusConnecting(i.e Before Ringing)

    (Somewhere I Read That EStatusConnecting Means Ringing When Dailed By Us.
    I Know EStatusRinging Means Incoming Call).

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Dailed Number Is Correct Or Not

    No there is no API which will really tell you whether the number you are attempting to dial is correct or not, precisely because there is no way the API would know whether the number is correct or not.

    Cheers,
    Mayank

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: Dailed Number Is Correct Or Not

    You can read about numbering plans on Wikipedia: http://en.wikipedia.org/wiki/Telephone_numbering_plan, but generally speaking your requirement can not be satisfied.

  4. #4
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    51

    Re: Dailed Number Is Correct Or Not

    CTelephony To Know Whether The Dailed Number Is A Valid Number Or Not
    you can provide your own function for checking the number is a valid or not according to your requirement.
    e.g

    Code:
    void CMyClass::Call(const TDesC& aMSISDN,TBool aPreservePrefixPlus)
    {
    	 if(aMSISDN.Length() > CTelephony::KMaxTelNumberSize)   //To check the length of telephone number
    		 User::Leave(KErrArgument);
    
    //To check the Number ...
    
    	HBufC *hbuffer=HBufC::NewLC(aMSISDN.Length());
    	TPtr buffer(hbuffer->Des());
    	for(TInt i=0;i<aMSISDN.Length();i++)
    		 { TChar ch(aMSISDN[i]);
    		   if(ch.IsDigit() || (aPreservePrefixPlus &&0==i&&ch=='+'))
    			   buffer.Append(ch);
    		 }
    
    // or any other Digit pattern you want to check in Number provided, apply this functionality before calling to 
    // DialNewCall..
    }
    SymSym

  5. #5
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Dailed Number Is Correct Or Not

    Quote Originally Posted by kamesh.smartdude
    Is There Any API In CTelephony To Know Whether The Dailed Number Is A Valid Number Or Not Before EStatusConnecting(i.e Before Ringing)
    I dont think even validation checking will help to find valid number. Because it might possible that all numbers with in a range are not allocated to users, and hence some numbers (which is still not allocated) is not valid number. Some numbers are of 10 digits and some numbers are of more/less than 10 digits.

Similar Threads

  1. Preverification failed (result=1) in build.xml
    By caradine in forum Mobile Java General
    Replies: 12
    Last Post: 2009-08-06, 07:41
  2. Help! How to show the dailed number view of Log on s60 3rd
    By slavikshen in forum Symbian User Interface
    Replies: 0
    Last Post: 2009-02-11, 07:10
  3. Retreiving Phone number of incoming SMS
    By kumar_sai123 in forum Symbian Networking & Messaging (Closed)
    Replies: 6
    Last Post: 2009-01-29, 13:01
  4. Can I test SMS receiver on the phone without port number?
    By brighteyes in forum Mobile Java General
    Replies: 10
    Last Post: 2007-11-26, 23:38
  5. WML & WMLSCript problem ????
    By gemini_shooter in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2006-01-14, 06:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •