~aleteoryx/muditaos

b3a44f0c48e8a0c2ac1be94efc21b6628aa4f654 — Kuba Kleczkowski 4 years ago 91d0fc8
[EGD-6422] Add cellular phone mode documentation

Add breif documentation of handling phone modes
is service cellular.
M module-services/service-cellular/doc/README.md => module-services/service-cellular/doc/README.md +23 -0
@@ 49,3 49,26 @@ GSM Module Enables Host to Exit from Power Saving Mode
* CPU sentinel block frequency decreasing below 132 MHz
* The wake-up described in the point above takes place

## Phone modes in cellular

Conditions for cellular to switch the phone mode
* Phone mode changes on event provided by 'phoneModeObserver'

Connected mode
* no actions are needed to meet the Connected mode criteria, calls and messages are allowed

Do not Disturb
* incoming calls are rejected 
* outgoing calls, incoming and outgoing messages are allowed

Offline mode
* modem is disconnected from the GSM network, both calls and messages are rejected

| | Connected | Do not Disturb | Offline |
| ----------- | --------- | -------------- | ------- |
|Incoming calls| Allowed | Rejected | Not allowed |
|Outgoing calls| Allowed | Allowed | Not allowed |
|Incoming messages| Allowed | Allowed | Not allowed |
|Outgoing messages| Allowed | Allowed | Not allowed |

![](phone_modes.svg)
\ No newline at end of file

A module-services/service-cellular/doc/phone_modes.puml => module-services/service-cellular/doc/phone_modes.puml +65 -0
@@ 0,0 1,65 @@
@startuml

participant "Incoming call URC" as urc
participant "Call request" as call
participant "Messages DB" as message
participant "Service cellular" as cellular
participant "Service cellular notification " as notification

== Connected mode ==

    activate urc
    activate cellular
    urc -> cellular : Ring urc / Clip urc
    cellular -> cellular : identifyNotification
    cellular -> cellular : CellularRingNotification | CellularCallerIdNotification
    cellular -> notification :CellularCallerIdMessage | CellularIncominCallMessage

    urc -> cellular : Cmti urc
    cellular -> cellular : identifyNotification
    cellular -> cellular : receiveSms
    cellular -> message : add record
    deactivate urc

    activate message
    message -> cellular : new queeued
    cellular -> cellular : CellularSendSMSMessage
    cellular -> message : update record
    deactivate message

    activate call
    call -> cellular : CellularCallRequestMessage
    cellular -> cellular : handleCellularCallRequestMessage
    cellular -> notification : CellularRingingMessage
    deactivate call


== Do not Disturb mode ==

    activate urc

    urc -> cellular : Ring urc / Clip urc
    cellular -> cellular : identifyNotification
    cellular -> cellular : CellularRingNotification | CellularCallerIdNotification
    cellular -> cellular : hangUpCall

    urc -> cellular : Cmti urc
    cellular -> cellular : identifyNotification
    cellular -> cellular : receiveSms
    cellular -> message : add record
    deactivate urc

    activate message
    message -> cellular : new queeued
    cellular -> cellular : CellularSendSMSMessage
    cellular -> message : update record
    deactivate message

    activate call
    call -> cellular : CellularCallRequestMessage
    cellular -> cellular : handleCellularCallRequestMessage
    cellular -> notification : CellularRingingMessage
    deactivate call
    deactivate cellular

@enduml

