Skip to content

Commit

Permalink
docs: drop is_avp_set from xml and m4
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Feb 20, 2024
1 parent fadcd38 commit 4161b52
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion menuconfig/configs/opensips_trunking.m4
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ route{
}

ifelse(DO_CALL_LIMITATION,`yes',`
if (is_avp_set("$avp(trunk_attrs)") && $avp(trunk_attrs)=~"^[0-9]+$") {
if ($avp(trunk_attrs) != NULL && $avp(trunk_attrs)=~"^[0-9]+$") {
get_profile_size("trunkCalls","$si",$var(size));
if ( $(var(size){s.int}) >= $(avp(trunk_attrs){s.int}) ) {
send_reply(486,"Busy Here");
Expand Down
2 changes: 1 addition & 1 deletion modules/call_control/doc/call_control_admin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ modparam("call_control", "stop", "call-id=$ci to=$tu from=$fu
<programlisting format="linespecific">

...
if (is_avp_set($avp(805))) {
if ($avp(805) != NULL) {
# the diverter AVP is set, use it as billing party
$avp(billing_party_domain) = $(avp(805){uri.domain});
} else {
Expand Down
4 changes: 2 additions & 2 deletions modules/h350/doc/h350_admin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ if (!h350_result_call_preferences("callee_pref_") &amp;&amp; ($retcode == -1))
# Example for forward-unconditionally (CFU)
#

if (is_avp_set("$avp(callee_pref_u)"))
if ($avp(callee_pref_u) != NULL)
{
# replace R-URI with CFU URI, g will fetch all CFU URIs
# --> request can fork
Expand Down Expand Up @@ -799,7 +799,7 @@ if (!h350_result_service_level("caller_sl_") &amp;&amp; ($retcode == -1))
# make routing decision based on service level AVPs
#

if (is_avp_set("$avp(caller_sl_international)"))
if ($avp(caller_sl_international) != NULL)
{
t_relay();
}
Expand Down
16 changes: 8 additions & 8 deletions modules/osp/etc/sample-osp-opensips.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ route[2] {
$avp(reqdate) = $hdr(Date);
} else {
setrequestdate();
if (is_avp_set("$avp(reqdate)")) {
if ($avp(reqdate) != NULL) {
append_hf("Date: $avp(reqdate)\r\n");
}
}
Expand Down Expand Up @@ -1005,13 +1005,13 @@ route[3] {
prepareospresponse();
switch ($retcode) {
case 300:
if (is_avp_set("$avp(identity)")) {
if ($avp(identity) != NULL)) {
append_to_reply("Identity: $avp(identity)\r\n");
}
sl_send_reply(300, "Redirect");
break;
case 380:
if (is_avp_set("$avp(cnam)")) {
if ($avp(cnam) != NULL) {
append_to_reply("P-Asserted-Identity: $avp(cnam) <$fu>\r\n");
} else {
append_to_reply("P-Asserted-Identity: $fu\r\n");
Expand All @@ -1028,7 +1028,7 @@ route[3] {
route[4] {
log(3, "Prepare all routes and fork-off\n");

if (is_avp_set("$avp(identity)")) {
if ($avp(identity) != NULL) {
append_hf("Identity: $avp(identity)\r\n");
}

Expand All @@ -1044,7 +1044,7 @@ route[4] {
route[5] {
log(3, "Try the 1st route\n");

if (is_avp_set("$avp(identity)")) {
if ($avp(identity) != NULL) {
append_hf("Identity: $avp(identity)\r\n");
}

Expand Down Expand Up @@ -1116,12 +1116,12 @@ route[6] {
route[8] {
log(3, "Insert SIP Reason header\n");

if (is_avp_set("$avp(reasontype)")) {
if ($avp(reasontype) != NULL) {
$var(type) = $avp(reasontype);
if (is_avp_set("$avp(reasoncause)")) {
if ($avp(reasoncause) != NULL) {
$var(cause) = ";cause=" + $avp(reasoncause);
}
if (is_avp_set("$avp(reasontext)")) {
if ($avp(reasontext) != NULL) {
$var(text) = ";text=\"" + $avp(reasontext) + "\"";
}
append_to_reply("Reason: $var(type)$var(cause)$var(text)\r\n");
Expand Down

0 comments on commit 4161b52

Please sign in to comment.