No subject


Thu Jan 29 11:41:19 CET 2009


he DB and doesn't do any kind of fifo. I don't use subscribers much=
, so my ability to offer suggestions is limited.<div><br></div><div>but if =
you look in opensipsctl, you&#39;ll see what it&#39;s doing, and I&#39;m su=
re you could just mimic that same bits in your higher level app. Be sure no=
t to miss the function calls in the script ie: &quot;credentials&quot;</div=
>

<div>---&amp;&lt;-- snip---</div><div><br></div><div><div>=A0=A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0add)</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0if [ $# -ne 3 ] ; then</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0usage_subscriber</div><div>=A0=A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0exit 1</div>

<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fi</div><div>=A0=A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0shift</div><div>=A0=A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0credentials $1 $2</div><div>=A0=A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0is_user $1</div><div>=A0=A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if [ $? -eq 0 ] ; then</div>

<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0minf=
o &quot;user &#39;$1&#39; already exists&quot;</div><div>=A0=A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0exit 1</div><div>=A0=A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fi</div><div>=A0=A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0set_user $1</div>

<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0check_alias $OSIPSUS=
ER $OSIPSDOMAIN</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0if [ &quot;$ALIAS_EXISTS&quot; =3D &quot;1&quot; ] ; then</div><div>=A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0minfo &quot;=
user &#39;$1&#39; already exists as alias&quot;</div>

<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0exit=
 1</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fi</div><div=
><br></div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if [ &quo=
t;$STORE_PLAINTEXT_PW&quot; =3D &quot;1&quot; ] ; then</div><div>=A0=A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PASS=3D&quot;$2&quo=
t;</div>

<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else</div><div>=A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PASS=3D&quot=
;&quot;</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fi</div=
><div><br></div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0QUER=
Y=3D&quot;insert into $SUB_TABLE ($SUBSCRIBER_COLUMN,\</div>

<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0$REA=
LM_COLUMN,$HA1_COLUMN,$HA1B_COLUMN,$PASSWORD_COLUMN) \</div><div>=A0=A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0values (&#39;$OSIPS=
USER&#39;,&#39;$OSIPSDOMAIN&#39;,&#39;$HA1&#39;,&#39;$HA1B&#39;,&#39;$PASS&=
#39;);&quot;;</div>

<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0$DBCMD &quot;$QUERY&=
quot;</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if [ $? -=
ne 0 ] ; then</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0merr &quot;introducing the new user &#39;$1&#39; to the data=
base failed&quot;</div>

<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else</div><div>=A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mecho &quot;=
new user &#39;$1&#39; added&quot;</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0fi</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0;;</div><div><br></div><br>
<div class=3D"gmail_quote">
On Thu, May 14, 2009 at 9:23 AM, Matti Zemack <span dir=3D"ltr">&lt;<a href=
=3D"mailto:Matti.Zemack at rtcfactory.com">Matti.Zemack at rtcfactory.com</a>&gt;=
</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex;">










<div lang=3D"SV" link=3D"blue" vlink=3D"purple">

<div>

<p>Hi all,</p>

<p>=A0</p>

<p><span lang=3D"EN-US">How do you all add new subscribers to your
systems?</span></p>

<p><span lang=3D"EN-US">Today we do it by =A0calling =93opensipsctl
add sdhgsd at asdjkhsd djhjhd=94 from our admin-php.</span></p>

<p><span lang=3D"EN-US">Looking through the code of opensipsctl it
seems to make an SQL query inserting the new user straight into the Databse
without passing FIFO or such.</span></p>

<p><span lang=3D"EN-US">=A0</span></p>

<p><span lang=3D"EN-US">Does there exist a more =93modern=94
way of doing this or is this the procedure used nowadays?</span></p>

<p><span lang=3D"EN-US">=A0</span></p>

<p><span lang=3D"EN-US">BTW, Anyone interested in the final PHP
code of triggering a reboot of Linksys and Grandstream using XML-RPC, just =
let
me know. Actually also some code of reboot of Siemens devices, although not
through opensips.</span></p>

<p><span lang=3D"EN-US">=A0</span></p>

<p><span lang=3D"EN-US">Best Regards,</span></p>

<p><span lang=3D"EN-US">Matti Zemack, Stockholm, Sweden</span></p>

<p><span lang=3D"EN-US">=A0</span></p>

<p><span lang=3D"EN-US">=A0</span></p>

<p><span lang=3D"EN-US" style=3D"color:#1F497D">=A0</span></p>

<p><span lang=3D"EN-US" style=3D"color:#1F497D">=A0</span><span lang=3D"EN-=
US"></span></p>

<p><b><span lang=3D"EN-US" style=3D"color:#1F497D">RTC Factory AB</span></b=
><span lang=3D"EN-US"></span></p>

<p><span lang=3D"EN-US" style=3D"color:gray">Jungfrugatan 6</span><span lan=
g=3D"EN-US"></span></p>

<p><span lang=3D"EN-US" style=3D"color:gray">114 44 Stockholm</span><span l=
ang=3D"EN-US"></span></p>

<p><span lang=3D"EN-US" style=3D"color:gray">SWEDEN</span><span lang=3D"EN-=
US"></span></p>

<p><span lang=3D"EN-US" style=3D"color:gray">=A0</span><span lang=3D"EN-US"=
></span></p>

<p><span lang=3D"EN-US" style=3D"color:gray">Tel: +46-8 410 420 03 </span><=
span lang=3D"EN-US"></span></p>

<p><span lang=3D"EN-US" style=3D"color:gray">SMS: +46-709 625 173</span><sp=
an lang=3D"EN-US"></span></p>

<p><span lang=3D"EN-US" style=3D"color:gray">Fax: +46-8 410 420 49</span><s=
pan lang=3D"EN-US"></span></p>

<p><span lang=3D"EN-US" style=3D"color:gray">Email: <a href=3D"mailto:matti=
.zemack at rtcfactory.com" target=3D"_blank">matti.zemack at rtcfactory.com</a></=
span></p>

<p><span lang=3D"EN-US" style=3D"color:#1F497D">=A0</span><span lang=3D"EN-=
US"></span></p>

<p><span lang=3D"EN-US" style=3D"color:#1F497D">=A0</span><span lang=3D"EN-=
US"></span></p>

<p><i><span lang=3D"EN-US" style=3D"font-size:9.0pt;color:#7F7F7F">RTC
Factory is a global communications provider, targeting virtual operators an=
d
ISPs. RTC Factory provides =93Communication as a Service=94: basically
the equivalent of Google=92s GrandCentral combined with Skype and Rebtel
functionality. These IP-based services are hosted and provided within a
white-label framework, and sold through the provider=92s regular sales chan=
nels.</span></i></p>

<p><span lang=3D"EN-US">=A0</span></p>

</div>

</div>


<br>_______________________________________________<br>
Users mailing list<br>
<a href=3D"mailto:Users at lists.opensips.org">Users at lists.opensips.org</a><br=
>
<a href=3D"http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target=
=3D"_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br=
>
<br></blockquote></div><br></div>

--0015174c334e606af30469e03dfa--



More information about the Users mailing list