Re: [asterisk-users] Queue breaks Dynamic_Features on Attended Transfer

2018-08-09 Thread Daniel Journo
> It does seem like a bug.  However, you have a complicated dialplan with a lot 
> of pieces happening at
> once so it may not actually be an Asterisk bug but a problem with your 
> dialplan.  To unravel this is
> going to take some bookkeeping on your part.

Hi Richard,

Thanks for the detailed response. Need to get my head around it a bit!

I’m going to try to set up a test rig with a less complex dialplan.
I’ll then run some tests and will be able to supply sample files if the problem 
persists.

I’m just a little confused what the different is which transfers of inbound 
queued calls and transfers of inbound Dialled calls.
I wonder if it would make a difference if the queue members were 
Local/DialThisEndpoint_200, instead of PJSIP/endpoint_200.

Since the queue dials the members and the member channels inherit the variables 
correctly, that would mean that Local/DialThisEndpoint_200 would inherit the 
DYNAMIC_FEATURES.
The Local channel would dial the endpoint, and when the endpoint performs a 
transfer and loses its variables, the Local channel, as the parent, would still 
have its variables set and the feature codes would still work.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Queue breaks Dynamic_Features on Attended Transfer

2018-08-08 Thread Daniel Journo
> Doing some more tests, this reads like a bug to me.
> Using a hanguphandler with DumpChan in the dialplan context that executes
> the Queue, I can see that DYNAMIC_FEATURES is set.
> After the attended transfer when the call is ended, the hanguphandler still
> shows that DYNAMIC_FEATURES is set. It's just not accessible.
>
> Any thoughts?
> It likely depens on how you are doing the attended transfer.  Via DTMF?  Via 
> SIP
> or channel technology protocol?
> Does the Agent B channel have the DYNAMIC_FEATURES channel variable set
> on it?
>

Thanks for the reply.

To answer your question, the attended transfers are done via the endpoint's 
feature buttons. So I assume it's via SIP requests.

I've been doing some tests and reviewing the debug logs to try to understand 
the problem and still think it's a bug at this point.

Firstly, most of my inbound calls are answered and then Dial() Local channels. 
These Local channels set __DYNAMIC_FEATURES and various other things. They are 
also needed to ensure functionality like MixMonitor can be started on the Local 
channel and then not affected by any transfers. The Local channels then either 
Dial() some peers via other local channels (as some peers are required to press 
1 to accept the call) or a Local channel that dials a Queue().

For non-Queue calls that are going via the Local Channels that only use Dial().
When endpoint_201 dials *1, it is matched with their own channel.
> DTMF feature hook 0x7f18d803a978 matched DTMF string '*1' on 
> 0x7f18c000b080(PJSIP/endpoint_201-cb55)

Interestingly, after the attended transfer from endpoint_201 to endpoint_202, 
when endpoint_202 dials *1, it can no longer match and passes it back to the 
Local channel that originally dialled endpoint_201.
At that point, it can match the local channel since that's where 
DYNAMIC_FEATURES was originally set.
> No DTMF feature hooks on 0x7f189c0660b0(PJSIP/endpoint_202-cb5b) match 
> '*1'
> DTMF feature hook 0x7f1894abd408 matched DTMF string '*1' on 
> 0x7f186c04efa0(Local/fromfeature_201@phones-5a17;1)
So although the transfer caused the variable to be lost, the Local channel, as 
the parent, remained and stepped in to complete the *1 request.
Probably works by accident.

But calls passing through a Local channel that ends in Queue() don't act the 
same way.

The Queue's initial dial of the queuemembers includes the inheritance as 
expected.
So when endpoint_201 answers and they dial *1, this is the result.
> DTMF feature hook 0x7f18c4018278 matched DTMF string '*1' on 
> 0x7f18b0002ca0(PJSIP/endpoint_201-cacc)

But following a transfer, using the same SIP messaging as the non-queue calls, 
this is the result...
> DTMF feature string on 0x7f18bd369720(PJSIP/endpoint_202-cae8) is now '*1'
> No DTMF feature hooks on 0x7f18bd369720(PJSIP/endpoint_202-cae8) match 
> '*1'
> Playing DTMF stream '*1' out to 
> 0x7f18e4112980(Local/queue_dialplan_101@queue-59b2;2) < this channel 
> still has DYNAMIC_FEATURES set (see below) but it just passes the DTMF 
> through?
> DTMF begin '*' received on Local/queue_dialplan_101@queue-59b2;1
> DTMF begin passthrough '*' on Local/queue_dialplan_101@queue-59b2;1
and it's passed all the way back and played to the caller.

This is in spite of the fact that Local/queue_dialplan_101@queue-59b2;2 has 
DYNAMIC_FEATURES set earlier in the dialplan.
> Set("Local/queue_dialplan_101@queue-59b2;2", 
> "__DYNAMIC_FEATURES=NewRecordApp")
And still set at the end of the call, confirmed using DumpChan within the 
channels hangup handler.

> Dumping Info For Channel: Local/queue_dialplan 101@queue-59b2;2:
> Variables:
> DYNAMIC_FEATURES=NewRecordApp

I can't really explain why the channel can still have DYNAMIC_FEATURES, but 
it's not perform matching apart from thinking it's a bug.

I hope that wasn't too long winded!

Thanks for the help and time!
Dan
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Queue breaks Dynamic_Features on Attended Transfer

2018-08-08 Thread Daniel Journo
> Prior to a call entering a Queue, I set __DYNAMIC_FEATURES=NewRecordApp.
> AgentA answers and is able to use that feature code.
> If AgentA performs an attended transfer of a call from a queue to AgentB, the
> feature code no longer works.
>
> It only doesn't work when using Queue() and an Attended transfer is
> performed.
>
> Is this a bug or is there something that needs to be set to allow the
> DYNAMIC_FEATURES to be inherited after an attended transfer from a queue?

Doing some more tests, this reads like a bug to me.
Using a hanguphandler with DumpChan in the dialplan context that executes the 
Queue, I can see that DYNAMIC_FEATURES is set.
After the attended transfer when the call is ended, the hanguphandler still 
shows that DYNAMIC_FEATURES is set. It's just not accessible.

Any thoughts?
Thanks
Dan
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] Queue breaks Dynamic_Features on Attended Transfer

2018-08-08 Thread Daniel Journo
Hi,

I think I've identified an issue and just want to check before completing a bug 
report.

Prior to a call entering a Queue, I set __DYNAMIC_FEATURES=NewRecordApp. AgentA 
answers and is able to use that feature code.
If AgentA performs an attended transfer of a call from a queue to AgentB, the 
feature code no longer works.

Cases that do work are as follows...
Calls using both Queue() and Dial() applications, prior to transfer, feature 
code works.
Calls using the Dial() application, both Blind and Attended transfers still 
allow the feature code to work.
Calls using the Queue() application where AgentA performs a Blind transfer to 
AgentB still allow the feature to work.

It only doesn't work when using Queue() and an Attended transfer is performed.

Is this a bug or is there something that needs to be set to allow the 
DYNAMIC_FEATURES to be inherited after an attended transfer from a queue?

Many thanks,
Dan

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] PJSIP_AOR Slow

2017-11-19 Thread Daniel Journo
Hi,

In my dialplans, I'm currently using PJSIP_AOR to check the status of a contact 
before dialling so that I can route the call differently if the endpoint is 
offline.
But PJSIP_AOR seems to take about 0.9 seconds to return. If I'm checking 10 
endpoints, that can cause a significant delay.

Is there a better way to check the status of an endpoint pre-dialling within 
the dialplan?

Here is a sample of what I'm doing.