A module-services/service-cellular/doc/phone_modes.svg => module-services/service-cellular/doc/phone_modes.svg +75 -0
@@ 0,0 1,75 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1174px" preserveAspectRatio="none" style="width:963px;height:1174px;" version="1.1" viewBox="0 0 963 1174" width="963px" zoomAndPan="magnify"><defs><filter height="300%" id="f1v39g9gcrwzrm" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="320.1953" style="stroke:#A80036;stroke-width:1.0;" width="10" x="73.5" y="50.2969"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="341.1953" style="stroke:#A80036;stroke-width:1.0;" width="10" x="73.5" y="571.2891"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="100.3984" style="stroke:#A80036;stroke-width:1.0;" width="10" x="208.5" y="470.8906"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="100.3984" style="stroke:#A80036;stroke-width:1.0;" width="10" x="208.5" y="1012.8828"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="100.3984" style="stroke:#A80036;stroke-width:1.0;" width="10" x="326" y="370.4922"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="100.3984" style="stroke:#A80036;stroke-width:1.0;" width="10" x="326" y="912.4844"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="1062.9844" style="stroke:#A80036;stroke-width:1.0;" width="10" x="456" y="50.2969"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="78" x2="78" y1="40.2969" y2="1131.2813"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="213" x2="213" y1="40.2969" y2="1131.2813"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="331" x2="331" y1="40.2969" y2="1131.2813"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="461" x2="461" y1="40.2969" y2="1131.2813"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="843" x2="843" y1="40.2969" y2="1131.2813"/><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="143" x="5" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="129" x="12" y="24.9951">Incoming call URC</text><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="143" x="5" y="1130.2813"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="129" x="12" y="1150.2764">Incoming call URC</text><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="99" x="162" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="85" x="169" y="24.9951">Call request</text><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="99" x="162" y="1130.2813"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="85" x="169" y="1150.2764">Call request</text><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="108" x="275" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="94" x="282" y="24.9951">Messages DB</text><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="108" x="275" y="1130.2813"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="94" x="282" y="1150.2764">Messages DB</text><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="124" x="397" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="110" x="404" y="24.9951">Service cellular</text><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="124" x="397" y="1130.2813"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="110" x="404" y="1150.2764">Service cellular</text><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="212" x="735" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="194" x="742" y="24.9951">Service cellular notification</text><rect fill="#FEFECE" filter="url(#f1v39g9gcrwzrm)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="212" x="735" y="1130.2813"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="194" x="742" y="1150.2764">Service cellular notification</text><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="320.1953" style="stroke:#A80036;stroke-width:1.0;" width="10" x="73.5" y="50.2969"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="341.1953" style="stroke:#A80036;stroke-width:1.0;" width="10" x="73.5" y="571.2891"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="100.3984" style="stroke:#A80036;stroke-width:1.0;" width="10" x="208.5" y="470.8906"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="100.3984" style="stroke:#A80036;stroke-width:1.0;" width="10" x="208.5" y="1012.8828"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="100.3984" style="stroke:#A80036;stroke-width:1.0;" width="10" x="326" y="370.4922"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="100.3984" style="stroke:#A80036;stroke-width:1.0;" width="10" x="326" y="912.4844"/><rect fill="#FFFFFF" filter="url(#f1v39g9gcrwzrm)" height="1062.9844" style="stroke:#A80036;stroke-width:1.0;" width="10" x="456" y="50.2969"/><rect fill="#EEEEEE" filter="url(#f1v39g9gcrwzrm)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="956" x="0" y="70.8633"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="956" y1="70.8633" y2="70.8633"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="956" y1="73.8633" y2="73.8633"/><rect fill="#EEEEEE" filter="url(#f1v39g9gcrwzrm)" height="23.1328" style="stroke:#000000;stroke-width:2.0;" width="143" x="406.5" y="60.2969"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="124" x="412.5" y="76.3638">Connected mode</text><polygon fill="#A80036" points="444,110.5625,454,114.5625,444,118.5625,448,114.5625" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="83.5" x2="450" y1="114.5625" y2="114.5625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="114" x="90.5" y="109.4966">Ring urc / Clip urc</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="143.6953" y2="143.6953"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="143.6953" y2="156.6953"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="156.6953" y2="156.6953"/><polygon fill="#A80036" points="477,152.6953,467,156.6953,477,160.6953,473,156.6953" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="126" x="473" y="138.6294">identifyNotification</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="185.8281" y2="185.8281"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="185.8281" y2="198.8281"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="198.8281" y2="198.8281"/><polygon fill="#A80036" points="477,194.8281,467,198.8281,477,202.8281,473,198.8281" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="343" x="473" y="180.7622">CellularRingNotification | CellularCallerIdNotification</text><polygon fill="#A80036" points="831,223.9609,841,227.9609,831,231.9609,835,227.9609" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="837" y1="227.9609" y2="227.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="353" x="473" y="222.895">CellularCallerIdMessage | CellularIncominCallMessage</text><polygon fill="#A80036" points="444,253.0938,454,257.0938,444,261.0938,448,257.0938" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="83.5" x2="450" y1="257.0938" y2="257.0938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="55" x="90.5" y="252.0278">Cmti urc</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="286.2266" y2="286.2266"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="286.2266" y2="299.2266"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="299.2266" y2="299.2266"/><polygon fill="#A80036" points="477,295.2266,467,299.2266,477,303.2266,473,299.2266" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="126" x="473" y="281.1606">identifyNotification</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="328.3594" y2="328.3594"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="328.3594" y2="341.3594"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="341.3594" y2="341.3594"/><polygon fill="#A80036" points="477,337.3594,467,341.3594,477,345.3594,473,341.3594" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="76" x="473" y="323.2935">receiveSms</text><polygon fill="#A80036" points="347,366.4922,337,370.4922,347,374.4922,343,370.4922" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="341" x2="455" y1="370.4922" y2="370.4922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="69" x="353" y="365.4263">add record</text><polygon fill="#A80036" points="444,395.625,454,399.625,444,403.625,448,399.625" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="336" x2="450" y1="399.625" y2="399.625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="87" x="343" y="394.5591">new queeued</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="428.7578" y2="428.7578"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="428.7578" y2="441.7578"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="441.7578" y2="441.7578"/><polygon fill="#A80036" points="477,437.7578,467,441.7578,477,445.7578,473,441.7578" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="166" x="473" y="423.6919">CellularSendSMSMessage</text><polygon fill="#A80036" points="342,466.8906,332,470.8906,342,474.8906,338,470.8906" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="336" x2="455" y1="470.8906" y2="470.8906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="90" x="348" y="465.8247">update record</text><polygon fill="#A80036" points="444,496.0234,454,500.0234,444,504.0234,448,500.0234" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="218.5" x2="450" y1="500.0234" y2="500.0234"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="185" x="225.5" y="494.9575">CellularCallRequestMessage</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="529.1563" y2="529.1563"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="529.1563" y2="542.1563"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="542.1563" y2="542.1563"/><polygon fill="#A80036" points="477,538.1563,467,542.1563,477,546.1563,473,542.1563" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="229" x="473" y="524.0903">handleCellularCallRequestMessage</text><polygon fill="#A80036" points="831,567.2891,841,571.2891,831,575.2891,835,571.2891" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="837" y1="571.2891" y2="571.2891"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="156" x="473" y="566.2231">CellularRingingMessage</text><rect fill="#EEEEEE" filter="url(#f1v39g9gcrwzrm)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="956" x="0" y="599.8555"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="956" y1="599.8555" y2="599.8555"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="956" y1="602.8555" y2="602.8555"/><rect fill="#EEEEEE" filter="url(#f1v39g9gcrwzrm)" height="23.1328" style="stroke:#000000;stroke-width:2.0;" width="172" x="392" y="589.2891"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="153" x="398" y="605.356">Do not Disturb mode</text><polygon fill="#A80036" points="444,639.5547,454,643.5547,444,647.5547,448,643.5547" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="83.5" x2="450" y1="643.5547" y2="643.5547"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="114" x="90.5" y="638.4888">Ring urc / Clip urc</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="672.6875" y2="672.6875"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="672.6875" y2="685.6875"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="685.6875" y2="685.6875"/><polygon fill="#A80036" points="477,681.6875,467,685.6875,477,689.6875,473,685.6875" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="126" x="473" y="667.6216">identifyNotification</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="714.8203" y2="714.8203"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="714.8203" y2="727.8203"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="727.8203" y2="727.8203"/><polygon fill="#A80036" points="477,723.8203,467,727.8203,477,731.8203,473,727.8203" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="343" x="473" y="709.7544">CellularRingNotification | CellularCallerIdNotification</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="756.9531" y2="756.9531"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="756.9531" y2="769.9531"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="769.9531" y2="769.9531"/><polygon fill="#A80036" points="477,765.9531,467,769.9531,477,773.9531,473,769.9531" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="75" x="473" y="751.8872">hangUpCall</text><polygon fill="#A80036" points="444,795.0859,454,799.0859,444,803.0859,448,799.0859" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="83.5" x2="450" y1="799.0859" y2="799.0859"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="55" x="90.5" y="794.02">Cmti urc</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="828.2188" y2="828.2188"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="828.2188" y2="841.2188"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="841.2188" y2="841.2188"/><polygon fill="#A80036" points="477,837.2188,467,841.2188,477,845.2188,473,841.2188" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="126" x="473" y="823.1528">identifyNotification</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="870.3516" y2="870.3516"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="870.3516" y2="883.3516"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="883.3516" y2="883.3516"/><polygon fill="#A80036" points="477,879.3516,467,883.3516,477,887.3516,473,883.3516" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="76" x="473" y="865.2856">receiveSms</text><polygon fill="#A80036" points="347,908.4844,337,912.4844,347,916.4844,343,912.4844" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="341" x2="455" y1="912.4844" y2="912.4844"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="69" x="353" y="907.4185">add record</text><polygon fill="#A80036" points="444,937.6172,454,941.6172,444,945.6172,448,941.6172" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="336" x2="450" y1="941.6172" y2="941.6172"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="87" x="343" y="936.5513">new queeued</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="970.75" y2="970.75"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="970.75" y2="983.75"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="983.75" y2="983.75"/><polygon fill="#A80036" points="477,979.75,467,983.75,477,987.75,473,983.75" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="166" x="473" y="965.6841">CellularSendSMSMessage</text><polygon fill="#A80036" points="342,1008.8828,332,1012.8828,342,1016.8828,338,1012.8828" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="336" x2="455" y1="1012.8828" y2="1012.8828"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="90" x="348" y="1007.8169">update record</text><polygon fill="#A80036" points="444,1038.0156,454,1042.0156,444,1046.0156,448,1042.0156" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="218.5" x2="450" y1="1042.0156" y2="1042.0156"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="185" x="225.5" y="1036.9497">CellularCallRequestMessage</text><line style="stroke:#A80036;stroke-width:1.0;" x1="466" x2="508" y1="1071.1484" y2="1071.1484"/><line style="stroke:#A80036;stroke-width:1.0;" x1="508" x2="508" y1="1071.1484" y2="1084.1484"/><line style="stroke:#A80036;stroke-width:1.0;" x1="467" x2="508" y1="1084.1484" y2="1084.1484"/><polygon fill="#A80036" points="477,1080.1484,467,1084.1484,477,1088.1484,473,1084.1484" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="229" x="473" y="1066.0825">handleCellularCallRequestMessage</text><polygon fill="#A80036" points="831,1109.2813,841,1113.2813,831,1117.2813,835,1113.2813" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="461" x2="837" y1="1113.2813" y2="1113.2813"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="156" x="468" y="1108.2153">CellularRingingMessage</text><!--MD5=[c5f3b5cf44cbfd3216a03d0f902d2afb]
@startuml

