Re: [asterisk-users] Variable stripping/removing part of string

2011-04-11 Thread magnus.b
It was a 1.8 but then we started to do a lot of development (ooh323) so 
today it is Asterisk SVN-may-ooh323_ipv6_direct_rtp-r311741MS-/trunk.

Can hardly se that we have done any changes that would cause my problem.

-Ursprungligt meddelande- 
From: Tilghman Lesher

Sent: Monday, April 11, 2011 9:36 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Variable stripping/removing part of string

On Monday 11 April 2011 00:25:35 magnu...@inputinterior.se wrote:

Now i am lost.
exten = 0424449631,n,NoOp(${CALLERID(name)})
exten = 0424449631,n,NoOp(${CUT(CALLERID(name),\(,2):0:-1})
-- Executing [0424449...@fax.inputinterior.se:4] NoOp(OOH323/Avaya2-8,
Martela (fax)) in new stack
-- Executing [0424449...@fax.inputinterior.se:5] NoOp(OOH323/Avaya2-8,
fax)) in new stack
But i am looking for the part before  (, in my case: Martela


Oh, sorry.  You were right before, then.  As far as the :0:-1 nomenclature,
what version of Asterisk are you using?  It was not supported before 1.4.

--
Tilghman

--
_
-- 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] Variable stripping/removing part of string

2011-04-11 Thread magnus.b
I dont know if my mail client will keep formatting as I se it, but for me it 
sure looks like one space.
-- Executing [0424449...@fax.inputinterior.se:4] NoOp(OOH323/Avaya2-109, 
Martela (fax)) in new stack

  xyz
-- Executing [0424449...@fax.inputinterior.se:5] NoOp(OOH323/Avaya2-109, 
Martela ) in new stack


-Ursprungligt meddelande- 
From: Tilghman Lesher 
Sent: Monday, April 11, 2011 10:15 AM 
To: Asterisk Users Mailing List - Non-Commercial Discussion 
Subject: Re: [asterisk-users] Variable stripping/removing part of string 

On Monday 11 April 2011 02:56:03 magnu...@inputinterior.se wrote:
 It was a 1.8 but then we started to do a lot of development (ooh323) so
 today it is Asterisk SVN-may-ooh323_ipv6_direct_rtp-r311741MS-/trunk.
 Can hardly se that we have done any changes that would cause my
 problem.

Are you sure there's only a single space separating the name from the
opening parenthesis?  The :0:-1 nomenclature only removes a single
byte from the end, and if there was more than a single byte, that might
explain the difference.  If that's the case, you may be forced to do a loop
to remove all trailing spaces, if that's still important:

While($[${foo:-1} =  ])
Set(foo=${foo:0:-1})
EndWhile

-- 
Tilghman

--
_
-- 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] Variable stripping/removing part of string

2011-04-11 Thread magnus.b

U were right, breaking it into two lines work.

