<div dir="ltr">Hello ALL<div><br></div><div style>I have Some problem in using Unlang.</div><div style><br></div><div style>I need to call some function in PostgreSQL database send some parameter from <font color="#ff0000">request attribute </font> to it , get replay from function and then change some <font color="#ff0000">check attribute</font>  item (such as Pool-Name).or <font color="#ff0000">replay  attribute</font>   </div>
<div style><br></div><div style><br></div><div style>Unlang :</div><div style><br></div><div style><div>cuncurrent-session-status =”{%sql:select public.findout_cuncurrent_sessions_for_a_user(%{request:User-Name},%{request:Acct-Session-Id},%{request:NAS-IP-Address},%{request:NAS-Port})}”;</div>
<div>if (cuncurrent-session-status=='Accept')</div><div>{</div><div><span class="" style="white-space:pre">     </span>ok</div><div>} </div><div>elseif (cuncurrent-session-status=='Reject')</div><div>{</div><div>
<span class="" style="white-space:pre">       </span>update control </div><div><span class="" style="white-space:pre">   </span> {Pool-Name='Exceeded-Concurrent-Session'}</div><div><span class="" style="white-space:pre"> </span></div>
<div>}</div><div><br></div><div><br></div><div style>i know that i have some mistake in script but i can not find where !!!!!</div><div style><br></div><div style><br></div></div><div style><br></div></div>