<p></p>
<p>As an option, we can set HELD_ERROR_CODE and normal HELD response and construction like</p>
<pre><code>  modparam("lost", "xavp_responce", "held_responce")
...
  lost_held_dereference("$(var(url){s.unbracket})", "emergencyDispatch", "civic geodetic", "$var(pidf)", "$var(err)");
  switch ($xavp(held_responce[0]=>HELD_ERROR_CODE)) {
    case "responceWithPresence":
      route(ADD_LOCATION_BY_VALUE);
    case "responceWithLocationUriSet":
      route(ADD_LOCATION_BY_REFERENCE);
    case "responceWithPresenceAndLocationUriSet":
      route(ADD_LOCATION_BY_VALUE);
      route(ADD_LOCATION_BY_REFERENCE);
    case "badHeldResponce":
      route(TRY_OTHER_LOCATION_METHOD);
    case "locationUnknown":
      xlog(L_ERR, "Received LIS error response: $(varLisErrorMessage)");
      route(TRY_DEFAULT_PSAP);
    case "generalLisError":
      xlog(L_ERR, "Received unexpected LIS error response: $(varLisErrorMessage)");
      route(TRY_OTHER_LOCATION_METHOD);
    default:
      xlog(L_WARNING, "Received unexpected LIS response: $xavp(held_responce[0]=>HELD_ERROR_CODE) - $xavp(held_responce[0]=>HELD_ERROR_MESSAGE)");
      route(TRY_DEFAULT_PSAP);
  }  
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2724#issuecomment-831040777">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZJKJNERGOYVTOEAUGDTLY4CDANCNFSM436YMEIQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMRNO7TQZ7NRRXGZMTTLY4CDA5CNFSM436YMEI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGGEK2CI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2724#issuecomment-831040777",
"url": "https://github.com/kamailio/kamailio/issues/2724#issuecomment-831040777",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>