exten = 0424449631,n,NoOp(${CALLERID(name)})
exten = 0424449631,n,Set(name=${CUT(CALLERID(name),\(,1)})
exten = 0424449631,n,NoOp(${name:0:-1})
-- Executing [0424449...@fax.inputinterior.se:4] NoOp(OOH323/Avaya2-150, 
Martela (fax)) in new stack
-- Executing [0424449...@fax.inputinterior.se:5] Set(OOH323/Avaya2-150, 
name=Martela ) in new stack
-- Executing [0424449...@fax.inputinterior.se:6] NoOp(OOH323/Avaya2-150, 
Martela) in new stack


But still, dont understand why u cant do it on one line, but u cant always 
understand everything.

Anyway, thx for pointing me to the correct direction.

-Ursprungligt meddelande- 
From: Jeroen Eeuwes

Sent: Monday, April 11, 2011 12:09 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Variable stripping/removing part of string

Hi Magnus,


exten = 0424449631,n,NoOp(${CUT(CALLERID(name),\(,1):0:-1})

But that gave me “Martela “ so my way of doing it is wrong.
Any that can tell me what I am doing wrong or have any better suggestion
howto do it?


I think you are not able to do it in one step. Can you try something like 
this:


exten = 0424449631,n,Set(TESTING=${CUT(CALLERID(name),\(,1)})
exten = 0424449631,n,NoOp(${TESTING:0:-1})

Best regards,
Jeroen Eeuwes

--
_
-- 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] Variable stripping/removing part of string

2011-04-11 Thread magnus.b

Weired result:

exten = 0424449631,n,NoOp(${CALLERID(name)})
exten = 0424449631,n,NoOp(${${CUT(CALLERID(name),\(,1)}:0:-1})
-- Executing [0424449...@fax.inputinterior.se:4] NoOp(OOH323/Avaya2-248, 
Martela (fax)) in new stack
-- Executing [0424449...@fax.inputinterior.se:5] NoOp(OOH323/Avaya2-248, 
) in new stack


Now I understand even less. (But it was a nice try).

-Ursprungligt meddelande- 
From: Chad Wallace

Sent: Tuesday, April 12, 2011 3:27 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Variable stripping/removing part of string
On Mon, 11 Apr 2011 12:58:39 +0200
magnu...@inputinterior.se wrote:


U were right, breaking it into two lines work.

exten = 0424449631,n,NoOp(${CALLERID(name)})
exten = 0424449631,n,Set(name=${CUT(CALLERID(name),\(,1)})
exten = 0424449631,n,NoOp(${name:0:-1})
-- Executing [0424449...@fax.inputinterior.se:4]
NoOp(OOH323/Avaya2-150, Martela (fax)) in new stack
-- Executing [0424449...@fax.inputinterior.se:5]
Set(OOH323/Avaya2-150, name=Martela ) in new stack
-- Executing [0424449...@fax.inputinterior.se:6]
NoOp(OOH323/Avaya2-150, Martela) in new stack

But still, dont understand why u cant do it on one line, but u cant
always understand everything.
Anyway, thx for pointing me to the correct direction.


Just a guess...  try this:

exten = 0424449631,n,NoOp(${${CUT(CALLERID(name),\(,1)}:0:-1})


--
_
-- 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] Variable stripping/removing part of string

2011-04-10 Thread magnus.b
Hi!

I try to get rid of some part of CALLERID(name) but I cant realy figure out a 
way to do it.
For example: CALLERID(name) = Martela (fax) I am just looking for the part 
before “ (“ in my case “Martela”.
I can’t serch for “ “, could be many “ “, but only one “ (“, thought i could do 
something like:

exten = 0424449631,n,NoOp(${CUT(CALLERID(name),\(,1):0:-1})

But that gave me “Martela “ so my way of doing it is wrong.
Any that can tell me what I am doing wrong or have any better suggestion howto 
do it?

/Magnus--
_
-- 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] Variable stripping/removing part of string

2011-04-10 Thread magnus.b

Now i am lost.
exten = 0424449631,n,NoOp(${CALLERID(name)})
exten = 0424449631,n,NoOp(${CUT(CALLERID(name),\(,2):0:-1})
-- Executing [0424449...@fax.inputinterior.se:4] NoOp(OOH323/Avaya2-8, 
Martela (fax)) in new stack
-- Executing [0424449...@fax.inputinterior.se:5] NoOp(OOH323/Avaya2-8, 
fax)) in new stack

But i am looking for the part before  (, in my case: Martela

-Ursprungligt meddelande- 
From: Tilghman Lesher

Sent: Monday, April 11, 2011 7:12 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Variable stripping/removing part of string

On Monday 11 April 2011 00:07:08 magnu...@inputinterior.se wrote:

Hi!

I try to get rid of some part of CALLERID(name) but I cant realy figure
out a way to do it. For example: CALLERID(name) = Martela (fax) I am
just looking for the part before “ (“ in my case “Martela”. I can’t
serch for “ “, could be many “ “, but only one “ (“, thought i could do
something like:

exten = 0424449631,n,NoOp(${CUT(CALLERID(name),\(,1):0:-1})

But that gave me “Martela “ so my way of doing it is wrong.
Any that can tell me what I am doing wrong or have any better suggestion
howto do it?


You're almost there.  The issue is that CUT uses 1-based offsets, not
0-based offsets, so:
exten = 0424449631,n,NoOp(${CUT(CALLERID(name),\(,2):0:-1})

--
Tilghman

--
_
-- 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] Checking status of a cell phone

2011-03-28 Thread magnus.b

Its not the Avaya that makes the call back, it is mobile.

-Ursprungligt meddelande- 
From: Gilles 
Sent: Monday, March 28, 2011 1:57 PM 
To: asterisk-users@lists.digium.com 
Subject: Re: [asterisk-users] Checking status of a cell phone 


On Sat, 26 Mar 2011 14:58:30 +0100, magnu...@inputinterior.se wrote:

Celluar Network - E1 - Avaya - OOH323 - Asterisk


Thanks for the tip.

So here's how it works:
1. The web app calls a script that uses AMI + Originate to send a call
to the Avaya PBX
2. Avaya is able to check that a number (cellphone in this case) is
busy and calls a different number in Asterisk to indicate the status
through a value in the DB
3. The web script reads the value of DS/0733025975 and displays the
status


--
_
-- 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] Variable. AMI and dialplan

2011-03-28 Thread magnus.b
Hi!

Guess I am doing something totally wrong here: Some smart person could maybe 
plz tell me what.

From AMI, I set a variable Action: Setvar\r\nVariable:x\r\n\Value: 5\r\n\r\n

From dialplan i can “access” the variable “x” and see the value “5”
From dialplan i modify “x” to “8”.

But from AMI i still se “x” as “5” not “8”.

/Magnus--
_
-- 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] Variable. AMI and dialplan

2011-03-28 Thread magnus.b

I did use Action: Getvar when i read it back in AMI.

On 3/28/2011 7:41 AM, magnu...@inputinterior.se wrote:

Hi!

Guess I am doing something totally wrong here: Some smart person could
maybe plz tell me what.

From AMI, I set a variable Action: Setvar\r\nVariable:x\r\n\Value:
5\r\n\r\n

From dialplan i can “access” the variable “x” and see the value “5”
From dialplan i modify “x” to “8”.

But from AMI i still se “x” as “5” not “8”.

/Magnus


Maybe you need to perform a GetVar to read the new value of that channel
variable

--
Sherwood McGowan sherwood.mcgo...@gmail.com
Carrier, ITSP, Call Center, and PBX Solutions Consultant


--
_
-- 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] Variable. AMI and dialplan

2011-03-28 Thread magnus.b

Could be, do u think its a bug or do u think I am doing totally wrong?
I can easily reproduce it if any needs more info.

-Ursprungligt meddelande- 
From: Sebastian

Sent: Monday, March 28, 2011 3:57 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Variable. AMI and dialplan

this may be related with:

https://issues.asterisk.org/view.php?id=14662


El 28/03/2011 10:20, Sherwood McGowan escribió:

Don't know then, that's all I've got far ya today mate, sorry

On 3/28/2011 8:18 AM, magnu...@inputinterior.se wrote:

I did use Action: Getvar when i read it back in AMI.

On 3/28/2011 7:41 AM, magnu...@inputinterior.se wrote:

Hi!

Guess I am doing something totally wrong here: Some smart person could
maybe plz tell me what.

 From AMI, I set a variable Action: Setvar\r\nVariable:x\r\n\Value:
5\r\n\r\n

 From dialplan i can “access” the variable “x” and see the value “5”
 From dialplan i modify “x” to “8”.

But from AMI i still se “x” as “5” not “8”.

/Magnus

Maybe you need to perform a GetVar to read the new value of that channel
variable



--
_
-- 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] Checking status of a cell phone

2011-03-28 Thread magnus.b
I was a little unclear, it is not the cell phone that does the call-back, it 
is the cell-phone-network.

We can define 3 traffic-cases per cell-phone:
1) If cell-phone wont anser in x seconds call number a.
2) if cell-phone is busy call number b.
3) if cell-phone is unavailable call number c.


From ami, a set db entry 0733025975 = 0 (Idle)

from ami, make a short call (1 second) to 0733025975
wait 0.5 second
check the db entry for 0733025975

when i wait for 0.5 second and my cell phone is busy, i will get a call to 
number b

I catch that call in dialplan and set 0733025975 = 1 (InUse)
Ofc, if cell-phone is unavailable, i will get call to number c
I catch that call in dialplan and set 0733025975 = 4 (Unavailable)

-Ursprungligt meddelande- 
From: Gilles

Sent: Monday, March 28, 2011 10:36 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Checking status of a cell phone

On Mon, 28 Mar 2011 14:12:09 +0200, magnu...@inputinterior.se wrote:

Its not the Avaya that makes the call back, it is mobile.


I thought the way you handled things, is that Asterisk would call your
cellphone through the Avaya PBX just to check whether the cellphone is
in_use/busy. At what point does the cellphone call Avaya or Asterisk
back?


--
_
-- 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] Checking status of a cell phone

2011-03-26 Thread magnus.b
Hi,

I am looking for a way to check the status of a cell phone. Found one way that 
worked for me and would like to have some feedback or suggestion of improvments.

Below example is for a “Swedish” cell phone, dont know if it works in the same 
way for other countries.

I could define “redirecting” numbers for 3 traffic cases when u dial my mobile 
(073-302 59 75):
NOT_INUSE call forward to A
INUSE call forward to B in my case 010-602 4975
UNAVAILABLE call forward to C in my case 010-602 4976

From manager:
Action: Originate\r\nChannel: OOH323/00733025975@Avaya\r\nExten: 
0106024000\r\nContext: inputinterior.se\r\nPriority: 1\r\nTimeout: 
1000\r\nCallerID: 106024000\r\n\r\n
DBPut\r\nFamily: DS\r\nKey: 0733025975\r\nVal: NOT_INUSE\r\n\r\n

Wait a second...

Action: DBGet\r\nFamily: DS\r\nKey: 0733025975\r\n\r\n

In the dialplan:
exten = 0106024975,1,Set(DB(DS/0733025975)=INUSE)
exten = 0106024975,n,Hangup()

exten = 0106024976,1,Set(DB(DS/0733025975)=UNAVAILABLE)
exten = 0106024976,n,Hangup()

Just a short call to my cell phone, to se if i get anything back, my cell phone 
doesn’t even ring.
Wait a second if the call is redirected, then check to se if the status has 
changed from NOT_INUSE to something else.

Dont know if it is a stupid idea, but it worked on my cell phone, and the 
switchboard girls was very happy to be able “to ask” my cell phone “what I am 
doing” 
Most of the day i am INUSE so they dont need to transfer calls to me ehen they 
know I am INUSE.

Ofc there is some delay from asking to getting the answer, but as the girls 
said, we could live with the delay, 2seconds compared to be “blind” is nothing.wlEmoticon-smile[1].png--
_
-- 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] Checking status of a cell phone

2011-03-26 Thread magnus.b

Setup as below:

Celluar Network - E1 - Avaya - OOH323 - Asterisk

It works like this, some1 (we can call her Åsa) wants to know if i am 
avaiable (my cell phone 073-302 59 75 is NOT_INUSE)
She have a web-app (just a simple form), where she enter my extension and 
hits enter.
The web-app originates the call as i wrote and waits for the status then 
ofc presents it to Åsa.


I was writing the app (probably the worst written code i have done so dont 
ask me to post it) late thursday and let Åsa use it on Friday.
And yes, the AMI code was enough, everytime she should transfer a call to me 
or just call me , she used the web-app first, and she was very happy.
When she saw that I was INUSE she sent me a mail that mr X has been looking 
for me, i got the mail while I was talking in the phone so I know that

she used the web-app to determine my status, not just transfering the call.

-Ursprungligt meddelande- 
From: Gilles

Sent: Saturday, March 26, 2011 11:37 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Checking status of a cell phone

On Sat, 26 Mar 2011 10:50:19 +0100, magnu...@inputinterior.se wrote:
I am looking for a way to check the status of a cell phone. Found one way 
that worked for me and would like to have some feedback or suggestion of 
improvments.


I'd like to check I understood: Your Asterisk server is connected to a
landline and can call your cellephone (073-302 59 75).

When a call comes in from the landline, Asterisk checks whether your
cellphone is available and redirects the call; If not available, it
calls a landline number (010-602 4975). If this landline number is not
available, it tries a third number (010-602 4976)?

Is the AMI code below enough to check if the cellphone is
available/in-use?


Action: Originate
Channel: OOH323/00733025975@Avaya\r\nExten: 0106024000
Context: inputinterior.se
Priority: 1
Timeout: 1000
CallerID: 106024000

DBPut
Family: DS
Key: 0733025975
Val: NOT_INUSE



--
_
-- 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] Automatically unpause a paused queue memeber - bad idea?

