Pre-Submission Checklist

Type Of Change

Checklist:

Description

Ported all carrierroute module functions to KEMI API.

Here is an example,

...
    # User location service
    def ksr_route_location(self, msg):
        if KSR.pv.get("$rm") == "INVITE" and KSR.carrierroute.cr_user_carrier("$fU", "$fd", "$avp(carrier)") > 0:
            if KSR.pv.get("$rm") == "INVITE" and KSR.carrierroute.cr_route("$avp(carrier)","$avp(domain)","$rU","$rU","call_id") > 0:
                KSR.info('Routing call via user carrier route\n')
                self.ksr_route_relay(msg)

        rc = KSR.registrar.lookup("location")
        if rc < 0:
            KSR.tm.t_newtran()
            if rc == -1 or rc == -3:
                KSR.sl.send_reply(404, "Not Found")
                return -255
            elif rc == -2:
                KSR.sl.send_reply(405, "Method Not Allowed")
                return -255

        # when routing via usrloc, log the missed calls also
        if KSR.is_INVITE() :
            KSR.setflag(FLT_ACCMISSED)

        self.ksr_route_relay(msg)
        return -255
...

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3247

Commit Summary

File Changes

(6 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3247@github.com>