[OpenSIPS-Users] drouting, AVP to store the current gateway id (id_avp_name)
Matt lehner
mlehner at gmail.com
Sun Jul 25 20:19:55 CEST 2010
Brett,
I made a patch to allow for the ID avp to be accessed in the routing
script. There does not seem to be a way to make a AVP read-only, so
results would be undefined if you tried to write to it. Though that
wasn't the purpose of the patch anyway.
modparam("drouting", "id_avp", "$avp(i:100)")
Also, it will return a value only after do_routing()/next_gw() is
called and before the request is sent out. All replies and subsequent
requests will show a null value in the AVP. I personally am using the
dialog module to keep the information around longer with help of
dlg_val.
I submitted the patch through sourceforge, you can download it there
if you want to give it a try.
https://sourceforge.net/tracker/?func=detail&aid=3034371&group_id=232389&atid=1086412
Matt
On Fri, Jul 23, 2010 at 4:03 PM, Brett Nemeroff <brett at nemeroff.com> wrote:
> On Fri, Jul 23, 2010 at 2:15 PM, Matt lehner <mlehner at gmail.com> wrote:
>>
>> I would like to be able to store the current gateway id along with my
>> accounting records when using drouting. I browsed quickly in the code
>> and see a AVP that stores this info, but it is clearly referred to as
>> "INTERNAL_USE_ONLY". Would it be easy to make this AVP available in
>> the routing scripts as a read-only? I am considering doing the
>> modifications myself, but I have not yet become familiar with code API
>> for AVPs.
>>
>
> I have to say, this function would be immensely useful. I think I've
> requested this before as well. If you patch it, I'd like your patch. :D
> Today, I use the attr field to pull this information. It's clunky, but it
> works. I set attr == id.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list