2011-03-11 Thread magnus.b
I have some cases when I want to pause a queue member and automatically unpause 
the queue member after a specified time.
Right now I am doing it by a AMI script, but was thinking if it is possible to 
add a parameter to PauseQueueMember like,

PauseQueueMember([queuename],interface[,options[,reason[,time]]]) where time 
will be how long (in seconds) the interface
will be paused. before brought back.

Maybe it is a bad idea, I dont know, what do you think? --
_
-- 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] AddQueueMember and stateinterface question

2011-02-22 Thread magnus.b
Hi,

I have missed something so I wonder if someone could explain for me?

0424449647 desktop phone
0106024647 DECT phone
0424449630 Helsingborg queue

extensions.conf
---
[support]
exten = 0424449647,hint,SIP/0424449647SIP/0106024647
exten = 0424449647,1,Dial(SIP/0424449647SIP/0106024647,15,rtT)
[inputinterior.se]
exten = 0/0424449647,1,Answer()
exten = 0/0424449647,n,RemoveQueueMember(Helsinborg,Local/0424449647@support)
exten = 0/0424449647,n,Hangup()
;
exten = 1/0424449647,1,Answer()
exten = 1/0424449647,n,RemoveQueueMember(Helsinborg,Local/0424449647@support)
exten = 
1/0424449647,n,AddQueueMember(Helsinborg,Local/0424449647@support,1,,Lisbeth 
Mingert Nilsson,SIP/0424449647)
exten = 1/0424449647,n,Hangup()
;
exten = 0424449630,1,Answer()
exten = 
0424449630,n,ExecIf($[${QUEUE_MEMBER(Helsingborg,logged)}=0]?Queue(Goteborg,rtT))
exten = 0424449630,n,Queue(Helsingborg,nrtT)

If i dial 0424449630 both desktop and DECT phone rings (if 0424449647 is logged 
in ofc)

If desktop phone is answering, everything is fine:
Lisbeth Mingert Nilsson (Local/0424449647@support) with penalty 1 (dynamic) (In 
use) has taken no calls yet

But if DECT phone is a answering:
Lisbeth Mingert Nilsson (Local/0424449647@support) with penalty 1 (dynamic) 
(Not in use) has taken 1 calls (last was 136 secs ago)

I am looking for a way to monitor both phones.

I hought i could do something like:
exten = 
1/0424449647,n,AddQueueMember(Helsinborg,Local/0424449647@support,1,,Lisbeth 
Mingert Nilsson,SIP/0424449647SIP/0106024647)
But that didn't work.

/Magnus--
_
-- 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] MEMBERINTERFACE and MEMBERNAME questions

2011-02-20 Thread magnus.b
Hmm,
First i must correct myself, MEMBERINTERFACE seems to be NULL, not the “device” 
that called in, my bad reading.
Did some changes:
queues.conf
---
[Kinna]
keepstats=yes
ringinuse=no
setinterfacevar=yes
setqueuevar=yes
strategy=rrmemory
timeout=5
wrapuptime=120

extensions.conf

exten = 0320209030,1,Answer()
exten = 
0320209030,n,ExecIf($[${QUEUE_MEMBER(Kinna,logged)}=0]?Queue(Goteborg,rtT))
exten = 0320209030,n,Queue(Kinna,nrtT)
exten = 0320209030,n,NoOp(${MEMBERINTERFACE})
exten = 0320209030,n,NoOp(${MEMBERNAME})
exten = 0320209030,n,NoOp(${QUEUENAME})
exten = 0320209030,n,Queue(Goteborg,rtT)
exten = 0320209030,n,Hangup()

