CN102917100B - Method and device for obtaining calling number of incoming call - Google Patents

Method and device for obtaining calling number of incoming call Download PDF

Info

Publication number
CN102917100B
CN102917100B CN201210390837.2A CN201210390837A CN102917100B CN 102917100 B CN102917100 B CN 102917100B CN 201210390837 A CN201210390837 A CN 201210390837A CN 102917100 B CN102917100 B CN 102917100B
Authority
CN
China
Prior art keywords
answering
calling
message
terminal
circuit process
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210390837.2A
Other languages
Chinese (zh)
Other versions
CN102917100A (en
Inventor
王文林
彭涛
徐萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201210390837.2A priority Critical patent/CN102917100B/en
Publication of CN102917100A publication Critical patent/CN102917100A/en
Application granted granted Critical
Publication of CN102917100B publication Critical patent/CN102917100B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention discloses a method and device for obtaining a calling number of an incoming call, relating to the technical field of communication. The method and device disclosed by the invention are used for correctly obtaining the calling number and enabling some application programs of a called terminal, which cannot work until the calling number is obtained, can normally work. The method comprises the following steps of; receiving a calling message from a calling terminal, and enabling an answering line progress of the called terminal to enter a waiting state from an idle state when the calling message does not contain number information of the calling terminal, and waiting to receive a supplemental message including the number information of the calling terminal; and after receiving the supplemental message, reporting a calling state change message to all system application programs for monitoring the calling state, and enabling the answering line progress of the called terminal to enter a completion state from the waiting state, wherein the calling state change message comprises the number information of the calling terminal.

Description

A kind of method and device obtaining incoming call calling number
Technical field
The present invention relates to communication technical field, particularly a kind of method and device obtaining incoming call calling number
Background technology
At code division multiple access access (Code Division Multiple Access, CDMA) in network, after the business that caller ID shows is enabled by the circuit process of answering of terminal called, in fact calling number is not with in incoming message, calling number be in a follow-up supplemental messages with information, do not arrive with the time with incoming message.
And the circuit process of answering of terminal called is when receiving incoming message, call state change message can be reported immediately.So, when an application program of the circuit process of answering of terminal called, when monitoring its call state, when the call state change message that the circuit process of answering receiving terminal called reports, the very first time cannot know calling number.
Such as, for Android platform, when an application program, when the call state of the TelephonyManager program in use system to listen interface monitor terminal, call back function onCallStateChange (int state, String incomingNumber) in state state contain jingle bell information CALL_STATE_RINGING, but calling number incomingNumber but may be empty.
For the application program of android system, above-mentioned listen interface is the interface uniquely may knowing caller ID.If can not caller ID be provided here, some applies the function that just normally can not realize oneself again, such as some homing address of calling number annoyware, calling number is not had just not know the ownership place of this number yet, some firewall for received calls software for another example, does not have calling number just normally can not realize the function of firewall for received calls.
In sum, existing mobile terminal correctly can not obtain the calling number of incoming message in cdma network, makes some application program cisco unity malfunctions of mobile terminal.
Summary of the invention
Embodiments provide and a kind ofly obtain the incoming call method of calling number and device, in order to correct acquisition calling number, make terminal called some need to obtain calling number just workable application program can normally work.
A kind of method obtaining incoming call calling number that the embodiment of the present invention provides, the method comprises:
Receive the incoming message from calling terminal, and when not comprising the number information of calling terminal in described incoming message, the circuit process of answering of described terminal called is entered wait state by idle condition, and wait-receiving mode comprises the supplemental messages of the number information of calling terminal;
After receiving supplemental messages, system application to all monitored call states reports call state change message, the circuit process of answering of described terminal called is entered completion status by wait state, and described call state change message comprises the number information of calling terminal.
A kind of device obtaining incoming call calling number that the embodiment of the present invention provides, this device comprises:
Checking module, for receiving the incoming message from calling terminal, and when not comprising the number information of calling terminal in described incoming message, the circuit process of answering of described terminal called is entered wait state by idle condition, and wait-receiving mode comprises the supplemental messages of the number information of calling terminal;
Reporting module, after receiving supplemental messages, system application to all monitored call states reports call state change message, and the circuit process of answering of described terminal called is entered completion status by wait state, and described call state change message comprises the number information of calling terminal.
The embodiment of the present invention, by a set of state automatic cycle mechanism arranged, when receiving incoming message, first do not carry out reporting of call status message, until confirm or report when obtaining calling number again, some need the application program obtaining calling number normally to work to this ensure that terminal called.
Accompanying drawing explanation
The method flow schematic diagram of the acquisition incoming call calling number that Fig. 1 provides for the embodiment of the present invention;
The state relation schematic diagram of the state automatic cycle mechanism that Fig. 2 provides for the embodiment of the present invention;
The apparatus module schematic diagram of the acquisition incoming call calling number that Fig. 3 provides for the embodiment of the present invention;
The method of the acquisition incoming call calling number that Fig. 4 provides for the embodiment of the present invention and the workflow schematic diagram of device under Andriod system.
Embodiment
Embodiments provide and a kind ofly obtain the incoming call method of calling number and device, in order to correct acquisition calling number, make terminal called some need to obtain calling number just workable application program can normally work.
Based on above-mentioned purpose, embodiments provide a kind of method obtaining incoming call calling number, first a definition carried out to three kinds of states of the state automatic cycle mechanism related in Examples below:
Idle condition: the initial condition of state automatic cycle mechanism is idle condition; When present call state is idle IDLE, state automatic cycle mechanism is also in IDLE state;
Wait state: represent and waiting for calling number message;
Completion status: represent and wait for that calling number message completes, and report call state change message.For android system, when entering this state, need to android system reporting call state variation message, according to change call function onCallStateChange () of front and back call state, android system can notify that each is applied.
As shown in Figure 1, in called terminal side, the method comprises:
S101, receive the incoming message from calling terminal, and when not comprising the number information of calling terminal in incoming message, the circuit process of answering of terminal called is entered wait state by idle condition, and wait-receiving mode comprises the supplemental messages of the number information of calling terminal;
S102, after receiving supplemental messages, system application to all monitored call states reports call state change message, and the circuit process of answering of terminal called is entered completion status by wait state, and this call state change message comprises the number information of calling terminal.
The embodiment of the present invention is provided with a set of state automatic cycle mechanism in terminal, when it is as terminal called, the process of circuit process of the answering incoming call answering of terminal called, acquisition calling number is divided into the three phases of idle condition, wait state and completion status.Fig. 2 is a kind of Conversion Relations of state automatic cycle mechanism of the present invention, first first introduces the switch condition between them;
Time, the process of circuit process of the answering incoming call answering of terminal called, acquisition calling number is divided into the three phases of idle condition, wait state and completion status.Fig. 2 is a kind of Conversion Relations of state automatic cycle mechanism of the present invention, first first introduces the switch condition between them;
Idle condition: the initial condition of state automatic cycle mechanism; When the present call state of terminal is idle IDLE, state automatic cycle mechanism is also in IDLE state.
Wait state: represent and waiting for calling number message; Receive incoming message, and enter this state by idle condition when not carrying dialing number information in message.
Completion status: represent and wait for that the process of dialing number information completes; Receiving dialing number information, or when exceeding wait threshold value, this state is entered by idle condition or wait state, to android system reporting call state variation message, android system can be called onCallStateChange () function according to the change of front and back call state and notify each application program.
The whole process of the acquisition incoming call calling number for cdma network is completed by the switching between three states, object does not report call state change message immediately when receiving incoming message, until obtain dialing number information in follow-up supplemental messages after, report call state change message again, application program above-mentioned so just can normally work.
It should be noted that, the very first time arrive be not in terminal called in above-described embodiment, the message arrived after described incoming message is called described supplemental messages, and described supplemental messages can also comprise the general information under some other prior aries except may comprising dialing number information.
Further, the method obtaining incoming call calling number in this cdma network can also comprise: when the call ends, the circuit process of answering of terminal called is reverted to idle condition by completion status.
So far complete the automatic cycle mechanism between three kinds of states, certainly, user also manually can carry out the conversion of state as required.
All can reissue calling number because not all incoming message is follow-up to come, such as calling terminal has been opened and has been gone electric number to hide business, or terminal called does not open caller ID display business etc., so when the circuit process of answering of terminal called is in wait state, the upper limit of a stand-by period can be set, in case when not having not comprise calling number in supplemental messages or supplemental messages, waits for too long.When the time that the circuit process of answering of terminal called enters wait state is greater than wait threshold value, the circuit process of answering of terminal called is forced to enter completion status by wait state, reports call state change message.
Generally speaking, cdma network carries dialing number information to arrive after about the 100ms of incoming message.So, this wait threshold value setup times is 200ms ~ 300ms is all safer, conventional numerical value, certainly can arrange according to the time of the emergency of application requirement calling number to this wait threshold value, preferably, wait for that threshold value can be set to the twice of the general time of advent.
Experiment through applicant is learnt, under the prerequisite that Network allows, under reasonable design waits for threshold condition, the method that the embodiment of the present invention provides can guarantee that the calling of 99.99% can obtain calling telephone number, meets the demand of application software.
It should be noted that, the method provided due to the embodiment of the present invention is not only applicable to cdma network, and also can normally work containing in the communication network of calling number in other incoming message, further, the embodiment of the present invention also comprises:
When comprising the number information of calling terminal in incoming message, after reporting call state change message to the application program of answering the call state of circuit process of all monitoring terminal calleds, the circuit process of answering of terminal called is directly entered completion status by idle condition.
Preferably, after the circuit process of answering of terminal called enters completion status, the operating system to terminal called returns the response message that the action of representative acquisition calling number completes.
Be understandable that, described response message be a side conventional in prior art after receiving request message, return the feedback message for report condition of transmit leg, such as, the form of 200OK can be adopted to complete.
Coordinate said method, as shown in Figure 3, the embodiment of the present invention additionally provides a kind of device obtaining incoming call calling number, and this device comprises:
Checking module 301, for receiving the incoming message from calling terminal, and when not comprising the number information of calling terminal in described incoming message, the circuit process of answering of described terminal called is entered wait state by idle condition, and wait-receiving mode comprises the supplemental messages of the number information of calling terminal;
Reporting module 302, after receiving supplemental messages, system application to all monitored call states reports call state change message, the circuit process of answering of described terminal called is entered completion status by wait state, and described call state change message comprises the number information of calling terminal.
The checking module 301 of apparatus of the present invention carries out State Transferring when the circuit process of answering of terminal called receives incoming message in the above-described embodiments, and be responsible for the dialing number information waiting for and obtain calling terminal, when reporting module is after acquisition dialing number information, report call state change message again, determine containing dialing number information in the call state change message that such guarantee reports, so ensure some of terminal called need to obtain calling number just workable application program can normally work.
Further, described reporting module 302 also for, when the call ends, the circuit process of answering of described terminal called is reverted to idle condition by completion status.
So far the above embodiment of the present invention completes the automatic cycle mechanism between three kinds of states, and certainly, user also manually can carry out the conversion of state as required.
Reporting module 302 also for, the time that the circuit process of answering of described terminal called enters wait state be greater than wait for threshold value time, the circuit process of answering of terminal called is forced to enter completion status by wait state, reports described call state change message.All can reissue calling number because not all incoming message is follow-up to come, such as calling terminal has been opened and has been gone electric number to hide business, or terminal called does not open caller ID display business etc., so when the circuit process of answering of terminal called is in wait state, described reporting module can set the upper limit of a stand-by period, in case when not having not comprise calling number in supplemental messages or supplemental messages, waits for too long, when the time that the circuit process of answering of described terminal called enters wait state is greater than wait threshold value, the circuit process of answering of terminal called is forced to enter completion status by wait state, report described call state change message.
Generally speaking, cdma network carries dialing number information to arrive after about the 100ms of incoming message.So, wait threshold value setup times is 200ms ~ 300ms is all safer, conventional numerical value, certainly can arrange according to the time of the emergency of application requirement calling number to this wait threshold value, it is reasonable selection that wait threshold value is set to the twice of the general time of advent.
Experiment through applicant is learnt, under the prerequisite that Network allows, under reasonable design waits for threshold condition, the method that the embodiment of the present invention provides can guarantee that the calling of 99.99% all obtains calling telephone number, meets the demand of application software.
It should be noted that, because the method is not only applicable to cdma network, in other incoming message containing calling number communication network in also can normally work, further, checking module described in the embodiment of the present invention also for:
When comprising the number information of calling terminal in described incoming message, after reporting call state change message to the application program of answering the call state of circuit process of all monitoring terminal calleds, the circuit process of answering of described terminal called is directly entered completion status by idle condition.
Preferably, described reporting module 302 also for, after the circuit process of answering of described terminal called is directly entered completion status by idle condition, the operating system to terminal called returns representative and obtains the response message that calling number action completes.
It should be noted that, the device of the acquisition incoming call calling number that the embodiment of the present invention provides can according to terminal called different size in different positions, such as can be arranged in android system in a lot of module, in call tracker CallTracker such as in android system, also can at RILJ(adio Inteface Layer Java Part, radio interface layer java section) inner, can also at GSM driver module RILD(Radio Interface Daemon, radio interface layer finger daemon) inner.But must between CallTracker and modem.
As shown in Figure 4, the scheme that provides of embodiment for a better understanding of the present invention, below to use the terminal called of Andriod operating system in cdma network, explain in detail:
S401, when the circuit process of answering of terminal called receives incoming message, state is set to idle condition for this call request by checking module, first not to android system report (namely can not call the message of onCallStateChange () function);
S402, detects the calling number whether current call message comprises calling terminal; If have, then perform S403; Otherwise, perform S404;
S403, changes to completion status by the circuit state of a process of answering of current terminal called, represents and waits for that dialing number information process completes, return response message reporting call state change to android system; Process ends.
S404, changes to wait state by the circuit state of a process of answering of current terminal called;
S405, detects whether receive the supplemental messages carrying calling number, can UNSOL_CDMA_INFO_REC message under ADRIOD system, and starts timer simultaneously, and the wait threshold value according to arranging starts timing;
S406, after detecting and receiving UNSOL_CDMA_INFO_REC message or timer to time, the circuit state of a process of answering of current terminal called is changed to completion status, represent and wait for that dialing number information process completes, return response message reporting call state to android system and change; Process ends.
In sum, the embodiment of the present invention is provided with a set of state automatic cycle mechanism, when receiving incoming message, first do not carry out reporting of call status message, until confirm or report again when obtaining calling number, this ensure that the application program obtaining calling number that needs of the circuit process of answering of terminal called can normally work.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store and optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (11)

1. obtain a method for incoming call calling number, it is characterized in that, the method comprises:
Receive the incoming message from calling terminal, and when not comprising the number information of calling terminal in described incoming message, the circuit process of answering controlling terminal called enters wait state by idle condition, wait-receiving mode comprises the supplemental messages of the number information of calling terminal, wherein, the message that arrives after being described incoming message of described supplemental messages;
After receiving described supplemental messages, system application to all monitored call states reports call state change message, the circuit process of answering controlling described terminal called enters completion status by wait state, and described call state change message comprises the number information of calling terminal.
2. the method for claim 1, is characterized in that, the method also comprises:
When comprising the number information of calling terminal in described incoming message, after reporting call state change message to the application program of answering the call state of circuit process of all monitoring terminal calleds, the circuit process of answering of described terminal called is directly entered completion status by idle condition.
3. method as claimed in claim 2, it is characterized in that, the method also comprises:
When the call ends, the circuit process of answering of described terminal called is reverted to idle condition by completion status.
4. the method for claim 1, it is characterized in that, when the time that the circuit process of answering of described terminal called enters wait state is greater than wait threshold value, the circuit process of answering of terminal called is forced to enter completion status by wait state, reports described call state change message.
5. method as claimed in claim 4, it is characterized in that, described wait threshold value is 200ms ~ 300ms.
6. the method as described in claim 1 or 4, is characterized in that, after the circuit process of answering of described terminal called enters completion status, the operating system to terminal called returns the response message that the action of representative acquisition calling number completes.
7. obtain a device for incoming call calling number, it is characterized in that, this device comprises:
Checking module, for receiving the incoming message from calling terminal, and when not comprising the number information of calling terminal in described incoming message, the circuit process of answering of terminal called is entered wait state by idle condition, wait-receiving mode comprises the supplemental messages of the number information of calling terminal, wherein, the message that arrives after being described incoming message of described supplemental messages;
Reporting module, after receiving described supplemental messages, system application to all monitored call states reports call state change message, the circuit process of answering of described terminal called is entered completion status by wait state, and described call state change message comprises the number information of calling terminal.
8. device as claimed in claim 7, is characterized in that, described checking module also for:
When comprising the number information of calling terminal in described incoming message, after reporting call state change message to the application program of circuit process of the answering call state of all monitoring terminal calleds, the circuit process of answering of described terminal called is directly entered completion status by idle condition.
9. device as claimed in claim 8, is characterized in that, described reporting module also for:
When the call ends, the circuit process of answering of described terminal called is reverted to idle condition by completion status.
10. device as claimed in claim 7, it is characterized in that, described reporting module also for, when the time that the circuit process of answering of described terminal called enters wait state is greater than wait threshold value, the circuit process of answering of terminal called is forced to enter completion status by wait state, reports described call state change message.
11. devices as described in claim 7 or 10, it is characterized in that, described reporting module also for, after the circuit process of answering of described terminal called enters completion status, the operating system to terminal called returns representative and obtains the response message that calling number action completes.
CN201210390837.2A 2012-10-15 2012-10-15 Method and device for obtaining calling number of incoming call Active CN102917100B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210390837.2A CN102917100B (en) 2012-10-15 2012-10-15 Method and device for obtaining calling number of incoming call

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210390837.2A CN102917100B (en) 2012-10-15 2012-10-15 Method and device for obtaining calling number of incoming call

Publications (2)

Publication Number Publication Date
CN102917100A CN102917100A (en) 2013-02-06
CN102917100B true CN102917100B (en) 2015-03-04

Family

ID=47615326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210390837.2A Active CN102917100B (en) 2012-10-15 2012-10-15 Method and device for obtaining calling number of incoming call

Country Status (1)

Country Link
CN (1) CN102917100B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1518259A (en) * 2003-01-17 2004-08-04 华为技术有限公司 Metod for displaying main calling number in CDMA network
CN101365009A (en) * 2008-09-24 2009-02-11 侯万春 Method realizing called number display by one-card-multiple-number called mobile phone terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060046720A1 (en) * 2004-09-02 2006-03-02 Teemu Toropainen Mobile communications terminal, system and method therefore

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1518259A (en) * 2003-01-17 2004-08-04 华为技术有限公司 Metod for displaying main calling number in CDMA network
CN101365009A (en) * 2008-09-24 2009-02-11 侯万春 Method realizing called number display by one-card-multiple-number called mobile phone terminal

Also Published As

Publication number Publication date
CN102917100A (en) 2013-02-06

Similar Documents

Publication Publication Date Title
CN108881779B (en) Method, system and server for answering and transferring video calls between intelligent devices
EP3537734B1 (en) Method and device for connecting a bluetooth device
TWI378708B (en) Call processing method and system implemented in a mobile communication terminal
CN102880514B (en) A kind of method and apparatus of invokes application
CN103249018A (en) Switching method for multi-party call and terminal equipment
CN103491256B (en) Communication processing method and terminal device
CN104936282A (en) Method and device for registering converged communication service
CN103402186A (en) Incoming phonecall switching method and communication terminal
CN102833404B (en) Method and device for selecting conversation equipment
CN104468962A (en) Call request processing method and electronic devices
CN104954589A (en) Call transferring method and system thereof
CN103986824A (en) Data display method and system of electronic equipment
CN105578438A (en) Fixed-line telephone sharing method and related equipment
CN104507056A (en) Cluster dispatch data processing method and system based on event types
CN102883292B (en) A kind of method, system, equipment and mobile terminal realizing call forwarding
CN106535150A (en) Call transfer method and apparatus
CN103369474B (en) Crosstalk reminding method and device
CN105635497A (en) Terminal call transfer method and call transfer terminal
CN106210362A (en) Call method and device
CN103051484B (en) Session service processing method, system and Session Border Controll
CN102595455B (en) Method and device for managing test module in automatic road test system
CN102917100B (en) Method and device for obtaining calling number of incoming call
CN106506782A (en) Incoming call processing method and mobile terminal
CN103888923A (en) Call proceeding method, system and device applied to virtual private mobile network
CN105227780B (en) Processing incoming call and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100085 Beijing city Haidian District Qinghe Street No. 68 Huarun colorful city shopping center two floor 13

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Beijing Xiaomi Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant