[asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread Jonas Kellens
Hello, how can I cut off the last character of the EXTEN-variable with variating length ? So I have : 112233# 123# 123456789# I want to cut off the last character. ${EXTEN:-1} gives me #, but that is the character I want to cut off. Kind regards, Jonas. --

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread Gareth Blades
On 20/08/13 09:29, Jonas Kellens wrote: Hello, how can I cut off the last character of the EXTEN-variable with variating length ? So I have : 112233# 123# 123456789# I want to cut off the last character. ${EXTEN:-1} gives me #, but that is the character I want to cut off.

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread jg
How about ${EXTEN:-1:1}? The Definitive Guide has a special paragraph with the title *More Advanced Digit Manipulation.* jg -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us

Re: [asterisk-users] Am I being hacked?

2013-08-20 Thread Giles Coochey
On 19/08/2013 19:10, Eric Wieling wrote: One of Asterisk's dirty little secrets is that it does not show the source IP when a device or hacker tries sending a call without registering. The rejection message in the logs do not show the IP of the attacker. Yes it sucks, yes it has been that

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread Jonas Kellens
On 08/20/2013 10:47 AM, jg wrote: How about ${EXTEN:-1:1}? The Definitive Guide has a special paragraph with the title *More Advanced Digit Manipulation.* jg Same result : # Jonas. -- _ -- Bandwidth and Colocation

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread Łukasz Grzywański
Hi, try [testEx] exten = _X.,1,noop(${EXTEN}) same = n,noop(len: ${LEN(${EXTEN})}) same = n,noop(${EXTEN:0:${MATH(${LEN(${EXTEN})}-1)}}) exten = _X.,n,hangup On 20 August 2013 12:15, Jonas Kellens jonas.kell...@telenet.be wrote: On 08/20/2013 10:47 AM, jg wrote: How about ${EXTEN:-1:1}?

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread Jonas Kellens
On 08/20/2013 10:40 AM, Gareth Blades wrote: On 20/08/13 09:29, Jonas Kellens wrote: Hello, how can I cut off the last character of the EXTEN-variable with variating length ? So I have : 112233# 123# 123456789# I want to cut off the last character. ${EXTEN:-1} gives me #, but that is the

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread jg
Damn it! Try: ${EXTEN:0:-1} jg -- _ -- 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

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread Pat Collins
From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jonas Kellens Sent: Tuesday, August 20, 2013 4:29 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Cut off last character of EXTEN Hello, how can

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread Steven Howes
On 20 Aug 2013, at 12:25, Pat Collins wrote: Here ya go: 112233# use ${EXTEN:0:6}) 123# use ${EXTEN:0:3}) 123456789# use ${EXTEN:0:9}) I think 'variable length' implied 'unknown length'... S-- _ -- Bandwidth and

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread Pat Collins
From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steven Howes Sent: Tuesday, August 20, 2013 7:38 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Cut off last character of EXTEN On 20 Aug

Re: [asterisk-users] Cut off last character of EXTEN

2013-08-20 Thread A J Stiles
On Tuesday 20 August 2013, Pat Collins wrote: From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jonas Kellens Sent: Tuesday, August 20, 2013 4:29 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users]

[asterisk-users] Dialplan MySQL inserted ID

2013-08-20 Thread Jonas Kellens
Hello, how can I obtain the inserted ID after having inserted a row with MySQL in the dialplan ? exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO myTable SET C1=${ARG1}, C2=${ARG2}, timestamp=${STRFTIME(${EPOCH},,%Y-%m-%d_%H:%M:%S)}) I need to know the ID of the newly inserted row.

Re: [asterisk-users] Dialplan MySQL inserted ID

2013-08-20 Thread Gareth Blades
On 20/08/13 14:53, Jonas Kellens wrote: Hello, how can I obtain the inserted ID after having inserted a row with MySQL in the dialplan ? exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO myTable SET C1=${ARG1}, C2=${ARG2}, timestamp=${STRFTIME(${EPOCH},,%Y-%m-%d_%H:%M:%S)}) I need

Re: [asterisk-users] Dialplan MySQL inserted ID

2013-08-20 Thread A J Stiles
On Tuesday 20 August 2013, Jonas Kellens wrote: Hello, how can I obtain the inserted ID after having inserted a row with MySQL in the dialplan ? exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO myTable SET C1=${ARG1}, C2=${ARG2}, timestamp=${STRFTIME(${EPOCH},,%Y-%m-%d_%H:%M:%S)})

Re: [asterisk-users] Dialplan MySQL inserted ID

2013-08-20 Thread Gergo Csibra
Tuesday, August 20, 2013, 5:47:24 PM, Gareth wrote: On 20/08/13 14:53, Jonas Kellens wrote: Hello, how can I obtain the inserted ID after having inserted a row with MySQL in the dialplan ? exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO myTable SET C1=${ARG1}, C2=${ARG2},