participant "Incoming call URC" as urc
participant "Call request" as call
participant "Messages DB" as message
participant "Service cellular" as cellular
participant "Service cellular notification " as notification

== Connected mode ==

    activate urc
    activate cellular
    urc -> cellular : Ring urc / Clip urc
    cellular -> cellular : identifyNotification
    cellular -> cellular : CellularRingNotification | CellularCallerIdNotification
    cellular -> notification :CellularCallerIdMessage | CellularIncominCallMessage

    urc -> cellular : Cmti urc
    cellular -> cellular : identifyNotification
    cellular -> cellular : receiveSms
    cellular -> message : add record
    deactivate urc

    activate message
    message -> cellular : new queeued
    cellular -> cellular : CellularSendSMSMessage
    cellular -> message : update record
    deactivate message

    activate call
    call -> cellular : CellularCallRequestMessage
    cellular -> cellular : handleCellularCallRequestMessage
    cellular -> notification : CellularRingingMessage
    deactivate call


== Do not Disturb mode ==

    activate urc

    urc -> cellular : Ring urc / Clip urc
    cellular -> cellular : identifyNotification
    cellular -> cellular : CellularRingNotification | CellularCallerIdNotification
    cellular -> cellular : hangUpCall

    urc -> cellular : Cmti urc
    cellular -> cellular : identifyNotification
    cellular -> cellular : receiveSms
    cellular -> message : add record
    deactivate urc

    activate message
    message -> cellular : new queeued
    cellular -> cellular : CellularSendSMSMessage
    cellular -> message : update record
    deactivate message

    activate call
    call -> cellular : CellularCallRequestMessage
    cellular -> cellular : handleCellularCallRequestMessage
    cellular -> notification : CellularRingingMessage
    deactivate call
    deactivate cellular

@enduml

PlantUML version 1.2021.2(Sun Mar 07 12:10:27 CET 2021)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: pl
Country: PL
--></g></svg>
\ No newline at end of file