[OpenSIPS-Users] drouting, AVP to store the current gateway id (id_avp_name)

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Jul 29 18:45:50 CEST 2010


Hi Matt,

I uploaded you patch on SVN and it will be part of the new 1.6.3 release 
tomorrow ;)

Thanks and regards,
Bogdan

Matt lehner wrote:
> 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
>>
>>
>>     
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro




More information about the Users mailing list