[SR-Users] Check if xavp is set
Marrold
kamailio at marrold.co.uk
Mon Apr 18 01:26:16 CEST 2016
> Try:
>
> if(defined $xavp(tm_contacts))
>
> or:
>
> if($xavp(tm_contacts) != $null)
>
Both of the above worked, Thanks!
> I do wish "truthiness" of various sorts were better defined in Kamailio.
>
I don't quite follow what you mean here, but I probably agree with you. In
particular for t_load_contacts() -
If the destination set contains only one branch, the function does
nothing.
Function returns 1 if loading of contacts succeeded or there was
nothing to do. In case of an error, function returns -1 (see syslog).
I guess in my mind it might be worthwhile to return a different return code
if the destination set contains only one branch.
Thanks again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160418/df934b54/attachment.html>
More information about the sr-users
mailing list