Re: [asterisk-users] Install Asterisk 1.4 and Asterisk 12.4 on the same machine

2014-09-22 Thread Deepak Rawat
Thank you for the response Carlos! We have done the testing on a VM. I want
to deploy it on a production machine which already has 1.4 on it. I want to
keep both so in case there is any issue with 12.4, I can quickly revert to
1.4. I can take care of configuring different ports for different services
but will there be any issues due to upgradation of dependencies? Is there a
way to install dependencies of asterisk 12.4 at different path so they
don't conflict with 1.4 dependencies?

On Mon, Sep 22, 2014 at 9:55 PM, Carlos Chavez 
wrote:

> On 9/22/14, 5:03 AM, Deepak Rawat wrote:
>
>> Hi,
>>
>> We have a server with asterisk 1.4. We are upgrading to asterisk 12.4. Is
>> there a way to install 12.4 on the same machine? At any point we will only
>> run either 1.4 or 12.4.
>>
>>  The answer is that you can but you really shloud not as it
> complicates lots of things.  You can install both versions and run them at
> the same time as long as you pick different ports for all services like
> SIP, IAX, AMI, RTP, etc.  Not using default ports will mean that you have
> to modify all configurations for each endpoint you want to connect to the
> secondary Asterisk.
>
> If you only want to try out Asterisk 12 why not use a Virtual Machine
> for testing?
>
> --
> Telecomunicaciones Abiertas de México S.A. de C.V.
> Carlos Chávez
> +52 (55)9116-91161
>
> --
> _
> -- 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] Install Asterisk 1.4 and Asterisk 12.4 on the same machine

2014-09-22 Thread Deepak Rawat
Hi,

We have a server with asterisk 1.4. We are upgrading to asterisk 12.4. Is
there a way to install 12.4 on the same machine? At any point we will only
run either 1.4 or 12.4.

Thank you,
Deepak
-- 
_
-- 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 12.4 "Agent Busy" message on AgentRequest

2014-08-12 Thread Deepak Rawat
Thank you for the response Richard and Matthew! It's good to hear that you
are working on fixing the 5s delay. I was really puzzled by it and found
the idle time by trial and error. Is there any documentation of these new
behaviors?
Coming back to the main issue, I am getting agent busy when the agent logs
in for the first time. He/she is not supposed to be on any call. Is there
any command to find our where the agent is busy?


On Tue, Aug 12, 2014 at 9:27 PM, Richard Mudgett 
wrote:

>
>
>
> On Tue, Aug 12, 2014 at 1:33 AM, Deepak Rawat  > wrote:
>
>> Hi,
>>
>> I am upgrading from Asterisk 1.4 to 12.4. I am able to authenticate the
>> user and call AgentLogin. But after that when I call AgentRequest I keep
>> getting Agent '1234' is busy.
>> If I put a delay of 5 second or more before calling AgentRequest then it
>> works most of the times. Here's my dialplan:
>>
>> [login]
>> exten => s,1,Background(thank-you-for-calling)
>> same => n,WaitExten(.65)
>> same => n,Background(press-1)
>> same => n,WaitExten(15)
>> exten => 1,1,Read(USER,"agent-user")
>> same => n,Authenticate(${ODBC_AGENTPASSWORD(${USER})})
>> same => n,AgentLogin(${USER})
>> same => n,NoOp(${USER} AGENT_STATUS is ${AGENT_STATUS})
>> same => n,Hangup()
>>
>> [agents]
>> exten => _X.,1,Set(UserNumber=${EXTEN})
>> same => n,Wait(5) ; it works most of the time with this wait of 5s
>> same => n,AgentRequest(${EXTEN})
>> same => n,NoOp(${EXTEN} AGENT_STATUS is ${AGENT_STATUS})
>> same => n,Dial(Agent/${EXTEN},,g)
>> same => n,NoOp(Dial Status: ${DIALSTATUS})
>> same => n,GotoIf($["${DIALSTATUS}" != "ANSWER"]?done)
>> same => n(done),Hangup()
>>
>
> There is an initial 5 second wait after an agent logs in.  The wait is a
> necessary
> probation period to allow any local channel chain that the agent may have
> to
> optimize out.  If the agent local channel optimization happens while the
> agent is
> on a call then the agent pool can lose track of the agent and the agent
> will be
> logged out.  The agent will then have to log back in after the current call
> completes.
>
> Why are you attempting to request an agent that has a device state
> (Agent:agent_id) of busy anyway?  That agent could be on another call or
> in a
> between call wrap-up time.
>
> Richard
>
>
> --
> _
> -- 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 12.4 "Agent Busy" message on AgentRequest

2014-08-11 Thread Deepak Rawat
Hi,

I am upgrading from Asterisk 1.4 to 12.4. I am able to authenticate the
user and call AgentLogin. But after that when I call AgentRequest I keep
getting Agent '1234' is busy.
If I put a delay of 5 second or more before calling AgentRequest then it
works most of the times. Here's my dialplan:

[login]
exten => s,1,Background(thank-you-for-calling)
same => n,WaitExten(.65)
same => n,Background(press-1)
same => n,WaitExten(15)
exten => 1,1,Read(USER,"agent-user")
same => n,Authenticate(${ODBC_AGENTPASSWORD(${USER})})
same => n,AgentLogin(${USER})
same => n,NoOp(${USER} AGENT_STATUS is ${AGENT_STATUS})
same => n,Hangup()

[agents]
exten => _X.,1,Set(UserNumber=${EXTEN})
same => n,Wait(5) ; it works most of the time with this wait of 5s
same => n,AgentRequest(${EXTEN})
same => n,NoOp(${EXTEN} AGENT_STATUS is ${AGENT_STATUS})
same => n,Dial(Agent/${EXTEN},,g)
same => n,NoOp(Dial Status: ${DIALSTATUS})
same => n,GotoIf($["${DIALSTATUS}" != "ANSWER"]?done)
same => n(done),Hangup()
-- 
_
-- 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] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Deepak Rawat
I tried that but for some reason couldn't get it working. My custom
function was getting created in dbo and the asterisk kept throwing error.
Maybe some mistake on my part. I will try it again.


On Mon, Aug 11, 2014 at 10:44 AM, Brian LaVallee 
wrote:

>
> On 8/11/14, 11:31, Matthew Jordan wrote:
>
>> On Sun, Aug 10, 2014 at 5:02 PM, Deepak Rawat
>>  wrote:
>>
>>>
>>>
>>> On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat <
>>> deepaksingh.ra...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I modified the query in res/res_config_odbc.c.
>>>> Original:  "SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'"
>>>> Modified: "SELECT MAX(LEN(var_val)) FROM %s WHERE filename='%s'"
>>>>
>>>> I rebuilt the code and installed Asterisk again. Now static realtime is
>>>> working. Should I file a bug report?
>>>>
>>>>  You're more than welcome to; at the same time, the number of people
>> using MS SQL Server with Asterisk is not tremendously high - at least
>> when compared with the alternatives. Unfortunately, this is one place
>> where making things compatible is problematic: MySQL and PostgreSQL
>> (which are far more likely to be used with Asterisk) along with Oracle
>> use LENGTH, not LEN.
>>
>
> Another option, just add LENGTH as a user-defined function to MS SQL.
>
> ||-- Something like this...|
> CREATE FUNCTION LENGTH (@input)
> ||BEGIN
>RETURN ( LEN(@input) )
> END|
>
>
>
>
>> Your solution, as it is currently, wouldn't be acceptable, as it would
>> cause far more problems than it would solve. About the only way I
>> could see solving this would be to make it configurable some place.
>>
>> Given the relatively few number of people who use MS SQL Server, I
>> wouldn't expect this issue to receive a lot of attention without a
>> patch.
>>
>>
>
>
>
> --
> _
> -- 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

Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Deepak Rawat
Thank you for the response Matthew. It makes perfect sense to cater to the
majority of databases. The changes I did are custom to our setup so we can
use Asterisk 12.4 with MS SQL Server 2012. I wanted to document this error
so anyone else facing it could resolve it. Like we have backslash_is_escape
setting in res_odbc.conf maybe we can provide a database_name setting and
drive the query using this setting. If I get time, I will submit a patch
for review.

On Mon, Aug 11, 2014 at 8:01 AM, Matthew Jordan  wrote:

> On Sun, Aug 10, 2014 at 5:02 PM, Deepak Rawat
>  wrote:
> >
> >
> >
> > On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat <
> deepaksingh.ra...@gmail.com>
> > wrote:
> >>
> >> Hi,
> >>
> >> I modified the query in res/res_config_odbc.c.
> >> Original:  "SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'"
> >> Modified: "SELECT MAX(LEN(var_val)) FROM %s WHERE filename='%s'"
> >>
> >> I rebuilt the code and installed Asterisk again. Now static realtime is
> >> working. Should I file a bug report?
> >>
>
> You're more than welcome to; at the same time, the number of people
> using MS SQL Server with Asterisk is not tremendously high - at least
> when compared with the alternatives. Unfortunately, this is one place
> where making things compatible is problematic: MySQL and PostgreSQL
> (which are far more likely to be used with Asterisk) along with Oracle
> use LENGTH, not LEN.
>
> Your solution, as it is currently, wouldn't be acceptable, as it would
> cause far more problems than it would solve. About the only way I
> could see solving this would be to make it configurable some place.
>
> Given the relatively few number of people who use MS SQL Server, I
> wouldn't expect this issue to receive a lot of attention without a
> patch.
>
> --
> Matthew Jordan
> Digium, Inc. | Engineering Manager
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at: http://digium.com & http://asterisk.org
>
> --
> _
> -- 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

Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Deepak Rawat
On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat 
wrote:

> Hi,
>
> I modified the query in res/res_config_odbc.c.
> Original:  "SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'"
> Modified: "SELECT MAX(LEN(var_val)) FROM %s WHERE filename='%s'"
>
> I rebuilt the code and installed Asterisk again. Now static realtime is
> working. Should I file a bug report?
>
>
> On Mon, Aug 11, 2014 at 2:37 AM, Deepak Rawat  > wrote:
>
>> Hi,
>>
>> I am using Asterisk 12.4 static realtime. I am storing agents.conf
>> related data in MS SQL Server 2012 database. But I keep getting *'LENGTH'
>> is not a recognized built-in function name* error message. I debugged
>> and found that it's due to the changes done in this ticket:
>> https://issues.asterisk.org/jira/browse/ASTERISK-23582. As there is no
>> LENGTH function in MS SQL Server, therefore, I am getting this error. Is
>> this error due to some config issue at my end?
>>
>> Thank you,
>> Deepak
>>
>
>
-- 
_
-- 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