[OpenSIPS-Users] Local Route question

Jehanzaib Younis jehanzaib.kiani at gmail.com
Wed Oct 26 21:34:37 UTC 2022


Hi Micheal,

You can use t_on_reply and then something like this:
      if (t_check_status("200")) {
         ..your db query
      }

Regards,
Jehanzaib


On Thu, Oct 27, 2022 at 9:22 AM Saint Michael <venefax at gmail.com> wrote:

> Thank you for the clarification.
> But then how do you intercept the Connect?
> Where in the code?
> I need to fire a db query when the call connects.
> Is this even possible?
>
>
>
> On Wed, Oct 26, 2022, 10:51 AM Bogdan-Andrei Iancu <bogdan at opensips.org>
> wrote:
>
>> Hi,
>>
>> please see
>> https://www.opensips.org/Documentation/Script-Routes-3-2#local_route -
>> the local route is triggered only for internally generated (UAC)
>> requests, so you will never have replies over there.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>    https://www.opensips-solutions.com
>> OpenSIPS Bootcamp 5-16 Dec 2022, online
>>    https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>>
>> On 10/26/22 5:28 AM, Saint Michael wrote:
>> > 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?
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221027/f4aa364b/attachment.html>


More information about the Users mailing list