Re: Using regex

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel,gmane.comp.mobile.kannel.user
Organization The Kannel Group
Message-ID <[email protected]>
Oscar Medina Duarte wrote:

> Hello my kannel e-friends !
> 
> I'm doing some testing on kannel 1.3.2 in order to put it to deploy
> services in the real world, but, I have a doubt, I want to use
> keyword-regex to differentiate two (and more) services, because, the
> messages arrive from my Operator with a prefix, lets say pm4s, so if I
> have 2 services, one named puebla and the other cholula, the request to
> those would be something like :
> 
> 	pm4s puebla
> and
> 	pm4s cholula
> 
> I tried this on kannel:
> 
> 8><-----------------------
> 
> group = sms-service
> keyword = pm4s
> keyword-regex = ^(pm4s)[ ]+(puebla)
> text = "de bolas !!!!"
> catch-all = true
> 
> 
> 
> group = sms-service
> keyword = pm4s
> keyword-regex = ^(pm4s)[ ]+(cholula)
> get-url = "http://%S"
> 
> 8><-------------------------
> 
> But only puebla service is recognized, even if I send a pm4s message the
> puebla service is triggered.
> 
> I tought that was because both have keyword = pm4s, so I tried without
> the keyword config, but smsbox wouldnt start.
> 
> Could be a good idea to base a service in a keyword-regex or a keyword
> and not necessarily both, that would be a nice feature!
> 
> Cheers !
> == Oscar
> OM MANI PEME HUM

now, obiously you are mis-using the 'keyword' directive here, IMO. 
Because you have in both(!) groups the 'keyword = pm4s', this will 
cause smsbox to catch always the first group, which is exactly the 
behaviour that you are experiencing.

I guess you have to leavce away(/comment out) the 'keyword = pm4s' 
from both(!) blocks.

Correct list?

AND ONCE AGAIN TO EVERYONE: DO _NOT_ CROSSPOST TO LISTS!

Stipe

mailto:stolj_{at}_wapme.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
-------------------------------------------------------------------

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.2 (Cygwin)

mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS
OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2
nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT
dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv
bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID
AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl
OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ
K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H
g2HyLAEKQIp30Q==
=aYCI
-----END PGP PUBLIC KEY BLOCK-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.