Same call flows as below:
== Using SIP RTP CoS mark 5
  -- Executing [0320209...@inputinterior.se:1] 
Answer(SIP/0317998985-0050, ) in new stack
  -- Executing [0320209...@inputinterior.se:2] 
ExecIf(SIP/0317998985-0050, 0?Queue(Goteborg,rtT)) in new stack
  -- Executing [0320209...@inputinterior.se:3] Queue(SIP/0317998985-0050, 
Kinna,nrtT) in new stack
== Using SIP RTP CoS mark 5
  -- SIP/0317998972-0051 is ringing
  -- SIP/0317998972-0051 is ringing
  -- SIP/0317998972-0051 is ringing
  -- SIP/0317998972-0051 is ringing
  -- Nobody picked up in 5000 ms
  -- Exiting on time-out cycle
  -- Executing [0320209...@inputinterior.se:4] NoOp(SIP/0317998985-0050, 
) in new stack
  -- Executing [0320209...@inputinterior.se:5] NoOp(SIP/0317998985-0050, 
) in new stack
  -- Executing [0320209...@inputinterior.se:6] NoOp(SIP/0317998985-0050, 
Kinna) in new stack
  -- Executing [0320209...@inputinterior.se:7] Queue(SIP/0317998985-0050, 
Goteborg,rtT) in new stack

