<general type="BusyLampField"/>
<initialization>
<state value="off"/>
<identity value="2"/>
<variable name="subscr_uri" value="sip:104@192.168.137.1:5070"/>
</initialization>
<subscription type="dialog" to="<$(subscr_uri)>" for="$(subscr_uri)"/>
<NotifyParsingRules type="applies">
<level1 translates_to='OK'>/dialog-info[@entity="$(subscr_uri)"]</level1>
</NotifyParsingRules>
<NotifyParsingRules type="state">
<level1 translates_to="ringing">/dialog-info/dialog/state[.="early"]</level1>
<level1-1 translates_to="calling">/dialog-info/dialog[@direction="initiator"]</level1-1>
<level2 translates_to="ringing">/dialog-info/dialog/state[.="proceeding"]</level2>
<level2-1 translates_to="calling">/dialog-info/dialog[@direction="initiator"]</level2-1>
<level3 translates_to="offhook">/dialog-info/dialog/state[.="trying"]</level3>
<level4 translates_to="in_a_call">/dialog-info/dialog/state[.="confirmed"]</level4>
<level5 translates_to="free"/>
</NotifyParsingRules>
<NotifyParsingRules type="variable" id="call_id" state="ringing">
<level1 fetch_attribute="call-id">/dialog-info/dialog[@call-id]</level1>
</NotifyParsingRules>
<NotifyParsingRules type="variable" id="remote_tag" state="ringing">
<level1 fetch_attribute="remote-tag">/dialog-info/dialog[@remote-tag]</level1>
</NotifyParsingRules>
<NotifyParsingRules type="variable" id="local_tag" state="ringing">
<level1 fetch_attribute="local-tag">/dialog-info/dialog[@local-tag]</level1>
</NotifyParsingRules>
<NotifyParsingRules type="variable" id="remote_uri" state="ringing">
<level1 fetch_attribute="uri">/dialog-info/dialog/remote/target[@uri]</level1>
</NotifyParsingRules>
<action>
<invite target="$(subscr_uri)" when="on press" states="calling, in_a_call, offhook, free"/>
<invite target="$(remote_uri)" when="on press" state="ringing" request_uri="$(remote_uri)" replaces="$(call_id);to-tag=$(remote_tag);from-tag=$(local_tag)"/>
</action> |