Re: [asterisk-users] Dialplan MySQL inserted ID

2013-08-20 Thread Jonas Kellens
On 08/20/2013 06:03 PM, Gergo Csibra wrote: Tuesday, August 20, 2013, 5:47:24 PM, Gareth wrote: On 20/08/13 14:53, Jonas Kellens wrote: Hello, how can I obtain the inserted ID after having inserted a row with MySQL in the dialplan ? exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO

Re: [asterisk-users] Dialplan MySQL inserted ID

2013-08-20 Thread Chris Bagnall
On 20/8/13 5:00 pm, A J Stiles wrote: Why not write an AGI script in your favourite language (Perl, Python, PHP, Java all have AGI and MySQL bindings) to perform the INSERT query for you? +1. It would also give you somewhere to perform sanity checks on your ${ARGS} to avoid SQL injection

Re: [asterisk-users] Dialplan MySQL inserted ID

2013-08-20 Thread Gergo Csibra
Tuesday, August 20, 2013, 6:08:19 PM, Jonas wrote: On 08/20/2013 06:03 PM, Gergo Csibra wrote: Tuesday, August 20, 2013, 5:47:24 PM, Gareth wrote: On 20/08/13 14:53, Jonas Kellens wrote: Hello, how can I obtain the inserted ID after having inserted a row with MySQL in the dialplan ?

[asterisk-users] Voicemail Prepend Message Forwarding Not Working

2013-08-20 Thread Jr Richardson
Hi All, First I've heard of this feature not working from a customer. I did some digging and this is a common bug in several older Asterisk versions, it has more than a few patches in the bug tracker. I've tried a few of them but none will apply to a specific version I'm currently running for a

Re: [asterisk-users] Echo Cancellation

2013-08-20 Thread Ghanshyam
Shaun Ruffell sruffell at digium.com writes: On Thu, Jul 25, 2013 at 02:51:02AM -0700, bilal ghayyad wrote: Hello; If our Digium Telephony Card does not support echo cancellation like (1TDM410PLF or 1AEX410PLF), what is the best and simple way to overcome the echo? Regards

Re: [asterisk-users] Voicemail Prepend Message Forwarding Not Working [SOLVED]

2013-08-20 Thread Jr Richardson
Hi All, First I've heard of this feature not working from a customer. I did some digging and this is a common bug in several older Asterisk versions, it has more than a few patches in the bug tracker. I've tried a few of them but none will apply to a specific version I'm currently running

Re: [asterisk-users] Echo Cancellation

2013-08-20 Thread Nick Khamis
On Tue, Aug 20, 2013 at 3:01 PM, Ghanshyam btcs.em...@gmail.com wrote: Shaun Ruffell sruffell at digium.com writes: On Thu, Jul 25, 2013 at 02:51:02AM -0700, bilal ghayyad wrote: Hello; If our Digium Telephony Card does not support echo cancellation like (1TDM410PLF or

Re: [asterisk-users] Echo Cancellation

2013-08-20 Thread Eric Wieling
Echo must be canceled where the low latency audio (PSTN) meets high latency audio (VoIP).You can't echo cancel VoIP. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Nick Khamis Sent: Tuesday, August 20,

Re: [asterisk-users] Echo Cancellation

2013-08-20 Thread Nick Khamis
Thanks Eric, I breezed through the documentation and got the impression that this was the case. Good luck on getting rid of that echo Bilal! N. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to

[asterisk-users] res_calendar / ownCloud

2013-08-20 Thread Matthias Rieber
; DTSTAMP;VALUE=DATE-TIME:20130820T200233Z#13; SUMMARY:SACKHUEPFEN#13; DTSTART;VALUE=DATE:20130820#13; DTEND;VALUE=DATE:20130826#13; CLASS:PUBLIC#13; END:VEVENT#13; END:VCALENDAR#13; /cal:calendar-data/d:propd:statusHTTP/1.1 200 OK/d:status/d:propstat/d:responsed:response d:href/remote.php/caldav

[asterisk-users] Ingress and Egress

2013-08-20 Thread Gopalakrishnan N
Hi, Can Ingress and Egress can be used in Asterisk, so that Jitter can be calculated...! Regards -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar

[asterisk-users] ooh323 and tcp timeout?

2013-08-20 Thread Dmitry Melekhov
Hello! I run asterisk 11.5.0 and I connect to some peer over ooh323. But there is alternate path to the same peer over sip, but this not we can usually use. So, if peer is not available over h323 I'd like to dial over sip. I tried to test this: iptables -D INPUT -s 192.168.6.0/24 -j DROP