QUEUENAME is working the way i am excpecting but MEMBERINTERFACE and MEMBERNAME 
is not, or am I wrong?

From: magnu...@inputinterior.se 
Sent: Sunday, February 20, 2011 8:05 AM
To: asterisk-users@lists.digium.com 
Subject: [asterisk-users] MEMBERINTERFACE and MEMBERNAME questions

Hi!

Did play around with queues and need some help. I thought that MEMBERINTERFACE 
and MEMBERNAME should be set to the “device” the call was queued to not the 
device that called the queue, or do i miss something?
Running: Asterisk 1.8.2.3 built by root @ sip on a i686 running Linux on 
2011-01-31 13:38:23 UTC

0317998985 calls Kinna (0320209030)
Tomas Ekman (SIP/0317998972) receives the call but don’t answer.

When the queue “timeout” I would like to get the name of the device that didn’t 
answered, in my case: SIP/0317998972.
${MEMBERINTERFACE} gives me the name of the device that called in.

queue show Kinna

Kinna has 0 calls (max unlimited) in 'rrmemory' strategy (4s holdtime, 2s 
talktime), W:0, C:1, A:13, SL:0.0% within 0s
   Members:
  Tomas Ekman (SIP/0317998972) with penalty 1 (dynamic) (Not in use) has 
taken no calls yet
   No Callers

queues.conf
---
[general]
;
autofill=yes
keepstats=yes
setinterfacevar=yes
;
[Kinna]
retry=5
ringinuse=no
strategy=rrmemory
timeout=20
wrapuptime=120

extensions.conf
---
exten = 0320209030,1,Answer()
exten = 
0320209030,n,ExecIf($[${QUEUE_MEMBER(Kinna,logged)}=0]?Queue(Goteborg,rtT))
exten = 0320209030,n,Queue(Kinna,nrtT)
exten = 0320209030,n,NoOp(${MEMBERINTERFACE})
exten = 0320209030,n,NoOp(${MEMBERNAME})
exten = 0320209030,n,Queue(Goteborg,rtT)
exten = 0320209030,n,Hangup()

CLI

  == Using SIP RTP CoS mark 5
-- Executing [0320209...@inputinterior.se:1] 
Answer(SIP/0317998985-0033, ) in new stack
-- Executing [0320209...@inputinterior.se:2] 
ExecIf(SIP/0317998985-0033, 0?Queue(Goteborg,rtT)) in new stack
-- Executing [0320209...@inputinterior.se:3] 
Queue(SIP/0317998985-0033, Kinna,nrtT) in new stack
  == Using SIP RTP CoS mark 5
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- Nobody picked up in 2 ms
-- Exiting on time-out cycle
-- Executing [0320209...@inputinterior.se:4] 
NoOp(SIP/0317998985-0033, ) in new stack
-- Executing [0320209...@inputinterior.se:5] 
NoOp(SIP/0317998985-0033, ) in new stack
-- Executing [0320209...@inputinterior.se:6] 
Queue(SIP/0317998985-0033, Goteborg,rtT) in new stack
  == Spawn extension (inputinterior.se, 0320209030, 6) exited non-zero on 
'SIP/0317998985-0033'

Could any help me understand what I am doing wrong?

/Magnus



--
_
-- 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] MEMBERINTERFACE and MEMBERNAME questions

2011-02-19 Thread magnus.b
Hi!

Did play around with queues and need some help. I thought that MEMBERINTERFACE 
and MEMBERNAME should be set to the “device” the call was queued to not the 
device that called the queue, or do i miss something?
Running: Asterisk 1.8.2.3 built by root @ sip on a i686 running Linux on 
2011-01-31 13:38:23 UTC

