Re: [asterisk-users] How to encode plus sign in REGEX function in dialplan?

2015-11-09 Thread Recursive
On 09.11.2015 15:54, Olivier wrote:
> 
> 
> 2015-11-09 15:06 GMT+01:00 Recursive  >:
> 
> On 06.11.2015 14:06, Rusty Newton wrote:
> >
> > It should be able to handle typical regular expression. I don't see
> > anything wrong with what you are doing. Please file a bug at
> > issues.asterisk.org/jira .  Do include 
> a debug log on the issue
> > captured when Asterisk attempts to execute these extensions.
> >
> > https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information
> >
> 
> Thanks to your above hint, I have reviewed my dialplan again and have 
> found a bug in it. After correcting my dialplan, it turned out that you are 
> right (of course): REGEX now behaves like expected.
> 
> 
> How would you then recommand  to deal with  + sign in REGEX ?
> Something like 1) ?
> 1) same => n(A1), GotoIf($[${REGEX("^\\+49.*" ${EXTEN})}]?:A2)
> 

I was just about writing an additional comment to this thread when I saw your 
message.

Indeed, after I had corrected the bug in my dialplan, it turned out that at 
least the backslash obviously must be encoded by doubling it. I don't know if 
this is a common rule for *all* strings which are used in a dialplan or if it 
is a rule which is specific to the REGEX function.

I tend to assume the former because otherwise Rusty's statement (REGEX handles 
usual regular expressions) would be wrong.

In every case, the variant 1) you have cited above is working for me.

Regards,

Recursive


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Asterisk unable to receive DTMF tone.

2015-11-09 Thread hadi

Hi,

Asterisk unable to receive DTMF tone from sip client.
Im using the (d) flag in dial application to perfume one digit exit during
ringing state. But unfortunately doesn't work. 

Here is my sip configuration :-

[100]
type=friend
username=100
host=dynamic
nat=yes
canreinvite=no
allow=all
secret=x
context=sipphones
relaxdtmf=yes
dtmfmode=auto
rfc2833compensate=yes

[200]
type=friend
username=200
host=dynamic
nat=yes
canreinvite=no
allow=all
qualify=yes
secret=x
context=sipphones
relaxdtmf=yes
dtmfmode=auto
rfc2833compensate=yes

here is my extensions.conf:-

exten => 100,1,Set(EXITCONTEXT=exitContext)

exten => 100,n,Dial(SIP/100,30,dTt)

exten => 200,1,Set(EXITCONTEXT=exitContext)

exten => 200,n,Dial(SIP/200,30,dTt)

[exitContext]
exten =>9,1,Goto(sipphones,1,1)



Regards

-Hadi.Salem



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to encode plus sign in REGEX function in dialplan?

2015-11-09 Thread Olivier
2015-11-09 15:06 GMT+01:00 Recursive :

> On 06.11.2015 14:06, Rusty Newton wrote:
> >
> > It should be able to handle typical regular expression. I don't see
> > anything wrong with what you are doing. Please file a bug at
> > issues.asterisk.org/jira.  Do include a debug log on the issue
> > captured when Asterisk attempts to execute these extensions.
> >
> > https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information
> >
>
> Thanks to your above hint, I have reviewed my dialplan again and have
> found a bug in it. After correcting my dialplan, it turned out that you are
> right (of course): REGEX now behaves like expected.
>

How would you then recommand  to deal with  + sign in REGEX ?
Something like 1) ?
1) same => n(A1), GotoIf($[${REGEX("^\\+49.*" ${EXTEN})}]?:A2)

>
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] How to encode plus sign in REGEX function in dialplan?

2015-11-09 Thread Recursive
On 06.11.2015 14:06, Rusty Newton wrote:
> 
> It should be able to handle typical regular expression. I don't see
> anything wrong with what you are doing. Please file a bug at
> issues.asterisk.org/jira.  Do include a debug log on the issue
> captured when Asterisk attempts to execute these extensions.
> 
> https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information
> 

Thanks to your above hint, I have reviewed my dialplan again and have found a 
bug in it. After correcting my dialplan, it turned out that you are right (of 
course): REGEX now behaves like expected.

