0

i am developing one application which is based on SIP. And i want to store the value of dialer(value of buttons which is pressed to call) i.e if i am dialing 12345 then how do i store this value in particular string or integer for further manipulation and concatenation.

screenshot of main screen

Clicking on that Five(5) button, phones default dialpad will open.i want to do this in my application.

Juned
  • 6,290
  • 7
  • 45
  • 93

1 Answers1

0

Having in mind the following scenario:

You have a dialpad (buttons from 0-9 etc) and an EditText, which gets updated every time the user hits a digit. When the user hits the "Make a Call button" you need to call getText() on EditText - than you'll have the dialer number.

On the other side (the person that receives the call) you need to parse the incoming SIP INVITE message, to get the number(contact info). Keep in mind that depending on the server configuration phone-numbers can be mapped to aliases (usernames).

hovanessyan
  • 30,580
  • 6
  • 55
  • 83
  • for this can i use default dialpad or i have to create custom dialpad? – Juned Mar 10 '12 at 09:44
  • do you mean the default dialpad of the phone? – hovanessyan Mar 10 '12 at 10:10
  • @ hovanessyan yes,can i use that? – Juned Mar 10 '12 at 10:54
  • I am not sure if you can use that. The thing is, when you hit the call button, an intent is raised for a new call. You have to catch that intent and take control of the call, so that it goes through your application. How will you make difference if the user wants to make a GSM call or a SIP Call? All examples I have seen use their own dialpad. – hovanessyan Mar 10 '12 at 12:08
  • thanks sir,now i will go with my own dialer rather than using phones default dialpad – Juned Mar 10 '12 at 14:11
  • 1
    recently i check the application Sipdroid in which they are using a inbuilt dial pad of android for making a SIP calls. how to do that? – Juned Mar 22 '12 at 09:16
  • what exactly is your issue? Having the source code of SipDroid should make it clear how it's done. Please post exactly what is your issue and I may be able to answer it, cause I have some knowledge of the code of SipDroid. – hovanessyan Apr 02 '12 at 10:31
  • @hovanessyan i debug the SipDroid application. in which they are using a phones dialpad.so how they did this thing? in source code i tried a lot to find the code of this but i unable to find.please help me out to do the same thing as they did. – Juned Apr 02 '12 at 13:42
  • @Winona no still i am stuck with this issue.the main benefit of using phones dialpad.you can also use the phones call log for tracking the calls.And then there is a no need to do extra codings regarding the call-history – Juned Apr 02 '12 at 13:44
  • what do you mean they use phones dialpad? They use custom dialpad, which is defined in XML Layouts, which XML Layout is inflated in Activity. Here's direct link to the dialpad layout http://code.google.com/p/sipdroid/source/browse/tags/release-0.9/res/layout-finger/dialpad.xml – hovanessyan Apr 02 '12 at 14:19
  • @hovanessyan this dialpad is for DTMF tone which is not working in this project.in main screen of SipDroid project there is a one button which looks like a Dialpads 5 number button. click on that button and you will get a phones dialpad and call-log.here i have put an image of that screen please see that. – Juned Apr 03 '12 at 05:20
  • @juned it's the same dialpad. Graphically speaking it doesn't matter if it's phone-call or DTMF, because what you need to know is what numbers the person enters. Than you send those numbers to the method that makes SIPCall or to the method that generates DTMF tones. Can you please describe exactly what you want to achieve in a new question? – hovanessyan Apr 03 '12 at 07:23
  • @hovanessyan thanks for your explanation. now i want to the same thing as they did.how catch the value of button which is pressed.how do i send those numbers to that method.And in SipDroid project where is the code for that? – Juned Apr 03 '12 at 10:47
  • @juned post that in a new question, link the question in the comments section here and I will answer. Otherwise the answers will be in the comments and will not be easily found if someone else needs the knowledge too. – hovanessyan Apr 03 '12 at 11:51
  • @hovanessyan please see this link for question and if require edit that question.http://stackoverflow.com/questions/10011029/how-to-catch-the-value-of-dialpads-pressed-button – Juned Apr 04 '12 at 12:25
  • @hovanessyan hello sir can you answer me of this question which is regarding Sipdroid.[Click Here](http://stackoverflow.com/questions/10069274/how-to-add-g729-codec-in-android-application) – Juned Apr 09 '12 at 08:09