I am having a problem with calls matching a certain pattern executing more than one block of code. I have a block of code that looks like if (method =~ "INVITE" && uri =~ "sip:*12.*") { ... do some stuff };
and another like
if (method=="INVITE" && uri =~ "sip:1[0-9]{10}@.*"){ ... do some stuff };
see full block here . The problem is that whenever *12 is dialed it executes both blocks, I thought the pattern matching is just wrong but when a number matching the second pattern is dialed then it doesn't execute the 1st block. Can someone please explain this behavior to me.
--Sorry if this is a repost--
I need a way to trust calls coming from a dynamic IP but with a domain-name.
In fact, it's an asterisk on a dynamic IP with a dynamic dns.
allow_trusted just permit to consider an IP as trustable, is there another way to do that with a domain name?
Olivier
-----Message d'origine----- De : users-bounces@openser.org [mailto:users-bounces@openser.org] De la part de Brandon Price Envoyé : vendredi 4 novembre 2005 16:42 À : users@openser.org Objet : [Users] Call executing multiple blocks of code
I am having a problem with calls matching a certain pattern executing more than one block of code. I have a block of code that looks like if (method =~ "INVITE" && uri =~ "sip:*12.*") { ... do some stuff };
and another like
if (method=="INVITE" && uri =~ "sip:1[0-9]{10}@.*"){ ... do some stuff
};
see full block http://www.dacrib.net/dump/currenterror here . The problem is that whenever *12 is dialed it executes both blocks, I thought the pattern matching is just wrong but when a number matching the second pattern is dialed then it doesn't execute the 1st block. Can someone please explain this behavior to me.
--Sorry if this is a repost--
Hi Olivier,
you mean if there is a way to do reverse DNS on the IP and to see if belongs to a trusted domain? If so, I don't think is possible right now, AFAIK.
regards, bogdan
OT geomatics wrote:
I need a way to trust calls coming from a dynamic IP but with a domain-name.
In fact, it's an asterisk on a dynamic IP with a dynamic dns.
allow_trusted just permit to consider an IP as trustable, is there another way to do that with a domain name?
Olivier
-----Message d'origine----- *De :* users-bounces@openser.org [mailto:users-bounces@openser.org] *De la part de* Brandon Price *Envoyé :* vendredi 4 novembre 2005 16:42 *À :* users@openser.org *Objet :* [Users] Call executing multiple blocks of code I am having a problem with calls matching a certain pattern executing more than one block of code. I have a block of code that looks like if (method =~ "INVITE" && uri =~ "sip:\*12.*") { ... do some stuff }; and another like if (method=="INVITE" && uri =~ "sip:1[0-9]{10}@.*"){ ... do some stuff }; see full block here <http://www.dacrib.net/dump/currenterror>. The problem is that whenever *12 is dialed it executes both blocks, I thought the pattern matching is just wrong but when a number matching the second pattern is dialed then it doesn't execute the 1st block. Can someone please explain this behavior to me. --Sorry if this is a repost--
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Ok, thanks for the answer, I am a bit disapointed, I'll find another way (trying hard)
Olivier
-----Message d'origine----- De : Bogdan-Andrei Iancu [mailto:bogdan@voice-system.ro] Envoyé : lundi 7 novembre 2005 13:42 À : OT geomatics Cc : users@openser.org Objet : Re: [Users] allow_trusted
Hi Olivier,
you mean if there is a way to do reverse DNS on the IP and to see if belongs to a trusted domain? If so, I don't think is possible right now, AFAIK.
regards, bogdan
OT geomatics wrote:
I need a way to trust calls coming from a dynamic IP but with a domain-name.
In fact, it's an asterisk on a dynamic IP with a dynamic dns.
allow_trusted just permit to consider an IP as trustable, is there another way to do that with a domain name?
Olivier
-----Message d'origine----- *De :* users-bounces@openser.org [mailto:users-bounces@openser.org] *De la part de* Brandon Price *Envoyé :* vendredi 4 novembre 2005 16:42 *À :* users@openser.org *Objet :* [Users] Call executing multiple blocks of code I am having a problem with calls matching a certain pattern executing more than one block of code. I have a block of code that looks like if (method =~ "INVITE" && uri =~ "sip:\*12.*") { ... do some stuff }; and another like if (method=="INVITE" && uri =~ "sip:1[0-9]{10}@.*"){ ... do some stuff }; see full block here <http://www.dacrib.net/dump/currenterror>. The problem is that whenever *12 is dialed it executes both blocks, I thought the pattern matching is just wrong but when a number matching the second pattern is dialed then it doesn't execute the 1st block. Can someone please explain this behavior to me. --Sorry if this is a repost--
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
It would be better to use digest authentication. Asterisk can do this easily.
Further, Asterisk only supports UDP. Thus, authentication based on IP addresses is not secure.
klaus
OT geomatics wrote:
I need a way to trust calls coming from a dynamic IP but with a domain-name.
In fact, it's an asterisk on a dynamic IP with a dynamic dns.
allow_trusted just permit to consider an IP as trustable, is there another way to do that with a domain name?
Olivier
-----Message d'origine----- *De :* users-bounces@openser.org [mailto:users-bounces@openser.org] *De la part de* Brandon Price *Envoyé :* vendredi 4 novembre 2005 16:42 *À :* users@openser.org *Objet :* [Users] Call executing multiple blocks of code I am having a problem with calls matching a certain pattern executing more than one block of code. I have a block of code that looks like if (method =~ "INVITE" && uri =~ "sip:\*12.*") { ... do some stuff }; and another like if (method=="INVITE" && uri =~ "sip:1[0-9]{10}@.*"){ ... do some stuff }; see full block here <http://www.dacrib.net/dump/currenterror>. The problem is that whenever *12 is dialed it executes both blocks, I thought the pattern matching is just wrong but when a number matching the second pattern is dialed then it doesn't execute the 1st block. Can someone please explain this behavior to me. --Sorry if this is a repost--
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Klaus Darilion writes:
It would be better to use digest authentication. Asterisk can do this easily.
are you sure? as i mentioned in an earlier message, a user could not register with asterisk to my proxy because asterisk was including to-tag to register after receiving 401.
-- juha
Juha Heinanen wrote:
Klaus Darilion writes:
It would be better to use digest authentication. Asterisk can do this easily.
are you sure? as i mentioned in an earlier message, a user could not register with asterisk to my proxy because asterisk was including to-tag to register after receiving 401.
I have not tried it - but I thought there wont be a problem. If you have found a problem with asterisk, please report it on bugs.digium.com. I'm sure Olle will fix it.
regards klaus
Hi Brandon,
what you are saying is that "*12" is matching "sip:1[0-9]{10}@.*")? are you sure that the first block doesn't change the RURI from "*12" to something else? to be sure just print (use xlog) the RURI value just before the check.
best regards, bodgan
Brandon Price wrote:
I am having a problem with calls matching a certain pattern executing more than one block of code. I have a block of code that looks like if (method =~ "INVITE" && uri =~ "sip:*12.*") { ... do some stuff };
and another like
if (method=="INVITE" && uri =~ "sip:1[0-9]{10}@.*"){ ... do some stuff };
see full block here http://www.dacrib.net/dump/currenterror. The problem is that whenever *12 is dialed it executes both blocks, I thought the pattern matching is just wrong but when a number matching the second pattern is dialed then it doesn't execute the 1st block. Can someone please explain this behavior to me.
--Sorry if this is a repost--
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users