[Users] When does an AVP get destroyed? What if you delete an non-existent AVP?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Jul 21 16:18:45 CEST 2005


Hi Kanakatti,

all AVPs are deleted along with the transaction, you do not have do 
delete them explicitly. A transaction is completed and deleted when a 
final reply was sent back to UAC (and ACK if INVITE).

So feel free to use AVPs as much as you like and as you like - the 
clean-up is done automatically.

regarding the 'avp_delete("$destination")' - the function returns true 
in script only if there was a deleted AVP. Nothing "bad" happens otherwise.

regards,
bogdan

Kanakatti M. Subramanya wrote:

> Does the AVP get deleted at the end of a transaction?  At the end of a 
> specific dialog?
> If the answer is "transaction" (and I think it is), what exactly 
> constitutes a transaction?  e.g. when an INVITE is received,is the 
> transaction completed when the corresponding "200 OK" is processed (or 
> CANCEL)?
>
> Also, if I have 'avp_delete("$destination")', and the AVP 
> '$destination' has never been set, is this "bad"?  or a no-op?
>
>
> The above two are related.  I am using AVPs to move information around 
> in my script, and am wondering how much cleanup is necessary (i.e., 
> delete every avp i populate, etc., etc.)
>
> cheers
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>  
>





More information about the Users mailing list