<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>Nice catch! That could be indeed the problem.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 22.09.21 14:16, Ben Kaufman wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CH2PR12MB4181C9BFCD5505894FCB924BDDA29@CH2PR12MB4181.namprd12.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div style="color: rgb(33, 33, 33); background-color: rgb(255,
255, 255);" dir="auto">
Am I misreading, or is this a defined environmental variable
named "STAGE" but you're evaluating an environmental variable
named "DEVSTAGE"?</div>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255,
255, 255);">
<table style="font-family: -apple-system, HelveticaNeue;
font-size: 16px; border-collapse: collapse;">
<tbody>
<tr>
<td style="padding:0in">
<p
style="margin:0in;font-size:11pt;font-family:Calibri,
sans-serif"><b><span
style="font-size:12pt;line-height:1.5">Ben
Kaufman</span></b><span
style="font-size:12pt;line-height:1.5"></span></p>
</td>
</tr>
<tr>
<td style="padding:0in">
<p
style="margin:0in;font-size:11pt;font-family:Calibri,
sans-serif"><i><span>Sr. VoIP Engineer</span></i><span></span></p>
</td>
</tr>
<tr style="height:12pt">
<td style="padding:0in;height:12pt"><br>
</td>
</tr>
<tr>
<td style="padding:0in">
<p
style="margin:0in;font-size:11pt;font-family:Calibri,
sans-serif"><span>P:</span></p>
</td>
</tr>
<tr>
<td style="padding:0in">
<p
style="margin:0in;font-size:11pt;font-family:Calibri,
sans-serif"><span>E:<span> </span><a
href="mailto:bkaufman@nexvortex.com" style=""
moz-do-not-send="true"><span style="">bkaufman@nexvortex.com</span></a></span></p>
</td>
</tr>
<tr>
<td style="padding:0in">
<p
style="margin:0in;font-size:11pt;font-family:Calibri,
sans-serif"><span>24 hour client support:<span> </span><a
href="tel:+18556396300" style=""
moz-do-not-send="true"><span style="">855.639.6300</span></a></span></p>
</td>
</tr>
<tr style="height:6pt">
<td style="padding:0in;height:6pt">
<p
style="margin:0in;font-size:11pt;font-family:Calibri,
sans-serif"><span> </span></p>
</td>
</tr>
<tr>
<td style="width:131.25pt;padding:0in" width="175">
<p
style="margin:0in;font-size:11pt;font-family:Calibri,
sans-serif"><a href="https://www.nexvortex.com/"
style="" moz-do-not-send="true"><span style=""><img
src="https://www.nexvortex.com/files/nexvortex-logo.png" alt="image"
style="width: 1.75in; height: 0.4083in;"
moz-do-not-send="true" width="168" height="39"></span></a><span><span> </span> </span><a
href="https://www.facebook.com/nexVortex/"
style="" moz-do-not-send="true"><span style=""><img
src="https://www.nexvortex.com/files/facebook-icon-circle.png"
alt="image" style="width: 0.3333in; height:
0.3333in;" moz-do-not-send="true" width="32"
height="32"></span></a><span><span> </span> </span><a
href="https://twitter.com/nexvortex/" style=""
moz-do-not-send="true"><span style=""><img
src="https://www.nexvortex.com/files/twitter-icon-circle.png"
alt="image" style="width: 0.3333in; height:
0.3333in;" moz-do-not-send="true" width="32"
height="32"></span></a><span><span> </span> </span><a
href="https://www.linkedin.com/company/nexvortex-inc/" style=""
moz-do-not-send="true"><span style=""><img
src="https://www.nexvortex.com/files/linkedin-icon-circle.png"
alt="image" style="width: 0.3333in; height:
0.3333in;" moz-do-not-send="true" width="32"
height="32"></span></a><span></span></p>
</td>
</tr>
<tr style="height:6pt">
<td style="padding:0in;height:6pt"><br>
</td>
</tr>
<tr>
<td style="padding:0in">
<p
style="margin:0in;font-size:11pt;font-family:Calibri,
sans-serif"><i><span
style="font-size:9pt;line-height:1.5">NOTE: This
e-mail and any attachments are from nexVortex,
Inc. and are intended solely for the use and
review of the individual(s) to whom it is
addressed. If you believe you received this
e-mail in error, please notify the sender
immediately, delete the e-mail (and any
attachment</span></i></p>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
<div id="id-b887656c-22ba-4c9a-b080-a2e1e6d0a350"
class="ms-outlook-mobile-reference-message">
<div style="font-family: sans-serif; font-size: 13.8pt; color:
rgb(0, 0, 0);"><br>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg"><strong>From:</strong> sr-users
<a class="moz-txt-link-rfc2396E" href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a> on behalf of
Adarsh Chauhan <a class="moz-txt-link-rfc2396E" href="mailto:adarshchauhan@hotmail.com"><adarshchauhan@hotmail.com></a><br>
<strong>Sent:</strong> Wednesday, September 22, 2021, 1:04 AM<br>
<strong>To:</strong> <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<strong>Subject:</strong> [SR-Users] Unable to pull
enviornment variables<br>
</div>
<br>
<meta content="text/html; charset=utf-8">
<div dir="ltr">Hi Team,
<div><br>
</div>
<div>Need some help here.</div>
<div>Want to pull environment variable however kamailio just
doesnt pick it.</div>
<div><br>
</div>
<div>I exported the environment variable</div>
<div><b>export STAGE="dev"</b></div>
<div><br>
</div>
<div>Then i tried following</div>
<div>1)</div>
<div><b>#!defenv DEVSTAGE</b></div>
<div>gives error</div>
<div> 0(3809) ERROR: <core> [core/cfg.lex:2085]:
pp_define_env(): env variable not defined [DEVSTAGE] </div>
<div><br>
</div>
<div>2) </div>
<div><b>#!substdef "/DEVSTAGE/$env(DEVSTAGE)/";</b><br>
</div>
<div><br>
</div>
<div>
<div dir="ltr" class="gmail_signature">
<div dir="ltr"> 0(3962) DEBUG: <core>
[core/ppcfg.c:87]: pp_subst_add(): ### added subst
expression: [/DEVSTAGE/$env(DEVSTAGE)/]<br>
0(3962) DEBUG: <core> [core/cfg.lex:1964]:
pp_define(): defining id: DEVSTAGE<br>
0(3962) DEBUG: <core>
[core/parser/parse_fline.c:249]: parse_first_line():
first line type 1 (request) flags 1<br>
0(3962) DEBUG: <core>
[core/parser/msg_parser.c:677]: parse_msg(): SIP
Request:<br>
0(3962) DEBUG: <core>
[core/parser/msg_parser.c:679]: parse_msg(): method:
<OPTIONS><br>
0(3962) DEBUG: <core>
[core/parser/msg_parser.c:681]: parse_msg(): uri:
<<a href="mailto:sip%3Ayou@kamailio.org"
moz-do-not-send="true">sip:you@kamailio.org</a>><br>
0(3962) DEBUG: <core>
[core/parser/msg_parser.c:683]: parse_msg(): version:
<SIP/2.0><br>
0(3962) DEBUG: <core>
[core/parser/parse_hname2.c:293]:
parse_sip_header_name(): parsed header name [Via] type 1<br>
0(3962) DEBUG: <core>
[core/parser/parse_via.c:2639]: parse_via(): end of
header reached, state=2<br>
0(3962) DEBUG: <core>
[core/parser/msg_parser.c:555]: parse_headers(): Via
found, flags=2<br>
0(3962) DEBUG: <core>
[core/parser/msg_parser.c:557]: parse_headers(): this is
the first via<br>
0(3962) DEBUG: <core> [core/pvapi.c:497]:
pv_spec_lookup(): PV <$env(DEVSTAGE)> is not in
cache<br>
0(3962) DEBUG: <core> [core/pvapi.c:335]:
pv_cache_add(): PV cache not initialized, doing it now<br>
0(3962) DEBUG: <core> [core/pvapi.c:371]:
pv_cache_add(): pvar [$env(DEVSTAGE)] added in cache<br>
0(3962) DEBUG: <core> [core/cfg.lex:2053]:
pp_define_set(): ### setting define ID [DEVSTAGE] value
[<null>] (mode: 1)<br>
0(3962) DEBUG: <core> [core/ppcfg.c:188]:
pp_substdef_add(): ### added substdef:
[DEVSTAGE]=[<null>] (0)<br>
0(3962) DEBUG: <core> [core/re.c:436]:
subst_run(): running. r=1<br>
0(3962) DEBUG: <core> [core/re.c:504]:
subst_str(): no match<br>
0(3962) DEBUG: <core> [core/re.c:436]:
subst_run(): running. r=1<br>
0(3962) DEBUG: <core> [core/re.c:504]:
subst_str(): no match<br>
<div><br>
</div>
<div><br>
</div>
<div>my end goal is to compare the directive and load
modules accordingly.</div>
<div><b>#!ifdef DEVSTAGE == "dev"</b><br>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
Nov 08-11, 2021 (Europe Timezone) - Nov 22-25, 2021 (America Timezone)
* <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</body>
</html>