exten => 
example_839,9,ExecIf($["${PJSIP_AOR(example_220,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_220))
exten => 
example_839,10,ExecIf($["${PJSIP_AOR(example_220,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,11,NoOp(${PJSIP_AOR(example_223,contact)})
exten => 
example_839,12,ExecIf($["${PJSIP_AOR(example_223,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_223))
exten => 
example_839,13,ExecIf($["${PJSIP_AOR(example_223,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,14,NoOp(${PJSIP_AOR(example_224,contact)})
exten => 
example_839,15,ExecIf($["${PJSIP_AOR(example_224,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_224))
exten => 
example_839,16,ExecIf($["${PJSIP_AOR(example_224,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,17,NoOp(${PJSIP_AOR(example_226,contact)})
exten => 
example_839,18,ExecIf($["${PJSIP_AOR(example_226,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_226))
exten => 
example_839,19,ExecIf($["${PJSIP_AOR(example_226,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,20,NoOp(${PJSIP_AOR(example_227,contact)})
exten => 
example_839,21,ExecIf($["${PJSIP_AOR(example_227,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_227))
exten => 
example_839,22,ExecIf($["${PJSIP_AOR(example_227,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,23,NoOp(${PJSIP_AOR(example_240,contact)})
exten => 
example_839,24,ExecIf($["${PJSIP_AOR(example_240,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_240))
exten => 
example_839,25,ExecIf($["${PJSIP_AOR(example_240,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,26,GotoIf($[${WORKINGPEERFOUND}=0]?227)

Many thanks
Dan

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Dial an extension to modify dialplan

2017-05-08 Thread Daniel Journo
> Hello

> I have the following scenario:

> [mynicecontext]
> exten => 2000,1,Dial(SIP/deviceA/deviceB/deviceC)

> As expected, by dialing 2000, all three devices will ring. And that's fine.
> However, there are situations where I only want "deviceA" and "deviceB"
to ring. I would like to have an extension to dial in order to modify the 
dialplan.

> Is there a better solution?

Take a look at https://wiki.asterisk.org/wiki/display/AST/Device+State
Specifically, Custom Device states.

You write both versions of the dialplan, and use an IF on the custom device 
state to determine which one runs.
You can then dial 4000 to turn the Custom Device from Busy to Available to set 
which section of the dialplan to run.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] Feature Code to Meeting Room

2017-05-04 Thread Daniel Journo
Hi,

Is it possible to set up a feature code to move both a caller and callee to a 
meeting room?
If yes, what should I be looking at?

Bonus question, is it possible to then automatically dial a 3rd person and 
invite them to the meeting room?

The client wants to do this with the push of a couple of buttons only.

Many thanks
Dan

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] moh reload not reloading/reading new musiconhold files

2017-03-24 Thread Daniel Journo
> Hello
> as you can read in my original post "moh reload" and "module reload 
> res_musiconhold.so" does nothing.
> Only at restart the new files are available.
> Is this a bug ?? How can I get more debugging for this problem ??

Just spotted that you are using Asterisk 1.8.32.3.
The bug I'm thinking of is in the latest version. I don't know if your version 
is affected.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] moh reload not reloading/reading new musiconhold files

2017-03-24 Thread Daniel Journo
> Hello
> as you can read in my original post "moh reload" and "module reload 
> res_musiconhold.so" does nothing.
> Only at restart the new files are available.
> Is this a bug ?? How can I get more debugging for this problem ??

I think there is currently a bug with MOH. For now, if you add a file to a moh 
folder, 'touch musiconhold.conf' and then reload moh.
Please let me know how it goes.

Kind regards

Dan Journo

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Beep on Attended Transfer

2017-02-16 Thread Daniel Journo
Ø  Set the ATTENDED_TRANSFER_COMPLETE_SOUND channel variable to the sound
file to play on a transfer.
>Does that have to be set in the Dial handler in order to get set on the 
>dialled channel or can it be inheritted?

Never mind. Tested it. Working great! Thanks.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Beep on Attended Transfer

2017-02-16 Thread Daniel Journo
Ø  Set the ATTENDED_TRANSFER_COMPLETE_SOUND channel variable to the sound
file to play on a transfer.
Does that have to be set in the Dial handler in order to get set on the dialled 
channel or can it be inheritted?

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] Beep on Attended Transfer

2017-02-16 Thread Daniel Journo
Hi,

During an attended transfer using the SIP phone feature buttons, I'm getting a 
few complaints from recipients that they can't tell when the call they are 
receiving has been transferred.
Is there any way (even if it's complicated) to generate a beep tone to the 
recipient of the transferred call when the transfer is completed?

I know you can do this with DTMF codes but they want to use the phone's 
transfer features.

Many thanks
Dan

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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