cc - VoLTE Call function#
Adaptation status unknown
Note
This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!
Tip
This library has its own demo,click this link to view cc’s demo example
Example
-- Currently only Air780EPV support for VoLTE calls
cc.lastNum()#
Get the number of the last call
Parameters
None
Return Value
return value type |
explanation |
---|---|
string |
Get the number of the last call |
Examples
None
cc.dial(sim_id, number)#
Make a call
Parameters
Incoming Value Type |
Explanation |
---|---|
number |
sim_id |
string |
Phone Number |
Return Value
return value type |
explanation |
---|---|
bool |
Call success or not |
Examples
None
cc.hangUp(sim_id)#
Hang up the phone
Parameters
Incoming Value Type |
Explanation |
---|---|
number |
sim_id |
Return Value
None
Examples
None
cc.accept(sim_id)#
Answer the phone
Parameters
Incoming Value Type |
Explanation |
---|---|
number |
sim_id |
Return Value
return value type |
explanation |
---|---|
bool |
Answer the phone successfully or not |
Examples
None
cc.init(multimedia_id)#
Initialize phone functions
Parameters
Incoming Value Type |
Explanation |
---|---|
number |
multimedia_id Multimedia id |
Return Value
return value type |
explanation |
---|---|
bool |
Success or not |
Examples
None
cc.record(on_off,upload_zbuff1, upload_zbuff2, download_zbuff1, download_zbuff2)#
Recorded call
Parameters
Incoming Value Type |
Explanation |
---|---|
boolean |
Turn on and turn off the call recording function, false or nil turn off, others turn on |
zbuff |
Uplink data storage area 1, the space capacity when zbuff is created must be a multiple of 640, the same below. |
zbuff |
The uplink data storage area 2 and the uplink data storage area 1 form a double buffer |
zbuff |
Downlink Data Storage Area 1 |
zbuff |
Downlink data storage area 2 and downlink data storage area 1 form a double buffer |
Return Value
return value type |
explanation |
---|---|
bool |
Success or failure, if in call state, will fail |
Examples
buff1 = zbuff.create(6400,0,zbuff.HEAP_AUTO)
buff2 = zbuff.create(6400,0,zbuff.HEAP_AUTO)
buff3 = zbuff.create(6400,0,zbuff.HEAP_AUTO)
buff4 = zbuff.create(6400,0,zbuff.HEAP_AUTO)
cc.on("record", function(type, buff_point)
log.info(type, buff_point) -- type==true is downlink data, false is uplink data buff_point indicates which one is returned in the double cache
end)
cc.record(true, buff1, buff2, buff3, buff4)
cc.quality()#
Get the current call quality
Parameters
None
Return Value
return value type |
explanation |
---|---|
int |
1 Low sound quality (8K),2 is high sound quality (16k),0 is not talking |
Examples
None
cc.on(event, func)#
Register call callback
Parameters
Incoming Value Type |
Explanation |
---|---|
string |
The event name audio recording data is”record” |
function |
Callback Method |
Return Value
return value type |
explanation |
---|---|
nil |
No return value |
Examples
cc.on("record", function(type, buff_point)
log.info(type, buff_point) -- type==true is downlink data, false is uplink data buff_point indicates which one is returned in the double cache
end)