<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<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"></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=""><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=""><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 width="175" style="width:131.25pt;padding:0in">
<p style="margin:0in;font-size:11pt;font-family:Calibri, sans-serif"><a href="https://www.nexvortex.com/" style=""><span style=""><img width="168" height="39" src="https://www.nexvortex.com/files/nexvortex-logo.png" alt="image" style="width: 1.75in; height: 0.4083in;"></span></a><span><span> </span> </span><a href="https://www.facebook.com/nexVortex/" style=""><span style=""><img width="32" height="32" src="https://www.nexvortex.com/files/facebook-icon-circle.png" alt="image" style="width: 0.3333in; height: 0.3333in;"></span></a><span><span> </span> </span><a href="https://twitter.com/nexvortex/" style=""><span style=""><img width="32" height="32" src="https://www.nexvortex.com/files/twitter-icon-circle.png" alt="image" style="width: 0.3333in; height: 0.3333in;"></span></a><span><span> </span> </span><a href="https://www.linkedin.com/company/nexvortex-inc/" style=""><span style=""><img width="32" height="32" src="https://www.nexvortex.com/files/linkedin-icon-circle.png" alt="image" style="width: 0.3333in; height: 0.3333in;"></span></a><span></span></p>
</td>
</tr>
<tr style="height:6pt">
<td style="padding:0in;height:6pt"></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 <sr-users-bounces@lists.kamailio.org> on behalf of Adarsh Chauhan <adarshchauhan@hotmail.com><br>
<strong>Sent:</strong> Wednesday, September 22, 2021, 1:04 AM<br>
<strong>To:</strong> sr-users@lists.kamailio.org<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">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>
</body>
</html>