[asterisk-users] Escaping parameter for ODBC function

2015-08-31 Thread Leandro Dardini
Hello,
I just noticed a weird behavior when using ODBC functions. If the content
of any of the paramter has a "=" inside, then the function is not processed
correctly by asterisk.

Let's take for example the following ODBC function in func_odbc.conf

[LOG_SMS]
dsn=asterisk1,asterisk2
synopsis=Log the route of a SMS
writesql=INSERT INTO
sm_smslogs(sm_te_id,sm_date,sm_direction,sm_sourceraw,sm_destraw,sm_from,sm_to,sm_body,sm_fullresult,sm_response)
values
('${ARG1}',NOW(),'${ARG2}','${ARG3}','${ARG4}','${ARG5}','${ARG6}','${SQL_ESC(${ARG7})}','${SQL_ESC(${ARG8})}','${SQL_ESC(${VAL1})}')

When it is called using:

[2015-08-31 16:35:16] VERBOSE[29562][C-0001] pbx.c: Executing
[103@astsms:37] Set("Message/ast_msg_queue", "ODBC_LOG_SMS(1,ONNET,<
sip:102-de...@devel.mirtapbx.com;transport=UDP>,sip:1...@devel.mirtapbx.com;transport=UDP,102,103,Second
test 4,)=SUCCESS") in new stack

Asterisk interprets the first "=" as assignment. In the debug log I found:

Variable: ODBC_LOG_SMS(1,ONNET,,sip:1...@devel.mirtapbx.com;transport=UDP,102,103,Second test
4,)=SUCCESS

And the ODBC function is not executed.

Is there a way, beside using REPLACE, to avoid this problem?

Leandro
-- 
_
-- 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] AMI 'meetme list concise' hanging

2015-08-31 Thread Steve Edwards
I have a problem with AMI 'meetme list concise' hanging. I'm running 
Asterisk 11.15.1, and PHPAGI 2.20.


The AMI stuff is in the file phpagi-asmanager.php, which says it is v 1.10 
2005/05/25.


Here's the relevant snippet of my PHP code:

// get list of conferences
if  ($debug)
{
echo 'getting list of conferences' . PHP_EOL;
}
$response = $ami->command("meetme list concise");
if  ($debug)
{
echo 'got list of conferences' . PHP_EOL;
}

I never get to 'got.'

1) Is this the current / best version of the PHP AMI interface?

2) Is this a 'known issue' with either Asterisk 11.15.1 or PHPAGI 2.20?

3) Can I set some sort of timer to abort the AMI command if it takes 
longer that a second or two?


4) Is there a better 'work-around?'

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST

--
_
-- 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] Asterisk Manager Interface AMI over HTTP.

2015-08-31 Thread Антон Сацкий
Check http.conf
On Aug 31, 2015 5:31 PM, "Aziz TestAccount"  wrote:

> Hi All!
>
> I'm using Asterisk 11.6-cert11 and trying to set the AMI over HTTP ,
> without success. I always get the Error :
>
> ---
>
> Asterisk Call Manager/1.3
> Response: Error
> Message: Missing action in request
> ---
>
>
> I made the following configuration in manager.conf :
>
> [general]
> enabled = yes
> webenabled = yes
> enablestatic=yes
> port = 
> bindaddr = 0.0.0.0
>
> [admin]
> secret = admin1234
> deny=0.0.0.0/0.0.0.0
> permit=192.168.1.0/255.255.255.0 
> 
> read = system,call,log,verbose,command,agent,user,originate
> write = system,call,log,verbose,command,agent,user,originate
>
>
> And I'm trying to access via HTTP using the following link : 
> http://192.168.1.134:/manager?action=login=aziz=aziz1234/
>
>
> Could anyone tell me if I'm missing something.
>
> Thanks in advance.
>
>
>
>
> --
> _
> -- 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
>
-- 
_
-- 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 Manager Interface AMI over HTTP.

2015-08-31 Thread Aziz TestAccount
Hi All!

I'm using Asterisk 11.6-cert11 and trying to set the AMI over HTTP ,
without success. I always get the Error :

---

Asterisk Call Manager/1.3
Response: Error
Message: Missing action in request
---


I made the following configuration in manager.conf :

[general]
enabled = yes
webenabled = yes
enablestatic=yes
port = 
bindaddr = 0.0.0.0

[admin]
secret = admin1234
deny=0.0.0.0/0.0.0.0
permit=192.168.1.0/255.255.255.0
read = system,call,log,verbose,command,agent,user,originate
write = system,call,log,verbose,command,agent,user,originate


And I'm trying to access via HTTP using the following link :
http://192.168.1.134:/manager?action=login=aziz=aziz1234/


Could anyone tell me if I'm missing something.

Thanks in advance.
-- 
_
-- 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