Re: kannel configuration to register SMS service subscribers
Jean-Claude Adams <[email protected]> Wed, 3 Oct 2018 09:05:05 -0400
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <CAHko=BX1WNtDubFM8aH8BgA4Zrk2RMHz2EW3xAMQfTT=zznHdg@mail.gmail.com> |
--0000000000009720c6057752b021 Content-Type: text/plain; charset="UTF-8" Hi Yahya, I guest you need to a webservice can update or insert all the messages into your database. use get-url config into sms-service # SMS SERVICE Two group = sms-service keyword = default #keyword-regex = default #text = "Service two auto reply goes here" accept-x-kannel-headers = true catch-all = true max-messages = 1 omit-empty = true concatenation = true get-url = " http://localhost/handler?key=%k&from=%p&to=%P&sword=%a&binfo=%B&smsc_id=%i&nword=%s " You can use this kind of parameters. I hope helps. Best regards On Wed, Oct 3, 2018 at 3:04 AM Yahya M. <[email protected]> wrote: > I am using kannel 1.4.4 and I want to register subscribers based on the > keyword they send to my short code number. So far I am using smsbox.log to > register subscribers manually by adding them to appropriate group. > > > What I want is some script that can be called when message arrives and > save the phone number that sent message to appropriate database based on > the sent keyword and at the same time, send them auto reply. > > Thanks. Regards. > > Here is my kannel.conf file > > # CORE > group = core > admin-port = 13000 > admin-password = myPass > status-password = myPass > log-file = /var/log/kannel/kannel.log > log-level = 0 > access-log = /var/log/kannel/access.log > smsbox-port = 13001 > store-type = spool > store-location = /var/spool/kannel/store > smsbox-max-pending = 100 > #dlr-storage = mysql > dlr-storage = internal > > # SMSBOX > group = smsbox > bearerbox-host = localhost > bearerbox-port = 13001 > sendsms-port = 13131 > sendsms-chars = "0123456789+ " > log-file = /var/log/kannel/smsbox.log > log-level = 0 > access-log = /var/log/kannel/access.log > mo-recode = true > #immediate-sendsms-reply = true > global-sender = 6506 > > ## SMSC smpp1 > group = smsc > smsc = smpp > smsc-id = smpp1 > allowed-smsc-id = smpp1 > preferred-smsc-id = smpp1 > host = SMSC_IP > port = SMSC_Port > transceiver-mode = yes > smsc-username = username > smsc-password = myPass > system-type = "VMA" > log-file = /var/log/kannel/smsc-smpp1.log > log-level = 0 > throughput = 10 > > > > > # SENDSMS-USER > group = sendsms-user > default-smsc = none > username = myUsername > password = myPass > max-messages = 6 > concatenation = true > > > # SMS SERVICE HELP > group = sms-service > keyword = HELP > text = "Text to be sent to users who send Help" > omit-empty = true > max-messages = 3 > concatenation = true > > > > # SMS SERVICE One > group = sms-service > keyword-regex = ^O$ > text = "Service one auto-reply goes here" > omit-empty = true > max-messages = 2 > concatenation = true > > > # SMS SERVICE Two > group = sms-service > keyword-regex = ^B$ > text = "Service two auto reply goes here" > omit-empty = true > max-messages = 2 > concatenation = true > > > # SMS SERVICE default > group = sms-service > keyword = default > text = "Dear customer, you have sent a wrong keyword. " > omit-empty = true > max-messages = 2 > concatenation = true > > > > -- Lic. Jean-Claude Adams Entrepreneur phone: +595 971 371794 skype: arrobasoft Visit us at arrobasoft <http://www.arrobasoft.com> --0000000000009720c6057752b021 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div>Hi= Yahya,</div><div><br></div><div>I guest you need to a webservice can updat= e or insert all the messages into your database.</div><div><br></div><div>u= se get-url config into sms-service</div><div><br></div><div><div><font face= =3D"monospace, monospace"># SMS SERVICE Two</font></div><div><font face=3D"= monospace, monospace">group =3D sms-service</font></div><div><font face=3D"= monospace, monospace">keyword =3D default<br></font></div><div><font face= =3D"monospace, monospace">#keyword-regex =3D default<br></font></div><div><= font face=3D"monospace, monospace">#text =3D "Service two auto reply g= oes here"</font></div><div><font face=3D"monospace, monospace">accept-= x-kannel-headers =3D true<br>catch-all =3D true<br>max-messages =3D 1<br></= font></div><div><font face=3D"monospace, monospace">omit-empty =3D true</fo= nt></div><div><font face=3D"monospace, monospace">concatenation =3D true</f= ont></div><div><font face=3D"monospace, monospace">get-url =3D "<a hre= f=3D"http://localhost/handler?key=3D%k&from=3D%p&to=3D%P&sword= =3D%a&binfo=3D%B&smsc_id=3D%i&nword=3D%s">http://localhost/hand= ler?key=3D%k&from=3D%p&to=3D%P&sword=3D%a&binfo=3D%B&sm= sc_id=3D%i&nword=3D%s</a>"<br></font></div><div><font face=3D"mono= space, monospace"><br></font></div>You can use this kind of parameters.<br>= <br>I hope helps.<br><br>Best regards</div><div><br></div></div></div></div= ></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, Oct 3, 2018 = at 3:04 AM Yahya M. <<a href=3D"mailto:[email protected]">yahi= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_= quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1= ex"><div dir=3D"ltr"><div dir=3D"ltr">I am using kannel 1.4.4 and I want to= register subscribers based on the keyword they send to my short code numbe= r. So far I am using smsbox.log to register subscribers manually by adding = them to appropriate group.<div><br></div><div><br></div><div>What I want is= some script that can be called when message arrives and save the phone num= ber that sent message to appropriate database based on the sent keyword and= at the same time, send them auto reply.</div><div><br></div><div>Thanks. R= egards.</div><div><br></div><div>Here is my kannel.conf file</div><div><br>= </div><div><div><font face=3D"monospace, monospace"># CORE</font></div><div= ><font face=3D"monospace, monospace">group =3D core</font></div><div><font = face=3D"monospace, monospace">admin-port =3D 13000</font></div><div><font f= ace=3D"monospace, monospace">admin-password =3D myPass</font></div><div><fo= nt face=3D"monospace, monospace">status-password =3D myPass</font></div><di= v><font face=3D"monospace, monospace">log-file =3D /var/log/kannel/kannel.l= og</font></div><div><font face=3D"monospace, monospace">log-level =3D 0</fo= nt></div><div><font face=3D"monospace, monospace">access-log =3D /var/log/k= annel/access.log</font></div><div><font face=3D"monospace, monospace">smsbo= x-port =3D 13001</font></div><div><font face=3D"monospace, monospace">store= -type =3D spool</font></div><div><font face=3D"monospace, monospace">store-= location =3D /var/spool/kannel/store</font></div><div><font face=3D"monospa= ce, monospace">smsbox-max-pending =3D 100</font></div><div><font face=3D"mo= nospace, monospace">#dlr-storage =3D mysql</font></div><div><font face=3D"m= onospace, monospace">dlr-storage =3D internal</font></div><div><font face= =3D"monospace, monospace"><br></font></div><div><font face=3D"monospace, mo= nospace"># SMSBOX</font></div><div><font face=3D"monospace, monospace">grou= p =3D smsbox</font></div><div><font face=3D"monospace, monospace">bearerbox= -host =3D localhost</font></div><div><font face=3D"monospace, monospace">be= arerbox-port =3D 13001</font></div><div><font face=3D"monospace, monospace"= >sendsms-port =3D 13131</font></div><div><font face=3D"monospace, monospace= ">sendsms-chars =3D "0123456789+ "</font></div><div><font face=3D= "monospace, monospace">log-file =3D /var/log/kannel/smsbox.log</font></div>= <div><font face=3D"monospace, monospace">log-level =3D 0</font></div><div><= font face=3D"monospace, monospace">access-log =3D /var/log/kannel/access.lo= g</font></div><div><font face=3D"monospace, monospace">mo-recode =3D true</= font></div><div><font face=3D"monospace, monospace">#immediate-sendsms-repl= y =3D true</font></div><div><font face=3D"monospace, monospace">global-send= er =3D 6506</font></div><div><font face=3D"monospace, monospace"><br></font= ></div><div><font face=3D"monospace, monospace">## SMSC smpp1</font></div><= div><font face=3D"monospace, monospace">group =3D smsc</font></div><div><fo= nt face=3D"monospace, monospace">smsc =3D smpp</font></div><div><font face= =3D"monospace, monospace">smsc-id =3D smpp1</font></div><div><font face=3D"= monospace, monospace">allowed-smsc-id =3D smpp1</font></div><div><font face= =3D"monospace, monospace">preferred-smsc-id =3D smpp1</font></div><div><fon= t face=3D"monospace, monospace">host =3D SMSC_IP</font></div><div><font fac= e=3D"monospace, monospace">port =3D SMSC_Port</font></div><div><font face= =3D"monospace, monospace">transceiver-mode =3D yes</font></div><div><font f= ace=3D"monospace, monospace">smsc-username =3D username</font></div><div><f= ont face=3D"monospace, monospace">smsc-password =3D=C2=A0 myPass</font></di= v><div><font face=3D"monospace, monospace">system-type =3D "VMA"<= /font></div><div><font face=3D"monospace, monospace">log-file =3D /var/log/= kannel/smsc-smpp1.log</font></div><div><font face=3D"monospace, monospace">= log-level =3D 0</font></div><div><font face=3D"monospace, monospace">throug= hput =3D 10</font></div><div><font face=3D"monospace, monospace"><br></font= ></div><div><font face=3D"monospace, monospace"><br></font></div><div><font= face=3D"monospace, monospace"><br></font></div><div><font face=3D"monospac= e, monospace"><br></font></div><div><font face=3D"monospace, monospace"># S= ENDSMS-USER</font></div><div><font face=3D"monospace, monospace">group =3D = sendsms-user</font></div><div><font face=3D"monospace, monospace">default-s= msc =3D none</font></div><div><font face=3D"monospace, monospace">username = =3D myUsername</font></div><div><font face=3D"monospace, monospace">passwor= d =3D myPass</font></div><div><font face=3D"monospace, monospace">max-messa= ges =3D 6</font></div><div><font face=3D"monospace, monospace">concatenatio= n =3D true</font></div><div><font face=3D"monospace, monospace"><br></font>= </div><div><font face=3D"monospace, monospace"><br></font></div><div><font = face=3D"monospace, monospace"># SMS SERVICE HELP</font></div><div><font fac= e=3D"monospace, monospace">group =3D sms-service</font></div><div><font fac= e=3D"monospace, monospace">keyword =3D HELP</font></div><div><font face=3D"= monospace, monospace">text =3D "Text to be sent to users who send Help= "</font></div><div><font face=3D"monospace, monospace">omit-empty =3D = true</font></div><div><font face=3D"monospace, monospace">max-messages =3D = 3</font></div><div><font face=3D"monospace, monospace">concatenation =3D tr= ue</font></div><div><font face=3D"monospace, monospace"><br></font></div><d= iv><font face=3D"monospace, monospace"><br></font></div><div><font face=3D"= monospace, monospace"><br></font></div><div><font face=3D"monospace, monosp= ace"># SMS SERVICE One</font></div><div><font face=3D"monospace, monospace"= >group =3D sms-service</font></div><div><font face=3D"monospace, monospace"= >keyword-regex =3D ^O$</font></div><div><font face=3D"monospace, monospace"= >text =3D "Service one auto-reply goes here"</font></div><div><fo= nt face=3D"monospace, monospace">omit-empty =3D true</font></div><div><font= face=3D"monospace, monospace">max-messages =3D 2</font></div><div><font fa= ce=3D"monospace, monospace">concatenation =3D true</font></div><div><font f= ace=3D"monospace, monospace"><br></font></div><div><font face=3D"monospace,= monospace"><br></font></div><div><font face=3D"monospace, monospace"># SMS= SERVICE Two</font></div><div><font face=3D"monospace, monospace">group =3D= sms-service</font></div><div><font face=3D"monospace, monospace">keyword-r= egex =3D ^B$</font></div><div><font face=3D"monospace, monospace">text =3D = "Service two auto reply goes here"</font></div><div><font face=3D= "monospace, monospace">omit-empty =3D true</font></div><div><font face=3D"m= onospace, monospace">max-messages =3D 2</font></div><div><font face=3D"mono= space, monospace">concatenation =3D true</font></div><div><font face=3D"mon= ospace, monospace"><br></font></div><div><font face=3D"monospace, monospace= "><br></font></div><div><font face=3D"monospace, monospace"># SMS SERVICE d= efault</font></div><div><font face=3D"monospace, monospace">group =3D sms-s= ervice</font></div><div><font face=3D"monospace, monospace">keyword =3D def= ault</font></div><div><font face=3D"monospace, monospace">text =3D "De= ar customer, you have sent a wrong keyword. "</font></div><div><font f= ace=3D"monospace, monospace">omit-empty =3D true</font></div><div><font fac= e=3D"monospace, monospace">max-messages =3D 2</font></div><div><font face= =3D"monospace, monospace">concatenation =3D true</font></div><div><font fac= e=3D"monospace, monospace"><br></font></div><div><font face=3D"monospace, m= onospace"><br></font></div><div><br></div></div></div></div> </blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g= mail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><d= iv dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D= "ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><= div dir=3D"ltr"><div dir=3D"ltr">Lic. Jean-Claude Adams<br>Entrepreneur<br>= phone: +595 971 371794</div><div dir=3D"ltr">skype: arrobasoft<br><div>Visi= t us at=C2=A0<a href=3D"http://www.arrobasoft.com" target=3D"_blank">arroba= soft<br></a></div></div></div></div></div></div></div></div></div></div></d= iv></div></div></div></div></div></div> --0000000000009720c6057752b021--