0317998985 calls Kinna (0320209030)
Tomas Ekman (SIP/0317998972) receives the call but don’t answer.

When the queue “timeout” I would like to get the name of the device that didn’t 
answered, in my case: SIP/0317998972.
${MEMBERINTERFACE} gives me the name of the device that called in.

queue show Kinna

Kinna has 0 calls (max unlimited) in 'rrmemory' strategy (4s holdtime, 2s 
talktime), W:0, C:1, A:13, SL:0.0% within 0s
   Members:
  Tomas Ekman (SIP/0317998972) with penalty 1 (dynamic) (Not in use) has 
taken no calls yet
   No Callers

queues.conf
---
[general]
;
autofill=yes
keepstats=yes
setinterfacevar=yes
;
[Kinna]
retry=5
ringinuse=no
strategy=rrmemory
timeout=20
wrapuptime=120

extensions.conf
---
exten = 0320209030,1,Answer()
exten = 
0320209030,n,ExecIf($[${QUEUE_MEMBER(Kinna,logged)}=0]?Queue(Goteborg,rtT))
exten = 0320209030,n,Queue(Kinna,nrtT)
exten = 0320209030,n,NoOp(${MEMBERINTERFACE})
exten = 0320209030,n,NoOp(${MEMBERNAME})
exten = 0320209030,n,Queue(Goteborg,rtT)
exten = 0320209030,n,Hangup()

CLI

  == Using SIP RTP CoS mark 5
-- Executing [0320209...@inputinterior.se:1] 
Answer(SIP/0317998985-0033, ) in new stack
-- Executing [0320209...@inputinterior.se:2] 
ExecIf(SIP/0317998985-0033, 0?Queue(Goteborg,rtT)) in new stack
-- Executing [0320209...@inputinterior.se:3] 
Queue(SIP/0317998985-0033, Kinna,nrtT) in new stack
  == Using SIP RTP CoS mark 5
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- SIP/0317998972-0034 is ringing
-- Nobody picked up in 2 ms
-- Exiting on time-out cycle
-- Executing [0320209...@inputinterior.se:4] 
NoOp(SIP/0317998985-0033, ) in new stack
-- Executing [0320209...@inputinterior.se:5] 
NoOp(SIP/0317998985-0033, ) in new stack
-- Executing [0320209...@inputinterior.se:6] 
Queue(SIP/0317998985-0033, Goteborg,rtT) in new stack
  == Spawn extension (inputinterior.se, 0320209030, 6) exited non-zero on 
'SIP/0317998985-0033'

Could any help me understand what I am doing wrong?

/Magnus--
_
-- 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] SendFAX dialplan example

2011-01-27 Thread magnus.b
Hi!

I am playing with SendFAX but cant really figure out how it is working.
I have a “fax” /var/spool/asterisk/tmp/fax.tiff that i would like to send to a 
“physical” fax at numer 0317998901.
Can some1 write me a simple dialplan that just “grab” the file and send it to 
0317998901?

/Magnus--
_
-- 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] Fax stopped working when upgrading to 1.8.2

2011-01-17 Thread magnus.b
Vladimir,
Sorry, I was a little “unclear”, Asterisk SVN-trunk-r280589M was not a 1.8 
release. It was compiled before 1.8 was released.
May did a lot of patches that he comitted to the trunk version and then when I 
got everything to work, I didnt recompile until I tried 1.8.2.
But I will dig into the logs and se if i can find anything.
 
Magnus,

I finally got to testing the patch myself.  Apparently it did not work for me.  
That means that if you are affected by the same issue it is not fixed yet.  The 
current manifestation an incoming OOH_323 call fails in 30 seconds.

After reading your initial message more carefully I realized the problem you 
experience must be different as the ooh_323 issue affects all releases in 1.8 
branch and you state that it worked for you when you built from the svn trunk.

I would suggest you analyze the full log and make sure the fax application 
does not complain of any problems, then check the h323_log and make sure 
there are no complaints of codecs incompatibility.  If you are not utilizing 
T.38 then only alaw and ulaw will support fax.

-Vladimir




On 1/14/2011 12:32 AM, magnu...@inputinterior.se wrote: 
  Did apply the patch and did a recompile, no difference, fax still not 
working. 
  But I did notice one thing, when I was standing at a fax attched to PSTN and 
