[OpenSIPS-Users] Local Route question

Karsten Wemheuer kwem at gmx.de
Wed Oct 26 05:52:01 UTC 2022


Hi,

Am Dienstag, dem 25.10.2022 um 22:28 -0400 schrieb Saint Michael:
> Dear Friends
> local_route
>        {
>        if (is_method("200"))
> {
>                }
> }
>
> I need to intercept the code at the moment when a call connects, so I
> may notify that information to the database. What specific code can I
> use inside a Local Route so the 200 OK corresponds with a real
> connection and not any other kind of 200?
> Is this doable?

Yes, I think You can catch the 200 OK, but maybe not in the
local_route. From the docs "The local route is executed automatically
when a new SIP request is generated by TM, internally (no UAC side)"

The 200 OK is a response to some SIP method, so I think You should use
a onreply route. But without knowledge of Your routing logic it would
be difficult to help in more details.

You can distinguish the different 200 OK messages by the presence of
the SDP, e.g. with
	if (has_body("application/sdp")) {

HTH,

Karsten




More information about the Users mailing list