Hey Bogdan,<div>you know, for the life of me, I couldn't get it to be an int. Even in my select, I cast the result to an INT.</div><div><br></div><div>Well, you know, I had the exact same problem with memcache (store an INT, but retrieved it's a STR) and I fixed that with:</div>
<div>$(avp(s:my_string_number){<a href="http://s.int">s.int</a>})</div><div><br></div><div>So I did the same with this var, and it seems to be working great now. Whew!</div><div><br></div><div>I'm curious, how do you cast the other way? INT to STR? Haven't needed it yet, but surely it'll come up.</div>
<div><br></div><div>BTW, I really like this dialplan module. I'd love to see your JSON idea adapted into that as well. How far out do you think that is? I've got uses for it now. I think it's a great idea. Id' stick it on all the modules. :)</div>
<div><br></div><div><br></div><div>-Brett</div><div><br></div><div><br></div><div> <br><br><div class="gmail_quote">On Fri, May 1, 2009 at 6:44 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Brett,<br>
<br>
I think you set the value of the AVP as string, while the module do expect an integer value (the DP id).<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Brett Nemeroff wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hey All,<br>
I'm using the dialplan module and trying to use an avp for the dpid.. avp_print shows my avp like this:<br>
Apr 30 21:48:26 sip1 /usr/local/sbin/opensips[8079]: INFO:avpops:ops_print_avp: p=0xb620c0f8, flags=0x0003 Apr 30 21:48:26 sip1 /usr/local/sbin/opensips[8079]: INFO:avpops:ops_print_avp: name=<trunkid> Apr 30 21:48:26 sip1 /usr/local/sbin/opensips[8079]: INFO:avpops:ops_print_avp: val_str=<3 / 1> <br>
And I'm calling this:<br>
dp_translate("$avp(s:trunkid)","$ruri.user/$avp(s:trans_uri)");<br>
<br>
And it keeps giving this error:<br>
Apr 30 21:49:15 sip1 /usr/local/sbin/opensips[8090]: ERROR:dialplan:dp_get_ivalue: no AVP or SCRIPTVAR found (error in scripts) Apr 30 21:49:15 sip1 /usr/local/sbin/opensips[8090]: ERROR:dialplan:dp_translate_f: no dpid value <br>
It's almost like it doesn't like the string value.. but for the life of me, I can't figure out how to get it to return an integer value.. But I'm not even sure this is the case..<br>
<br>
Any ideas?<br>
<br>
BTW, if I staticly stick that number "3" into the dpid field, it works *perfectly*<br>
<br>
Thanks,<br>
Brett<br>
<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>