The reason why I even have thought of REGEX not behaving like expected: The 
other day I have read some tutorials / articles about variables and strings in 
Asterisk dialplans. One of them (I really can't remember which one) claimed 
that there were problems with special characters in strings, for example with 
the dollar character ($). They recommended to do something like the following 
*if* such problems would show:

Set(DOLLAR=$)
... head_of_string${DOLLAR}tail_of_string

They also claimed that there were other problematic characters which could be 
handled the same way. That seemed logic to me and lead me into thinking that 
the pattern string in the REGEX call could be affected by this; hence my 
initial post.

I am apologizing that I haven't found the bug in my dialplan at an earlier time.

Best regards,

Recursive

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to encode plus sign in REGEX function in dialplan?

2015-11-09 Thread Recursive

On 06.11.2015 14:06, Rusty Newton wrote:
> On Thu, Nov 5, 2015 at 12:49 AM, Recursive  wrote:
>>
>>   same => n(A1), GotoIf($[${REGEX("^\+49.*" ${EXTEN})}]?:A2)
>> [..]
>> Actually, the REGEX function is not able to handle normal regular 
>> expressions. To make things worse, there doesn't seem to be any 
>> documentation. Could anybody please point me to documentation or tell me how 
>> write that very simple pattern?
>>
> 
> The documentation for that function is available at the CLI "core show
> function REGEX" and is available on the wiki at
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_REGEX

At first, thank you very much for your reply.

Of course, I had found and read that part of the documentation before posting 
here. But in this documentation (and any other I came across), I couldn't find 
any hint about if and how to encode special characters, about what sort of 
regular expressions are allowed (Perl, extended, Sed etc.), or about what RE 
engine is used internally. This is what I meant by claiming "no documentation".

> It should be able to handle typical regular expression. I don't see
> anything wrong with what you are doing. Please file a bug at
> issues.asterisk.org/jira.  Do include a debug log on the issue
> captured when Asterisk attempts to execute these extensions.
> 
> https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information
 
I really was hoping to do something wrong. I'll try to file a bug and enable 
others to reproduce by giving a simple example with standard configuration so 
that I don't need to upload mine.

Regards,

Recursive

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] bad performance centos6 ->centos7

2015-11-09 Thread Marek Červenka

found this interesting article
http://stackoverflow.com/questions/12111954/context-switches-much-slower-in-new-linux-kernels

running with network-latency profile and its better now but still not 
good as centos6


[root@ast1 ~]# tuned-adm active
Current active profile: network-latency


Dne 6.11.2015 v 10:18 Marek Červenka napsal(a):

hi,

i'm evaluating performance of centos7
i did tests on centos6 x86_64/distro kernel 2.6.32, asterisk 11.16.0 
with 500calls (7sec alaw, simple dialplan, pass trough - sipp 
generators/asterisk receiver with answer/playback)
scenario - sipp generators - asterisk - asterisk receiver (i wrote 
ansible scenario for this if you are interested)


then i reinstalled system to
centos7 x86_64/distro kernel 3.10, asterisk 11.20.0 and run the test 
again


there is big performance hit
https://dl.dropboxusercontent.com/u/44105720/context_interrupts.PNG
https://dl.dropboxusercontent.com/u/44105720/cpu.PNG
https://dl.dropboxusercontent.com/u/44105720/load.PNG

any ideas what tweaks can help?  (it looks like the main problem is in 
interrupts from network card)

your experience with centos7?
any experience with kernel 4.2 from 
http://elrepo.org/linux/kernel/el7/x86_64/RPMS/ ?







--
---
Marek Cervenka
===


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] תשובה: Update new IP address (move temporarily) for INVITE

2015-11-09 Thread Israel Gottlieb
  Use redirectמאת: Sam Basanנשלח: יום שני, 9 בנובמבר 2015 12:40אל: 'asterisk maling list 'השב ל: sba...@bluebe.netנושא: [asterisk-users] Update new IP address (move temporarily) for INVITEHello, How can I update asterisk to send back move temporarily with updated IP address to incoming INVITE.i.e, Incoming call from ITSP to server 1 with x DID and there is a need to update the ITSP that the specified x DID number is allocated in server 2. Thanks,Sam Basan

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Update new IP address (move temporarily) for INVITE

2015-11-09 Thread Sam Basan
Hello,

 

How can I update asterisk to send back move temporarily with updated IP
address to incoming INVITE.

i.e, Incoming call from ITSP to server 1 with x DID and there is a need to
update the ITSP that the specified x DID number is allocated in server 2.

 

Thanks,

Sam Basan

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users