trying to send a fax to a fax attached to the Asterisk:
  The PSTN fax never switched to saying “Sending...” in the display just 
“Dialing”, but I can “hear” the Asterisk fax i answering.
  When I went back to Trunk version and did the same, I saw the fax display 
going from “Dialing” to “Sending” to “Sending OK”.

  I am sorry to say that I am not smart enough to know what trace I should 
start looking at, any knows?

  From: Vladimir Mikhelson 
  Sent: Thursday, January 13, 2011 5:04 PM
  To: Asterisk Users Mailing List - Non-Commercial Discussion 
  Cc: magnu...@inputinterior.se 
  Subject: Re: [asterisk-users] Fax stopped working when upgrading to 1.8.2

  Magnus,

  Can it be the same as I experienced 
https://issues.asterisk.org/view.php?id=18542 ?  Do not be confused by the 
ticket subject, it reflects the symptoms as they looked originally

  You can try the patch if applicable and if you know how to compile Addons in 
1.8 separately or if you have a capacity to compile the whole thing.

  -Vladimir


  On 1/13/2011 6:31 AM, magnu...@inputinterior.se wrote: 
Gentlemen,

We have a setup as below:

PSTN – E1 – Avaya – OOH323 trunk – Asterisk – SPA-2102 – Fax machine

Running Asterisk SVN-trunk-r280589M, fax working as a clock.
I decided to leave “trunk” and go a stable version so I upgraded to 1.8.2.
Didn’t change any config files, everything worked as before except fax.
I wonder if there are any known issues or things that I have missed to do 
in some config file.

Did a downgrade to SVN-trunk-r280589M and fax started to work again.

/Magnus

--
_
-- 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-usersimage/png--
_
-- 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] Fax stopped working when upgrading to 1.8.2

2011-01-13 Thread magnus.b
Gentlemen,

We have a setup as below:

PSTN – E1 – Avaya – OOH323 trunk – Asterisk – SPA-2102 – Fax machine

Running Asterisk SVN-trunk-r280589M, fax working as a clock.
I decided to leave “trunk” and go a stable version so I upgraded to 1.8.2.
Didn’t change any config files, everything worked as before except fax.
I wonder if there are any known issues or things that I have missed to do in 
some config file.

Did a downgrade to SVN-trunk-r280589M and fax started to work again.

/Magnus--
_
-- 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] Fax stopped working when upgrading to 1.8.2

2011-01-13 Thread magnus.b
Did apply the patch and did a recompile, no difference, fax still not working. 
But I did notice one thing, when I was standing at a fax attched to PSTN and 
trying to send a fax to a fax attached to the Asterisk:
The PSTN fax never switched to saying “Sending...” in the display just 
“Dialing”, but I can “hear” the Asterisk fax i answering.
When I went back to Trunk version and did the same, I saw the fax display going 
from “Dialing” to “Sending” to “Sending OK”.

I am sorry to say that I am not smart enough to know what trace I should start 
looking at, any knows?

From: Vladimir Mikhelson 
Sent: Thursday, January 13, 2011 5:04 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 
Cc: magnu...@inputinterior.se 
Subject: Re: [asterisk-users] Fax stopped working when upgrading to 1.8.2

Magnus,

Can it be the same as I experienced 
https://issues.asterisk.org/view.php?id=18542 ?  Do not be confused by the 
ticket subject, it reflects the symptoms as they looked originally

You can try the patch if applicable and if you know how to compile Addons in 
1.8 separately or if you have a capacity to compile the whole thing.

-Vladimir


On 1/13/2011 6:31 AM, magnu...@inputinterior.se wrote: 
  Gentlemen,

  We have a setup as below:

  PSTN – E1 – Avaya – OOH323 trunk – Asterisk – SPA-2102 – Fax machine

  Running Asterisk SVN-trunk-r280589M, fax working as a clock.
  I decided to leave “trunk” and go a stable version so I upgraded to 1.8.2.
  Didn’t change any config files, everything worked as before except fax.
  I wonder if there are any known issues or things that I have missed to do in 
some config file.

  Did a downgrade to SVN-trunk-r280589M and fax started to work again.

  /Magnus

--
_
-- 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-userswlEmoticon-sadsmile[1].png--
_
-- 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