You can make an eCall (i.e., a Cellular Emergency Call for Vehicle) by sending the start_ecall command (which defines many required parameters such as ecall_type, vehicle, and vin) to the phone control object:
# echo 'msg::start_ecall\nid::1\ndat:json:{"ecall_type":"test",
"confidence":true,"vehicle":1,"vin":"1M8GDM9AXKP042789",
"storage_type":2,"time_stamp":1326752314,"latitude":164565698,
"longitude":49457972,"direction":157,"delta_latitude":0,
"delta_longitude":0,"passengers":31}\n'
> /pps/services/phone/private/control
The response is:
res::start_call
id::1
dat:json:{"call_id":2}
To end the call, you must send the end_call command to the same PPS object, specifying the call_id given in the response to the start_ecall command:
# echo 'msg::end_call\nid::2\ndat:json:{"call_id":"7"}\n'
> /pps/services/phone/private/control
The response is:
res::end_call
id::2
dat:json:{"call_id":7}
The logging information shows the following activity:
Mar 25 13:09:35.491 qwf_phone_service.11018292 low_rate 3070 QWF_TR
START ECALL
Mar 25 13:09:40.054 qwf_voice_service.11030579 low_rate 3076 QWF_TR
NOTIFY_PHONE_RINGING, connID:1
res::start_ecall
id::1
dat:json:{"call_id":2}
Mar 25 13:09:40.111 qwf_phone_service.11018292 high_rate 3070 QWF_TR
start_voice: Start audio succeed
Mar 25 13:09:40.333 qwf_voice_service.11030579 low_rate 3076 QWF_TR
NOTIFY_PHONE_CONNECTED, connID:1
Mar 25 13:09:43.325 qwf_crm_telit.11046966 low_rate 1004 QWF_TR
ECALLEV: 0, action:0
Mar 25 13:09:52.945 qwf_crm_telit.11046966 low_rate 1004 QWF_TR
ECALLEV: 2, action:0
Mar 25 13:09:58.648 qwf_voice_service.11030579 low_rate 3076 QWF_TR
NOTIFY_PHONE_DISCONNECTED, connID:1
Mar 25 13:09:59.155 qwf_phone_service.11018292 high_rate 3070 QWF_TR
end_voice: Stop audio succeed