Re: [asterisk-users] Dial() after the h extension has been invoked?

2021-11-13 Thread Antony Stone
On Friday 12 November 2021 at 23:34:25, Steve Edwards wrote:

> On Fri, 12 Nov 2021, Antony Stone wrote:
> > I've never used AGI, so what would your suggested solution involve?
> 
> If all you need is to update/insert/delete some rows in a database, ODBC
> could be a solution.

I already use ODBC for that purpose, and it works well.

However, in this case it's the Asterisk internal database, purely local to the 
machine, which needs manipulating.


Antony.

-- 
#define SIX 1+5
#define NINE 8+1

int main() {
printf("%d\n", SIX * NINE);
}
- thanks to ECB for bringing this to my attention

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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() after the h extension has been invoked?

2021-11-12 Thread Steve Edwards

On Fri, 12 Nov 2021, Steve Edwards wrote:

I prefer to do database work in an AGI. I find quoting within the database to 
be obtuse and fragile.


s/database/dialplan/g

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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() after the h extension has been invoked?

2021-11-12 Thread Steve Edwards

On Fri, 12 Nov 2021, Antony Stone wrote:


I've never used AGI, so what would your suggested solution involve?


If all you need is to update/insert/delete some rows in a database, ODBC 
could be a solution.


I prefer to do database work in an AGI. I find quoting within the database 
to be obtuse and fragile. Also, I find error handling better in an AGI 
with a real programming language. Also, also, things start with 'I just 
need to do x' and frequently grow to 2SLGBTQQIA+x and you will wish you 
started with a real programming language.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
On Friday 12 November 2021 at 18:08:11, aster...@phreaknet.org wrote:

> On 11/12/2021 12:39 PM, Antony Stone wrote:
> > On Friday 12 November 2021 at 17:36:07, Eric Wieling wrote:
> >> Create a spool file from the 'h' extension to generate the call.
> > 
> > Yes, I thought of that, but it somehow feels a bit clunky, and was hoping
> > for a neater solution :)
> 
> Use Originate() instead of spooling a call file, so it's a single line
> of dialplan. Much less clunky :)

Originate() does not support special SIP headers :(


Antony.

-- 
Wanted: telepath.   You know where to apply.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
On Friday 12 November 2021 at 18:18:03, Eric Wieling wrote:

> On 11/12/21 12:39, Antony Stone wrote:
> > On Friday 12 November 2021 at 17:36:07, Eric Wieling wrote:
> >> Create a spool file from the 'h' extension to generate the call.
> > 
> > Yes, I thought of that, but it somehow feels a bit clunky, and was hoping
> > for a neater solution :)
> 
> Dialing post call to update a database is clunky.  The solutions will be
> clunky too.
> 
> I use a hangup handler with an AGI script.  The script makes a database
> connection to close out the call.  Much cleaner.

Would you care to give a little more in the way of detail?

I've never used AGI, so what would your suggested solution involve?


Antony.

-- 
She did not swoon, but she did get a look on her face that said 'This 
conversation is over', which Jack took as a sign he was going in the right 
direction.

 - Neal Stephenson, Quicksilver

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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() after the h extension has been invoked?

2021-11-12 Thread Steve Edwards

On Fri, 12 Nov 2021, Antony Stone wrote:

Can anyone suggest how I might be able to do this?  I need to perform a 
Dial() command after an inbound channel has hung up.  I do not expect 
the Dial() to bridge to anything (the context being dialled simply does 
some database manipulation and then hangs up without even bothering to 
answer).


Any suggestions welcome :)


How about creating a call file in the h extension?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
On Friday 12 November 2021 at 17:36:07, Eric Wieling wrote:

> Create a spool file from the 'h' extension to generate the call.

Yes, I thought of that, but it somehow feels a bit clunky, and was hoping for 
a neater solution :)


Antony.

-- 
Software development can be quick, high quality, or low cost.

The customer gets to pick any two out of three.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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() after the h extension has been invoked?

2021-11-12 Thread Eric Wieling

Create a spool file from the 'h' extension to generate the call.

On 11/12/21 11:56, Antony Stone wrote:

Hi.

I have a setup which comprises some "front-end" Asterisk servers which have
SIP trunks to external providers, and very simple dial plans, and some "back-
end" servers which only talk to the front-end machines, and have the majority
of my dialplan logic on them.

I use Dial() commands with custom SIP headers to pass information (eg: about
the current state of a call) between the front-end and back-end machines, and
this works very well.

However, I can't use a Dial() command in the h extension to notify the other
machines that a call has ended and they can now delete their state information
about that call.  If I try to, I get the error:

app_dial.c:2245 in dial_exec_full: Caller hung up before dial.

I guess i can see why Asterisk complains about being asked to Dial() after the
inbound call leg has ended, but in this case I have a reason for doing so.

Can anyone suggest how I might be able to do this?  I need to perform a Dial()
command after an inbound channel has hung up.  I do not expect the Dial() to
bridge to anything (the context being dialled simply does some database
manipulation and then hangs up without even bothering to answer).


Any suggestions welcome :)


Antony.



--
http://help.nyigc.net/

--
_
-- 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() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
On Friday 12 November 2021 at 17:20:39, Frank Vanoni wrote:

> On Fri, 2021-11-12 at 16:56 +, Antony Stone wrote:
> > I use Dial() commands with custom SIP headers to pass information
> > (eg: about the current state of a call) between the front-end and back-end
> > machines, and this works very well.
> > 
> >  I need to perform a Dial() command after an inbound channel has hung up. 
> >  I do not expect the Dial() to bridge to anything (the context being
> >  dialled simply does some database manipulation and then hangs up without
> >  even bothering to answer).
> > 
> > 
> > Any suggestions welcome :)
> 
> Maybe you can use the "g" option in the first Dial(...) and proceed in
> the dial plan with the second Dial(...)

Hm, in fact I am already using the g option, because I want to detect channel 
states such as Unavailable and Congestion (in which case I try an alternative 
route to dial out with).

I suppose if I detect the DIALSTATUS is ANSWER then I know the call got 
answered and has now ended.

Sounds good - thank you :)


Antony.

-- 
I wasn't sure about having a beard at first, but then it grew on me.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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() after the h extension has been invoked?

2021-11-12 Thread Frank Vanoni
On Fri, 2021-11-12 at 16:56 +, Antony Stone wrote:

> I use Dial() commands with custom SIP headers to pass information
> (eg: about 
> the current state of a call) between the front-end and back-end
> machines, and 
> this works very well.
> 
>  I need to perform a Dial() 
> command after an inbound channel has hung up.  I do not expect the
> Dial() to 
> bridge to anything (the context being dialled simply does some
> database 
> manipulation and then hangs up without even bothering to answer).
> 
> 
> Any suggestions welcome :)


Maybe you can use the "g" option in the first Dial(...) and proceed in
the dial plan with the second Dial(...)

g - Proceed with dialplan execution at the next priority in the current
extension if the destination channel hangs up.

Example:

exten => 1234,1,Dial(SIP/deskphone,120,g)
same => n,Dial(SIP/cordlessphone)
same => n,Hangup()

Extension 1234 dials a deskphone. If "deskphone" answer... bla bla
bla... and after "deskphone" hangs up, the "cordlessphone" is dialed.








-- 
_
-- 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] Dial() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
Hi.

I have a setup which comprises some "front-end" Asterisk servers which have 
SIP trunks to external providers, and very simple dial plans, and some "back-
end" servers which only talk to the front-end machines, and have the majority 
of my dialplan logic on them.

I use Dial() commands with custom SIP headers to pass information (eg: about 
the current state of a call) between the front-end and back-end machines, and 
this works very well.

However, I can't use a Dial() command in the h extension to notify the other 
machines that a call has ended and they can now delete their state information 
about that call.  If I try to, I get the error:

app_dial.c:2245 in dial_exec_full: Caller hung up before dial.

I guess i can see why Asterisk complains about being asked to Dial() after the 
inbound call leg has ended, but in this case I have a reason for doing so.

Can anyone suggest how I might be able to do this?  I need to perform a Dial() 
command after an inbound channel has hung up.  I do not expect the Dial() to 
bridge to anything (the context being dialled simply does some database 
manipulation and then hangs up without even bothering to answer).


Any suggestions welcome :)


Antony.

-- 
90% of networking problems are routing problems.
9 of the remaining 10% are routing problems in the other direction.
The remaining 1% might be something else, but check the routing anyway.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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(PJSIP/xx) - finding the IP address it connected to

2021-11-04 Thread Łukasz Grzywański
Hi,
pls try:
exten => s,n,Set(pjsiprip=${CHANNEL(pjsip,remote_addr)})

https://wiki.asterisk.org/wiki/display/AST/Asterisk+19+ManagerAction_Getvar




On Thu, 4 Nov 2021 at 15:50, Kingsley Tart  wrote:

> On Thu, 2021-11-04 at 10:10 -0300, Joshua C. Colp wrote:
> > > Do you know whether it is possible to get the remote_addr from the
> > > AMI?
> >
> > I don't know off the top of my head. AMI actions and events are
> > documented on the wiki[1], so you could look there and see.
> >
> > [1]
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+19+Command+Reference
>
> Hi,
>
> I've managed to establish that there are no events that convey this
> information, getting a list of channels doesn't include that in the
> data and I didn't manage to find any of the PJSIP AMI commands that
> returned it, so I think it isn't possible.
>
> The only way I can think is to externally have tcpdump running
> capturing all SIP traffic and watch this and match up with the Call-Id.
> It seems messy but I can't think of any other way (aside from doing an
> ngrep for local originated INVITEs but that amounts to much the same
> thing).
>
> --
> Cheers,
> Kingsley.
>
>
> --
> _
> -- 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



-- 

Pozdrawiam,

Łukasz Grzywański
Voice Architect

Mok Yok IT Sp. z o.o.
ul. Rzeźnicza 32/33, 50-130 Wrocław, Polska
tel. +48 717227200, fax +48 717227299
mob.: +48 517255333, e-mail: lukasz.grzywan...@mokyokit.com
-- 
_
-- 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(PJSIP/xx) - finding the IP address it connected to

2021-11-04 Thread Kingsley Tart
On Thu, 2021-11-04 at 10:10 -0300, Joshua C. Colp wrote:
> > Do you know whether it is possible to get the remote_addr from the
> > AMI?
> 
> I don't know off the top of my head. AMI actions and events are
> documented on the wiki[1], so you could look there and see. 
> 
> [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+19+Command+Reference

Hi,

I've managed to establish that there are no events that convey this
information, getting a list of channels doesn't include that in the
data and I didn't manage to find any of the PJSIP AMI commands that
returned it, so I think it isn't possible.

The only way I can think is to externally have tcpdump running
capturing all SIP traffic and watch this and match up with the Call-Id. 
It seems messy but I can't think of any other way (aside from doing an
ngrep for local originated INVITEs but that amounts to much the same
thing).

-- 
Cheers,
Kingsley.


-- 
_
-- 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(PJSIP/xx) - finding the IP address it connected to

2021-11-04 Thread Joshua C. Colp
On Thu, Nov 4, 2021 at 10:07 AM Kingsley Tart  wrote:

> On Thu, 2021-11-04 at 09:45 -0300, Joshua C. Colp wrote:
> > The information may not yet be available. Why that would be, I do not
> > know.
>
> Right OK, a bit of a mystery then.
>
> I have tried to figure out whether this information is available via
> the AMI but I haven't been able to find anything.
>
> Do you know whether it is possible to get the remote_addr from the AMI?
>

I don't know off the top of my head. AMI actions and events are documented
on the wiki[1], so you could look there and see.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+19+Command+Reference

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- 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(PJSIP/xx) - finding the IP address it connected to

2021-11-04 Thread Kingsley Tart
On Thu, 2021-11-04 at 09:45 -0300, Joshua C. Colp wrote:
> The information may not yet be available. Why that would be, I do not
> know.

Right OK, a bit of a mystery then.

I have tried to figure out whether this information is available via
the AMI but I haven't been able to find anything.

Do you know whether it is possible to get the remote_addr from the AMI?

-- 
Cheers,
Kingsley.


-- 
_
-- 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(PJSIP/xx) - finding the IP address it connected to

2021-11-04 Thread Joshua C. Colp
On Thu, Nov 4, 2021 at 9:39 AM Kingsley Tart - Barritel Ltd <
kingsley.t...@barritel.com> wrote:

> On Thu, 2021-11-04 at 08:52 -0300, Joshua C. Colp wrote:
>
> Thanks, that looks perfect. What is the syntax? I have tried a few things
> but none work:
>
>
> ${CHANNEL(pjsip,remote_addr)}
>
>
> Hmm, I can't get this to work. This dialplan code:
>
> exten => s,n,NoOp(### state=${CHANNEL(state)} ##)
>
> exten => s,n,NoOp(### remote_addr=${CHANNEL(pjsip,remote_addr)} ##)
>
>
> logged this:
>
> -- Executing [s@register-answer:5] NoOp("PJSIP/btipx-000b", "### 
> state=Up ##") in new stack
>
> [Nov  4 12:31:00] WARNING[974]: pjsip/dialplan_functions.c:834 
> channel_read_pjsip: No transport information for channel PJSIP/btipx-000b
>
> [Nov  4 12:31:00] WARNING[12206][C-0006]: func_channel.c:463 
> func_channel_read: Unknown or unavailable item requested: 'pjsip,remote_addr'
>
> -- Executing [s@register-answer:6] NoOp("PJSIP/btipx-000b", "### 
> remote_addr= ##") in new stack
>
>
>
> That sub was called from this context:
>
> Dial("Local/2.1.01162687107-btipx@dial_pstn_carrier-0011;2", 
> "PJSIP/btipx/sip:01162687107@88.151.41.45:5060,,r(ring)b(dial_pstn_carrier^set_handler^1(btipx,2,1,1))U(register-answer^2^1)")
>
>
> Am I doing something silly?
>

The information may not yet be available. Why that would be, I do not know.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- 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(PJSIP/xx) - finding the IP address it connected to

2021-11-04 Thread Kingsley Tart - Barritel Ltd
On Thu, 2021-11-04 at 08:52 -0300, Joshua C. Colp wrote:
> > Thanks, that looks perfect. What is the syntax? I have tried a few
> > things but none work:
> > 
> 
> ${CHANNEL(pjsip,remote_addr)} 

Hmm, I can't get this to work. This dialplan code:

exten => s,n,NoOp(### state=${CHANNEL(state)} ##)
exten => s,n,NoOp(### remote_addr=${CHANNEL(pjsip,remote_addr)} ##)

logged this:

-- Executing [s@register-answer:5] NoOp("PJSIP/btipx-000b", "### 
state=Up ##") in new stack
[Nov  4 12:31:00] WARNING[974]: pjsip/dialplan_functions.c:834 
channel_read_pjsip: No transport information for channel PJSIP/btipx-000b
[Nov  4 12:31:00] WARNING[12206][C-0006]: func_channel.c:463 
func_channel_read: Unknown or unavailable item requested: 'pjsip,remote_addr'
-- Executing [s@register-answer:6] NoOp("PJSIP/btipx-000b", "### 
remote_addr= ##") in new stack


That sub was called from this context:

Dial("Local/2.1.01162687107-btipx@dial_pstn_carrier-0011;2", 
"PJSIP/btipx/sip:01162687107@88.151.41.45:5060,,r(ring)b(dial_pstn_carrier^set_handler^1(btipx,2,1,1))U(register-answer^2^1)")

Am I doing something silly?

Cheers,
Kingskey,
-- 
_
-- 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(PJSIP/xx) - finding the IP address it connected to

2021-11-04 Thread Joshua C. Colp
On Thu, Nov 4, 2021 at 8:43 AM Kingsley Tart  wrote:

> On Wed, 2021-11-03 at 16:25 -0300, Joshua C. Colp wrote:
>
> On Wed, Nov 3, 2021 at 3:31 PM Kingsley Tart  wrote:
>
> Hi,
>
> When dialling a remote SIP host with PJSIP, is it possible either
> within the dialplan or via the AMI to find out the IP address of the
> remote host?
>
>
> The CHANNEL dialplan function[1] provides functionality for pjsip to get
> the remote address.
>
> [1]
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+19+Function_CHANNEL
>
>
> Thanks, that looks perfect. What is the syntax? I have tried a few things
> but none work:
>

${CHANNEL(pjsip,remote_addr)}

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- 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(PJSIP/xx) - finding the IP address it connected to

2021-11-04 Thread Kingsley Tart
On Wed, 2021-11-03 at 16:25 -0300, Joshua C. Colp wrote:
> On Wed, Nov 3, 2021 at 3:31 PM Kingsley Tart 
> wrote:
> > Hi,
> > 
> > When dialling a remote SIP host with PJSIP, is it possible either
> > within the dialplan or via the AMI to find out the IP address of
> > the
> > remote host?
> 
> The CHANNEL dialplan function[1] provides functionality for pjsip to
> get the remote address.
> 
> [1] 
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+19+Function_CHANNEL
>  
> 

Thanks, that looks perfect. What is the syntax? I have tried a few
things but none work:

exten => s,n,Set(tmp=CHANNEL(PJSIP,remote_addr))exten =>
s,n,Set(tmp=CHANNEL(PJSIP/remote_addr))exten =>
s,n,Set(tmp=${CHANNEL(PJSIP,remote_addr)})exten =>
s,n,Set(tmp=${CHANNEL(PJSIP/remote_addr)})exten =>
s,n,Set(tmp=CHANNEL(pjsip,remote_addr))exten =>
s,n,Set(tmp=CHANNEL(pjsip/remote_addr))exten =>
s,n,Set(tmp=${CHANNEL(pjsip,remote_addr)})exten =>
s,n,Set(tmp=${CHANNEL(pjsip/remote_addr)})exten =>
s,n,Set(tmp=CHANNEL(remote_addr))exten =>
s,n,Set(tmp=CHANNEL(remote_addr))exten =>
s,n,Set(tmp=${CHANNELremote_addr)})exten =>
s,n,Set(tmp=${CHANNEL(remote_addr)})

-- Executing [s@register-answer:5] Set("PJSIP/btipx-0005",
"tmp=CHANNEL(PJSIP,remote_addr)") in new stack-- Executing [
s@register-answer:6] Set("PJSIP/btipx-0005",
"tmp=CHANNEL(PJSIP/remote_addr)") in new stack[Nov  4 11:41:20]
WARNING[11722][C-0003]: func_channel.c:463 func_channel_read:
Unknown or unavailable item requested: 'PJSIP,remote_addr'--
Executing [s@register-answer:7] Set("PJSIP/btipx-0005", "tmp=") in
new stack[Nov  4 11:41:20] WARNING[11722][C-0003]:
func_channel.c:463 func_channel_read: Unknown or unavailable item
requested: 'PJSIP/remote_addr'-- Executing [s@register-answer:8]
Set("PJSIP/btipx-0005", "tmp=") in new stack-- Executing [
s@register-answer:9] Set("PJSIP/btipx-0005",
"tmp=CHANNEL(pjsip,remote_addr)") in new stack-- Executing [
s@register-answer:10] Set("PJSIP/btipx-0005",
"tmp=CHANNEL(pjsip/remote_addr)") in new stack[Nov  4 11:41:20]
WARNING[974]: pjsip/dialplan_functions.c:834 channel_read_pjsip: No
transport information for channel PJSIP/btipx-0005[Nov  4 11:41:20]
WARNING[11722][C-0003]: func_channel.c:463 func_channel_read:
Unknown or unavailable item requested: 'pjsip,remote_addr'--
Executing [s@register-answer:11] Set("PJSIP/btipx-0005", "tmp=") in
new stack[Nov  4 11:41:20] WARNING[11722][C-0003]:
func_channel.c:463 func_channel_read: Unknown or unavailable item
requested: 'pjsip/remote_addr'-- Executing [s@register-answer:12]
Set("PJSIP/btipx-0005", "tmp=") in new stack-- Executing [
s@register-answer:13] Set("PJSIP/btipx-0005",
"tmp=CHANNEL(remote_addr)") in new stack-- Executing [
s@register-answer:14] Set("PJSIP/btipx-0005",
"tmp=CHANNEL(remote_addr)") in new stack-- Executing [
s@register-answer:15] Set("PJSIP/btipx-0005", "tmp=") in new
stack[Nov  4 11:41:20] WARNING[11722][C-0003]: func_channel.c:463
func_channel_read: Unknown or unavailable item requested:
'remote_addr'-- Executing [s@register-answer:16] Set("PJSIP/btipx-
0005", "tmp=") in new stack

-- 
Cheers,
Kingsley.
-- 
_
-- 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(PJSIP/xx) - finding the IP address it connected to

2021-11-03 Thread Joshua C. Colp
On Wed, Nov 3, 2021 at 3:31 PM Kingsley Tart  wrote:

> Hi,
>
> When dialling a remote SIP host with PJSIP, is it possible either
> within the dialplan or via the AMI to find out the IP address of the
> remote host?
>

The CHANNEL dialplan function[1] provides functionality for pjsip to get
the remote address.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+19+Function_CHANNEL

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- 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] Dial(PJSIP/xx) - finding the IP address it connected to

2021-11-03 Thread Kingsley Tart
Hi,

When dialling a remote SIP host with PJSIP, is it possible either
within the dialplan or via the AMI to find out the IP address of the
remote host?

If for example a remote host has multiple A records, I would like to
know which one Asterisk has connected to.

We have an issue with some remote hosts that send INVITE messages back
periodically mid-call, but because of our firewall the messages aren't
being received by Asterisk, therefore not being answered, and the
remote host is dropping the call.

We can't open those hosts up by default in the firewall because
customers could choose any SIP destination, but if I could allow the
specific remote address for the duration of the call, it would solve
some issues. I could use AGI scripts to add/remove firewall rules as
needed.

Unless, that is, there's a better way?

I'm using Asterisk 18.7.1 FWIW.

Cheers,
Kingsley.


-- 
_
-- 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(${PJSIP_DIAL_CONTACTS(Alice)} & ${PJSIP_DIAL_CONTACTS(Bob)}) how not to fail if one endpoint has no registered AOR?

2019-06-10 Thread Administrator TOOTAI

Le 10/06/2019 à 10:53, Benoit Panizzon a écrit :

What about to put eveything in a variable and the remove the last
character if it equal &


Yes, I considered this...

What if you dial three endpoints and the middle one (or last one) is
empty? You would also need to remove the first & and any double &
within that string. Is it faisable with asterisk logic?


When I'm in your case I add *not empty* EP one by one adding & after 
each. At the end, my variable is empty or finish with &. I then have to 
remove this last character and start dial.


--
Daniel

--
_
-- 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(${PJSIP_DIAL_CONTACTS(Alice)} & ${PJSIP_DIAL_CONTACTS(Bob)}) how not to fail if one endpoint has no registered AOR?

2019-06-10 Thread Benoit Panizzon
> What about to put eveything in a variable and the remove the last 
> character if it equal &

Yes, I considered this...

What if you dial three endpoints and the middle one (or last one) is
empty? You would also need to remove the first & and any double &
within that string. Is it faisable with asterisk logic?

-Benoît-

-- 
_
-- 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(${PJSIP_DIAL_CONTACTS(Alice)} & ${PJSIP_DIAL_CONTACTS(Bob)}) how not to fail if one endpoint has no registered AOR?

2019-06-09 Thread Administrator TOOTAI

Le 09/06/2019 à 13:19, Benoit Panizzon a écrit :

Dear List


Hello



It's probably been more than a year now I switched from chan_sip to
pjsip. pjsip works much cleaner than chan_sip.

But!

I have come across a Problem I was not able to solve with Asterisk
Dialplan Logic.

With pjsip an endpoint can have multiple AOR, so you need to expand
them with ${PJSIP_DIAL_CONTACTS()} to be able to Dial() all of them
simultaneously.

But there are also situation where you need to Dial() not only one
endpoint, but multiple ones, even mixing technologies like IAX and SIP.

You can specify those multiple endpoints with the & separator in the
Dial() function.

Unfortunately if an pjsip endpoint has NO registered AORs,
${PJSIP_DIAL_CONTACTS()} returns an empty sting.

So consider:

same => n,Dial(IAX2/gu...@pbx.digium.com/s@default &
${PJSIP_DIAL_CONTACTS(Guest)})

If there is no Guest registered, the resulting string to dial passed to
Dial() is: "IAX2/gu...@pbx.digium.com/s@default &" which Dial complains
is not valid, because of a missing second line to dial after the &.


What about to put eveything in a variable and the remove the last 
character if it equal &


Something like

same = 
n,Set(toDial=IAX2/gu...@pbx.digium.com/s@default&${PJSIP_DIAL_CONTACTS(Guest)})

same = n,ExecIf($["${toDial:-1}"=="&"]?Set(toDial=${toDial:0:-1}))
same = n,Dial(${toDial})

[...]
--
Daniel

--
_
-- 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] Dial(${PJSIP_DIAL_CONTACTS(Alice)} & ${PJSIP_DIAL_CONTACTS(Bob)}) how not to fail if one endpoint has no registered AOR?

2019-06-09 Thread Benoit Panizzon
Dear List

It's probably been more than a year now I switched from chan_sip to
pjsip. pjsip works much cleaner than chan_sip.

But!

I have come across a Problem I was not able to solve with Asterisk
Dialplan Logic.

With pjsip an endpoint can have multiple AOR, so you need to expand
them with ${PJSIP_DIAL_CONTACTS()} to be able to Dial() all of them
simultaneously.

But there are also situation where you need to Dial() not only one
endpoint, but multiple ones, even mixing technologies like IAX and SIP.

You can specify those multiple endpoints with the & separator in the
Dial() function.

Unfortunately if an pjsip endpoint has NO registered AORs,
${PJSIP_DIAL_CONTACTS()} returns an empty sting.

So consider:

same => n,Dial(IAX2/gu...@pbx.digium.com/s@default &
${PJSIP_DIAL_CONTACTS(Guest)})

If there is no Guest registered, the resulting string to dial passed to
Dial() is: "IAX2/gu...@pbx.digium.com/s@default &" which Dial complains
is not valid, because of a missing second line to dial after the &.

Well, I could try to expand all the PJSIP Endpoints in a perl AGI
script and then compose a variable to contain a valid string for
Dial(), but I would prefer to do this with Asterisk Logic.

(Yes, with only two endpoints this can somehow be done with Set(if and
compare for empty string), but the more endpoints to ring the more
complicated it is getting.

Anyone having figured an 'easy' way to do this? Or is there even an
alternative to ${PJSIP_DIAL_CONTACTS(Guest)} which would Dial all AOR,
and still work if no AOR is present?

Sidenote:

Set Variable IF(string emptry) constructions also return en empty sting
if the condition does NOT match, is there a reversed way to do it?
IF(string empty) SET variable= ?

-Benoît-

-- 
_
-- 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 to FastAGI application appears as 1-second CDR - how do I fix?

2018-06-02 Thread Tony Mountifield
In article <7d8dc02f-0fce-4d47-72d9-604994c33...@palosanto.com>,
Alex Villací­s Lasso  wrote:
> El 29/05/18 a las 05:24, Tony Mountifield escribió:
> > In article <3a005ff6-19a4-215b-4751-bee616ec7...@palosanto.com>,
> > Alex Villací­s Lasso  wrote:
> >> In my application, I am using AMI to run an Originate command between a 
> >> channel and a dialplan application (NOT a
> >> context). In my case, the application I want to invoke is FastAGI. The 
> >> Originate AMI command works correctly, but
> >> Asterisk generates a very
> >> short (0-1s) duration for the CDR that results from this call, regardless 
> >> of the time spent running the FastAGI
> >> application. I want the CDR duration to reflect the time spent in the 
> >> entirety of the call, as is normal for ordinary
> >> calls. What should I do? I
> >> am running Asterisk 11.25.3 .
> >
> > Are you using Local channels as the target channel?
>
> Yes, this is the standard way my application works.

OK, so it is likely to be the same problem as I encountered.

> > I found what I believe is an issue with CDR handling when masquerading 
> > Local channels, when I ported
> > one of my old applications from Asterisk 1.2.32 to 11.25.3. It was 
> > recording an incorrect CDR
> > for the setup part of the call, and none for the answered part. In 1.2.32 I 
> > was getting two CDRs,
> > one for the setup part and another for the answered part.
> >
> > I eventually tracked it down to ast_do_masquerade() in channel.c, and made 
> > the following change,
> > which corrected the CDR behaviour back to the same as what Asterisk 1.2 had 
> > done:
> > [...]
> I will try doing this change and recompiling to see what happens.

Cool, please let us know if it helps!

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

-- 
_
-- 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 to FastAGI application appears as 1-second CDR - how do I fix?

2018-05-29 Thread Alex Villací­s Lasso

El 29/05/18 a las 05:24, Tony Mountifield escribió:

In article <3a005ff6-19a4-215b-4751-bee616ec7...@palosanto.com>,
Alex Villací­s Lasso  wrote:

In my application, I am using AMI to run an Originate command between a channel 
and a dialplan application (NOT a
context). In my case, the application I want to invoke is FastAGI. The 
Originate AMI command works correctly, but
Asterisk generates a very
short (0-1s) duration for the CDR that results from this call, regardless of 
the time spent running the FastAGI
application. I want the CDR duration to reflect the time spent in the entirety 
of the call, as is normal for ordinary
calls. What should I do? I
am running Asterisk 11.25.3 .

Are you using Local channels as the target channel?

Yes, this is the standard way my application works.


I found what I believe is an issue with CDR handling when masquerading Local 
channels, when I ported
one of my old applications from Asterisk 1.2.32 to 11.25.3. It was recording an 
incorrect CDR
for the setup part of the call, and none for the answered part. In 1.2.32 I was 
getting two CDRs,
one for the setup part and another for the answered part.

I eventually tracked it down to ast_do_masquerade() in channel.c, and made the 
following change,
which corrected the CDR behaviour back to the same as what Asterisk 1.2 had 
done:

$ diff -u --show-c-function channel.c.orig channel.c
--- channel.c.orig  2017-09-19 17:03:38.0 +0100
+++ channel.c   2018-05-29 11:13:41.0 +0100
@@ -6864,7 +6864,9 @@ int ast_do_masquerade(struct ast_channel
 } exchange;
 struct ast_channel *clonechan, *chans[2];
 struct ast_channel *bridged;
+#ifdef I_THINK_THIS_IS_WRONG /* Tony Mountifield, 2018-03-29. Removing this 
code fixes lost CDRs with masquerade */
 struct ast_cdr *cdr;
+#endif
 struct ast_datastore *xfer_ds;
 struct xfer_masquerade_ds *xfer_colp;
 struct ast_format rformat;
@@ -7035,10 +7037,12 @@ int ast_do_masquerade(struct ast_channel
 ast_channel_tech_pvt_set(original, ast_channel_tech_pvt(clonechan));
 ast_channel_tech_pvt_set(clonechan, t_pvt);

+#ifdef I_THINK_THIS_IS_WRONG /* Tony Mountifield, 2018-03-29. Removing this 
code fixes lost CDRs with masquerade */
 /* Swap the cdrs */
 cdr = ast_channel_cdr(original);
 ast_channel_cdr_set(original, ast_channel_cdr(clonechan));
 ast_channel_cdr_set(clonechan, cdr);
+#endif

 /* Swap the alertpipes */
 ast_channel_internal_alertpipe_swap(original, clonechan);
$

I didn't research what version this change appeared in, nor whether it has been 
subsequently fixed in
later versions of Asterisk. There was no point reporting it in Asterisk 11, as 
that was out of LTS
by the time I discovered it.

So you could try making the above changes to channel.c and see if it improves 
the CDRs for you.

Cheers
Tony


I will try doing this change and recompiling to see what happens.

--
_
-- 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 to FastAGI application appears as 1-second CDR - how do I fix?

2018-05-29 Thread Tony Mountifield
In article <3a005ff6-19a4-215b-4751-bee616ec7...@palosanto.com>,
Alex Villací­s Lasso  wrote:
> In my application, I am using AMI to run an Originate command between a 
> channel and a dialplan application (NOT a
> context). In my case, the application I want to invoke is FastAGI. The 
> Originate AMI command works correctly, but
> Asterisk generates a very 
> short (0-1s) duration for the CDR that results from this call, regardless of 
> the time spent running the FastAGI
> application. I want the CDR duration to reflect the time spent in the 
> entirety of the call, as is normal for ordinary
> calls. What should I do? I 
> am running Asterisk 11.25.3 .

Are you using Local channels as the target channel?

I found what I believe is an issue with CDR handling when masquerading Local 
channels, when I ported
one of my old applications from Asterisk 1.2.32 to 11.25.3. It was recording an 
incorrect CDR
for the setup part of the call, and none for the answered part. In 1.2.32 I was 
getting two CDRs,
one for the setup part and another for the answered part.

I eventually tracked it down to ast_do_masquerade() in channel.c, and made the 
following change,
which corrected the CDR behaviour back to the same as what Asterisk 1.2 had 
done:

$ diff -u --show-c-function channel.c.orig channel.c
--- channel.c.orig  2017-09-19 17:03:38.0 +0100
+++ channel.c   2018-05-29 11:13:41.0 +0100
@@ -6864,7 +6864,9 @@ int ast_do_masquerade(struct ast_channel
} exchange;
struct ast_channel *clonechan, *chans[2];
struct ast_channel *bridged;
+#ifdef I_THINK_THIS_IS_WRONG /* Tony Mountifield, 2018-03-29. Removing this 
code fixes lost CDRs with masquerade */
struct ast_cdr *cdr;
+#endif
struct ast_datastore *xfer_ds;
struct xfer_masquerade_ds *xfer_colp;
struct ast_format rformat;
@@ -7035,10 +7037,12 @@ int ast_do_masquerade(struct ast_channel
ast_channel_tech_pvt_set(original, ast_channel_tech_pvt(clonechan));
ast_channel_tech_pvt_set(clonechan, t_pvt);

+#ifdef I_THINK_THIS_IS_WRONG /* Tony Mountifield, 2018-03-29. Removing this 
code fixes lost CDRs with masquerade */
/* Swap the cdrs */
cdr = ast_channel_cdr(original);
ast_channel_cdr_set(original, ast_channel_cdr(clonechan));
ast_channel_cdr_set(clonechan, cdr);
+#endif

/* Swap the alertpipes */
ast_channel_internal_alertpipe_swap(original, clonechan);
$

I didn't research what version this change appeared in, nor whether it has been 
subsequently fixed in
later versions of Asterisk. There was no point reporting it in Asterisk 11, as 
that was out of LTS
by the time I discovered it.

So you could try making the above changes to channel.c and see if it improves 
the CDRs for you.

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

-- 
_
-- 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] Dial to FastAGI application appears as 1-second CDR - how do I fix?

2018-05-28 Thread Alex Villací­s Lasso
In my application, I am using AMI to run an Originate command between a channel and a dialplan application (NOT a context). In my case, the application I want to invoke is FastAGI. The Originate AMI command works correctly, but Asterisk generates a very 
short (0-1s) duration for the CDR that results from this call, regardless of the time spent running the FastAGI application. I want the CDR duration to reflect the time spent in the entirety of the call, as is normal for ordinary calls. What should I do? I 
am running Asterisk 11.25.3 .



--
_
-- 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-10 Thread Frank Vanoni
On Wed, 2017-05-10 at 12:56 +0200, Frank Vanoni wrote:
> exten => 2001,1,Dial(SIP/Dial(SIP/deviceA/deviceB/deviceC)
> 
> exten => 2002,1,Dial(SIP/Dial(SIP/deviceA/deviceB)


Whoops... sorry for the typo (in the hurry of copy & paste)!

exten => 2001,1,Dial(SIP/deviceA/deviceB/deviceC)

exten => 2002,1,Dial(SIP/deviceA/deviceB)


-- 
_
-- 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-10 Thread Frank Vanoni
Dear Digium List

First of all, I thank all of you for all the replies and the interesting
suggestions. I thank you very much. I can only learn from people like
you. :-)

I will remember all the different solutions for a future use in other
scenarios.

On Mon, 2017-05-08 at 16:35 +0200, Frank Vanoni wrote:

> Is there a better solution? 

At the end, I cleaned up my dial plan by removing the previous mess and
I'm using now ASTDB, as suggested, in the following way:


exten => 4000,1,Set(DB(alldevices/status)=OFF)
exten => 4000,2,Playback(service)

exten => 4001,1,Set(DB(alldevices/status)=ON)
exten => 4001,2,Playback(service)

exten => 2000,1,GotoIf($[${DB(alldevices/status)}=ON]?2001,1:2002,1)

exten => 2001,1,Dial(SIP/Dial(SIP/deviceA/deviceB/deviceC)

exten => 2002,1,Dial(SIP/Dial(SIP/deviceA/deviceB)


-- 
_
-- 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-09 Thread Stefan Becker

Greetings,

I think this is a better solution:

I've created a simular solution for our main incoming line.  Extentions 
can add/remove themselfs from

the distrubuting extention.

I used the DATABASE functions of Asterisk to accomplish this following.

my example:
first create a few Database/Keys in the Asterisk CLI to express which 
phones may use this feature
and how the extention will actually be dialed. Like I have two phones on 
differant hardware that
BOTH act as "169" and both get called by "169" but need special 
intrustions to be dialed.


In Asterisk CLI


DATABASE put zentrale 111 0: SIP/111a/111b
DATABASE put zentrale 115 0:SIP/114/115
DATABASE put zentrale 118 0:SIP/118
DATABASE put zentrale 298 1:DAHDI/r1/298
DATABASE put zentrale 168 1:SIP/168/r1/169


add these lines to
extentions.conf

[macro-SetZentrale]
 exten => s,1,Set(OPER=${DB_KEYS(zentrale)})
 exten => s,n,Set(DailOut=)
 exten => s,n,While($["${SET(XXX=${SHIFT(OPER)})}"!=""])
 exten => s,n,GotoIf($["${DB(zentrale/${XXX}):0:2}"!="1:"]?skp)
 exten => s,n,Set(DailOut=${DailOut}&${DB(zentrale/${XXX}):2})
 exten => s,n(skp),EndWhile
 exten => s,n,Set(DailOut=${DailOut:1})
 exten => s,n,Set(DB(zentrale/ist)=${DailOut})

[SIP-Phones]
;incoming call for "0" --> Operator
 exten = 0,1,GotoIfTime(07:45-17:05,mon-fri,*,*?inhours)
 same =  n,Dial(${DB(zentrale/ist)},10,txk)
 same =  n,GoTo(SIP-Phones,300,1)
 same =  n(inhours),Dial(${DB(zentrale/ist)},10,txk)
 same =  n,SIPAddHeader(Alert-Info:\;info=abwurf)
 same =  n,Dial(SIP/297&${DB(zentrale/ist)},30,txk)
 same =  n,GoTo(SIP-Phones,300,1)
 same =  n,HangUp()

 exten = 300,1,Answer()
  same =  n,Wait(1)
  same =  n,VoiceMail(300)
  same =  n,HangUp()

exten = 301,1,Set(OPER=${DB_KEYS(zentrale)})
 same = n,Answer()
 same = n,PlayBack(/etc/asterisk/wav/301-zentrale)
 same = n,PlayBack(/etc/asterisk/wav/500-nbstl)
 same = n,While($["${SET(XX=${SHIFT(OPER)})}"!=""])
 same = n,GotoIf($["${DB(zentrale/${XX}):0:2}"!="1:"]?skp)
;same = n,SayNumber(${XX})
 same = n,SayPhonetic(${XX})
 same = n,Wait(1)
 same = n(skp),EndWhile
 same = n,Wait(1)
 same = n,PlayBack(vm-goodbye)
 same = n,HangUp()

exten = 302,1,Answer()
 same = n,Set(CDR(accountcode)=${CALLERID(number):-3})
 same = 
n,GotoIf($["${DB_EXISTS(zentrale/${CALLERID(number)})}"="0"]?301,1)
 same = 
n,GotoIf($["${DB(zentrale/${CALLERID(number)}):0:2}"="1:"]?off)
 same = 
n,Set(DB(zentrale/${CALLERID(number)})=1${DB(zentrale/${CALLERID(number)}):1})

 same = n,macro(SetZentrale)
 same =   n,PlayBack(beep)
 same =   n,PlayBack(beep)
 same =   n,PlayBack(/etc/asterisk/wav/500-nbstl)
;same =   n,SayNumber(${CALLERID(number)})
 same =   n,SayPhonetic(${CALLERID(number)})
 same =   n,PlayBack(/etc/asterisk/wav/302-hinzu)
 same = n,Goto(bye)
 same = 
n(off),Set(DB(zentrale/${CALLERID(number)})=0${DB(zentrale/${CALLERID(number)}):1})

 same = n,macro(SetZentrale)
 same =   n,PlayBack(beep)
 same =   n,PlayBack(/etc/asterisk/wav/500-nbstl)
;same =   n,SayNumber(${CALLERID(number)})
 same =   n,SayPhonetic(${CALLERID(number)})
 same =   n,PlayBack(/etc/asterisk/wav/302-hinab)
 same = n(bye),Wait(1)
 same = n,PlayBack(vm-goodbye)
 same = n,HangUp()

;END


Incoming calls to "0"  -->  Dial all phones listed via "302"
 --->  Dial(${DB(zentrale/ist)})

"300" - VoiceMail-Box
"301" - "reads off" the list of phones registered via "302"

"302" - if extention not registered, adds calling extention (database 
entry must exist) to Dial-List
   DATABASE entry "zentrale/ist" is created or modified by this 
methode
"302" - if extention registered, removes calling extention from Dial-List 
${DB(zentrale/ist)



I hope this may interest and help you along 


my best regards,

Stefan Becker



On Mon, May 8, 2017 at 4:35 PM, Frank Vanoni  
wrote:

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.
.




--
_
-- 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-09 Thread Héctor Royo
I would use a Queue with RingAll strategy. Then, I would Pause/Unpause
Agents.

A "Paused" agent would not receive calls from the Queue, but can still
receive direct calls.

You can set an extension to Pause the member and another to Unpause it,
using the applications PauseQueueMember and UnPauseQueueMember.

I hope it helps!
-- 
_
-- 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

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

2017-05-08 Thread Marcelo Terres
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_DialplanExtensionRemove
Marcelo H. Terres 
IM: mhter...@jabber.mundoopensource.com.br
https://www.mundoopensource.com.br
https://twitter.com/mhterres
https://linkedin.com/in/marceloterres


On 8 May 2017 at 16:13, Antony Stone
 wrote:
> On Monday 08 May 2017 at 15:44:47, Marcelo Terres wrote:
>
>> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerAction_Dialpl
>> anExtensionAdd
>>
>> Is it enough?
>
> Is there a similar call to delete an extension, or to modify an existing one?
>
> On the basis that the OP already has extension 2000 defined, he would need to
> delete this and replace it with a new definition, or alter the current
> definition, to get the required results.
>
> Simply being able to add a new extension to an existing dialplan isn't quite
> enough.
>
>
> Antony.
>
>> On 8 May 2017 at 15:35, Frank Vanoni  wrote:
>> > 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.
>> >
>> > Here is what I did...
>> >
>> > In extensions.conf:
>> >
>> > -- snip -
>> > [mynicecontext]
>> > #include "ringdevice.conf
>> >
>> > exten => 2000,1,GoTo(ringdevice,ring,1)
>> >
>> > exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
>> >
>> >> /etc/asterisk/ringdevice.conf)
>> >
>> > exten => 4000,2,Wait(3)
>> > exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
>> > exten => 4000,4,Playback(service)
>> >
>> > exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
>> >
>> >> /etc/asterisk/ringdevice.conf)
>> >
>> > exten => 4001,2,Wait(3)
>> > exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
>> > exten => 4001,4,Playback(service)
>> > -- end snip -
>> >
>> > twodevices.txt contains
>> > exten => ring,1,Dial(SIP/deviceA)
>> >
>> > alldevices.txt contains
>> > exten => ring,1,Dial(SIP/deviceA/deviceC)
>> >
>> > By dialing 4000 or 4001, the dialplan is modified and reloaded
>> > accordingly.
>> >
>> > Is there a better solution?
>> >
>> > Frank
>
> --
> 3 logicians walk into a bar. The bartender asks "Do you all want a drink?"
> The first logician says "I don't know."
> The second logician says "I don't know."
> The third logician says "Yes!"
>
>Please reply to the list;
>  please *don't* CC me.
>
> --
> _
> -- 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

-- 
_
-- 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 Antony Stone
On Monday 08 May 2017 at 15:44:47, Marcelo Terres wrote:

> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerAction_Dialpl
> anExtensionAdd
> 
> Is it enough?

Is there a similar call to delete an extension, or to modify an existing one?

On the basis that the OP already has extension 2000 defined, he would need to 
delete this and replace it with a new definition, or alter the current 
definition, to get the required results.

Simply being able to add a new extension to an existing dialplan isn't quite 
enough.


Antony.

> On 8 May 2017 at 15:35, Frank Vanoni  wrote:
> > 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.
> > 
> > Here is what I did...
> > 
> > In extensions.conf:
> > 
> > -- snip -
> > [mynicecontext]
> > #include "ringdevice.conf
> > 
> > exten => 2000,1,GoTo(ringdevice,ring,1)
> > 
> > exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
> > 
> >> /etc/asterisk/ringdevice.conf)
> > 
> > exten => 4000,2,Wait(3)
> > exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> > exten => 4000,4,Playback(service)
> > 
> > exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
> > 
> >> /etc/asterisk/ringdevice.conf)
> > 
> > exten => 4001,2,Wait(3)
> > exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> > exten => 4001,4,Playback(service)
> > -- end snip -
> > 
> > twodevices.txt contains
> > exten => ring,1,Dial(SIP/deviceA)
> > 
> > alldevices.txt contains
> > exten => ring,1,Dial(SIP/deviceA/deviceC)
> > 
> > By dialing 4000 or 4001, the dialplan is modified and reloaded
> > accordingly.
> > 
> > Is there a better solution?
> > 
> > Frank

-- 
3 logicians walk into a bar. The bartender asks "Do you all want a drink?"
The first logician says "I don't know."
The second logician says "I don't know."
The third logician says "Yes!"

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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 John Kiniston
You could use the DIALGROUP function for this and not need to shell out.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_DIALGROUP

On Mon, May 8, 2017 at 7:35 AM, Frank Vanoni 
wrote:

> 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.
>
> Here is what I did...
>
> In extensions.conf:
>
> -- snip -
> [mynicecontext]
> #include "ringdevice.conf
>
> exten => 2000,1,GoTo(ringdevice,ring,1)
>
> exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
> > /etc/asterisk/ringdevice.conf)
> exten => 4000,2,Wait(3)
> exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> exten => 4000,4,Playback(service)
>
> exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
> > /etc/asterisk/ringdevice.conf)
> exten => 4001,2,Wait(3)
> exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> exten => 4001,4,Playback(service)
> -- end snip -
>
> twodevices.txt contains
> exten => ring,1,Dial(SIP/deviceA)
>
> alldevices.txt contains
> exten => ring,1,Dial(SIP/deviceA/deviceC)
>
> By dialing 4000 or 4001, the dialplan is modified and reloaded
> accordingly.
>
> Is there a better solution?
>
> Frank
>
>
> --
> _
> -- 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
>



-- 
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein
-- 
_
-- 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 J Montoya or A J Stiles
On Monday 08 May 2017, Frank Vanoni wrote:
> By dialing 4000 or 4001, the dialplan is modified and reloaded
> accordingly.
> 
> Is there a better solution?

That's an .  interesting . way of doing things!

We would be thinking in terms of using a GLOBAL variable, or an ASTDB entry, 
to indicate whether or not the extra extension should be dialled.  This method 
ought to be extendable to serve multiple extensions, without the need to 
assemble the file from tiny snippets .


-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

-- 
_
-- 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 Marcelo Terres
https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerAction_DialplanExtensionAdd

Is it enough?

Regards,
Marcelo H. Terres 
IM: mhter...@jabber.mundoopensource.com.br
https://www.mundoopensource.com.br
https://twitter.com/mhterres
https://linkedin.com/in/marceloterres


On 8 May 2017 at 15:35, Frank Vanoni  wrote:
> 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.
>
> Here is what I did...
>
> In extensions.conf:
>
> -- snip -
> [mynicecontext]
> #include "ringdevice.conf
>
> exten => 2000,1,GoTo(ringdevice,ring,1)
>
> exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
>> /etc/asterisk/ringdevice.conf)
> exten => 4000,2,Wait(3)
> exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> exten => 4000,4,Playback(service)
>
> exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
>> /etc/asterisk/ringdevice.conf)
> exten => 4001,2,Wait(3)
> exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> exten => 4001,4,Playback(service)
> -- end snip -
>
> twodevices.txt contains
> exten => ring,1,Dial(SIP/deviceA)
>
> alldevices.txt contains
> exten => ring,1,Dial(SIP/deviceA/deviceC)
>
> By dialing 4000 or 4001, the dialplan is modified and reloaded
> accordingly.
>
> Is there a better solution?
>
> Frank
>
>
> --
> _
> -- 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

-- 
_
-- 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] Dial an extension to modify dialplan

2017-05-08 Thread Frank Vanoni
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.

Here is what I did...

In extensions.conf:

-- snip -
[mynicecontext]
#include "ringdevice.conf

exten => 2000,1,GoTo(ringdevice,ring,1)

exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
> /etc/asterisk/ringdevice.conf)
exten => 4000,2,Wait(3)
exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
exten => 4000,4,Playback(service)

exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
> /etc/asterisk/ringdevice.conf)
exten => 4001,2,Wait(3)
exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
exten => 4001,4,Playback(service)
-- end snip -

twodevices.txt contains 
exten => ring,1,Dial(SIP/deviceA)

alldevices.txt contains 
exten => ring,1,Dial(SIP/deviceA/deviceC)

By dialing 4000 or 4001, the dialplan is modified and reloaded
accordingly.

Is there a better solution? 

Frank


-- 
_
-- 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() using full SIP account details

2017-03-19 Thread Martin Lima

> Incidentally, I do know I can put a Register statement into sip.conf, and
> then be able to use the Dial() application just using the username (and
> this works), however I need a solution which can support two or more
> accounts at different remote providers having the same username.

You can define all your remote providers in sip conf:

[Provider1]
type=peer
host=provider1.tld
defaultuser=yourusername
fromuser=yourusername
secret=yourverysecretpassword

[Provider2]
type=peer
host=provider2.tld
defaultuser=yourusername
fromuser=yourusername
secret=yourverysecretpassword

And then use Dial(Sip/Provider1/callednumber)
No registration should be neccessary in this case unless you want to receive 
calls as well. (you will need to change type to friend too in this case...)

Martin
> 
> Therefore the username alone will not be unique, but the combination of
> username + password + server name will be, hence the reason why I would need
> to use this in the dialplan.
> 
> 
> If anyone can offer suggestions on how to use the full SIP credentials in a
> Dial() statement, and also how to escape special characters such as ! I
> would be very grateful.
> 
> 
> Thanks,
> 
> 
> Antony.


-- 
_
-- 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] Dial() using full SIP account details

2017-03-01 Thread Antony Stone
Hi.

I'm having problems with the Dial() application when I use full SIP account 
details in it.

I'm looking at the O'Reilly book https://www.amazon.co.uk/dp/1449332420 on 
page 135, where it says "The Dial() application also allows you to connect to 
a remote VoIP endpoint not previously defined in one of the channel 
configuration files.  The full syntax is:

Dial(technology/user[:password]@remotehost[:port][/remote_extension])

As an example, you can dial into a demonstration server at Digium using the 
IAX2 protocol by using the following extension:

exten => 500,1,Dial(IAX2/gu...@misery.digium.com/s)"


I'm using Asterisk 11.13.1 under Debian 7.

I am trying to dial from Asterisk to another SIP server using an account on 
that server, for which I know the username and password.

Just to confirm, if I put the account credentials into a telephone and register 
to the remote server, I can place calls as expected.

When I try to do the same thing using Asterisk, however:

1. The password I have been assigned on the remote server contains a ! symbol, 
and it seems that Asterisk is ignoring this symbol and everything after it:

The account name (slightly obfuscated for security in this email) is 832+ios
The password (ditto) is 31oNPMLQ!9d_XuQu
I wish to dial through that account to the number 0203 (which works 
from a telephone).

In my dialplan I have (all on one line of course):

exten => 936,1,Dial(SIP/832+ios:31oNPMLQ!
9d_x...@remote.server.com/0203yyy)

Dialling extension 936 results in:

-
-- Executing [936@outbound:1] Dial("SIP/1000-00db", 
"SIP/832+ios:31oNPMLQ!9d_x...@remote.server.com/0203yyy") in new stack

  == Using SIP RTP CoS mark 5

[2017-02-28 11:38:16] ERROR[1005][C-0d21]: netsock2.c:269 
ast_sockaddr_resolve: getaddrinfo("832+ios", "31oNPMLQ", ...): Servname not 
supported for ai_socktype

[2017-02-28 11:38:16] WARNING[1005][C-0d21]: chan_sip.c:6057 create_addr: 
No such host: 832+ios:31oNPMLQ

[2017-02-28 11:38:16] WARNING[1005][C-0d21]: app_dial.c:2437 
dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber 
absent)
-

I've tried:
 - escaping the ! by prefixing it with a \
 - enclosing the entire password within '
 - enclosing the entire username / password within '
but Asterisk still simply stops reading at the ! and ignores everything which 
follows.

So, how can I get it to use this password which happens to contain a ! ?


2. If I get my remote provider to change the password so that it does not 
contain the ! symbol, Asterisk's behaviour changes:

exten => 
936,1,Dial(SIP/832+ios:31onpmlq_9d_x...@remote.server.com/0203yyy)

This now results in:

-
-- Executing [936@outbound:1] Dial("SIP/1000-00dc", 
"SIP/832+ios:31onpmlq_9d_x...@remote.server.com/0203yyy") in new stack

[2017-02-28 11:43:47] NOTICE[1011][C-0d22]: chan_sip.c:29848 
sip_request_call: Conflicting extension values given. Using '832+ios' and not 
'0203yyy'

  == Using SIP RTP CoS mark 5

-- Called SIP/832+ios:31onpmlq_9d_x...@remote.server.com/0203yyy

[2017-02-28 11:43:47] NOTICE[11692][C-0d22]: chan_sip.c:23010 
handle_response_invite: Failed to authenticate on INVITE to '"Antony Stone" 
;tag=as6ef135a8'
-

So, I appear to have given the parameters in the correct form:

Dial(technology/user[:password]@remotehost[:port][/remote_extension])

and I get told that the username does not match the remote_extension (ie: the 
number I want to dial) - well, of course it doesn't - the username is part of 
my authentication to the server, nothing to do with who I want to call?


Incidentally, I do know I can put a Register statement into sip.conf, and then 
be able to use the Dial() application just using the username (and this 
works), however I need a solution which can support two or more accounts at 
different remote providers having the same username.

Therefore the username alone will not be unique, but the combination of 
username + password + server name will be, hence the reason why I would need 
to use this in the dialplan.


If anyone can offer suggestions on how to use the full SIP credentials in a 
Dial() statement, and also how to escape special characters such as ! I would 
be very grateful.


Thanks,


Antony.

-- 
Software development can be quick, high quality, or low cost.

The customer gets to pick any two out of three.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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:
   

Re: [asterisk-users] Dial() from the console?

2017-01-11 Thread Tzafrir Cohen
On Wed, Jan 11, 2017 at 07:31:31AM -0500, Doug Lytle wrote:
> >>> On Jan 11, 2017, at 7:20 AM, Thufir Hawat hawat.thu...@gmail.com wrote:
> 
> >>> Can I dial directly from the asterisk console with the Dial() application?
> 
> 
> console dial number@context

Note, however, that it is a different thing. It uses a specific device:
the "console". That is: the speaker and microphone of the system
Asterisk is running on. For that to be available you need to have one of
chan_alsa, chan_console or chan_oss loaded and working.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com

-- 
_
-- 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() from the console?

2017-01-11 Thread Thufir Hawat



On Wed, 11 Jan 2017, Doug Lytle wrote:


On Jan 11, 2017, at 7:20 AM, Thufir Hawat hawat.thu...@gmail.com wrote:



Can I dial directly from the asterisk console with the Dial() application?



console dial number@context



Thanks, that's much more intuitive :)


-Thufir

--
_
-- 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() from the console?

2017-01-11 Thread Doug Lytle
>>> On Jan 11, 2017, at 7:20 AM, Thufir Hawat hawat.thu...@gmail.com wrote:

>>> Can I dial directly from the asterisk console with the Dial() application?


console dial number@context

Doug

-- 
_
-- 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] Dial() from the console?

2017-01-11 Thread Thufir Hawat

Can I dial directly from the asterisk console with the Dial() application?


or, is channel originate preferred:

channel originate SIP/thufir extension 18003569377@outbound





thanks,

Thufir

--
_
-- 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 and start music on hold after timeout

2016-08-25 Thread Matthew Jordan
On Wed, Aug 24, 2016 at 6:02 AM, Israel Gottlieb  wrote:
> Are you sending progress?
>
>
> בתאריך 24 באוג׳ 2016 13:40,‏ "Saint Michael"  כתב:
>>
>> I have the same exact issue. I cannot push any sounds or even Playtones to
>> the caller, unless the channel is answered, which is not possible for
>> billing reasons.
>> I am also using the Local channel & Dial(PJSIP/...).
>> I think this is a bug in Asterisk 13. The Dial function has not answered
>> yet, so the Local channel should be able to play anything to the caller,
>> without answering, in parallel with Dial.
>> Should I open a JIRA ticket?
>>

This behavior is exactly the same as it has always been. As Richard
mentioned in your other thread, there is no bug here [1]. You have
multiple options:

(1) Indicating Ringing in the dialplan. Depending on your
configuration, Asterisk will generate a 180 and pass it back to the
caller, causing them to ring or it will generate a 183 and play a
ringing tone back to the caller itself.

(2) Indicate Progress in the dialplan. This will send back a 183 to
the caller and, if possible, will send sound from Asterisk to the
caller. You then have multiple options here:
(2a) If Asterisk has the ability to perform early bridging with an
outbound channel, it will. If not, it won't - and it won't mix the
early media from multiple outbound channels.
(2b) You can play media back yourself using MoH or one of the other
sound generation applications.

(3) Wait for one of your outbound channels to pass a 180 back, and
allow that to cause the inbound channel to ring.

[1] http://lists.digium.com/pipermail/asterisk-users/2016-August/289781.html

-- 
Matthew Jordan
Digium, Inc. | CTO
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 --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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 and start music on hold after timeout

2016-08-24 Thread Israel Gottlieb
Are you sending progress?

בתאריך 24 באוג׳ 2016 13:40,‏ "Saint Michael"  כתב:

> ​I have the same exact issue. I cannot push any sounds or even Playtones
> to the caller, unless the channel is answered, which is not possible for
> billing reasons.
> I am also using the Local channel & Dial(PJSIP/...).
> I think this is a bug in Asterisk 13. The Dial function has not answered
> yet, so the Local channel should be able to play anything to the caller,
> without answering, in parallel with Dial.
> Should I open a JIRA ticket?
>
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>   http://www.asterisk.org/community/astricon-user-conference
>
> 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
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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] Dial and start music on hold after timeout

2016-08-24 Thread Saint Michael
​I have the same exact issue. I cannot push any sounds or even Playtones to
the caller, unless the channel is answered, which is not possible for
billing reasons.
I am also using the Local channel & Dial(PJSIP/...).
I think this is a bug in Asterisk 13. The Dial function has not answered
yet, so the Local channel should be able to play anything to the caller,
without answering, in parallel with Dial.
Should I open a JIRA ticket?
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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 and start music on hold after timeout

2016-08-24 Thread David Duffett
Yes, sorry, my idea was too simplistic, as it did not take into account
that the caller would already be hearing the ringing and therefore the
announcement would need to be somehow mixed with that ringing...

On 24 August 2016 at 08:27, Jean Aunis  wrote:

> Using Progress didn't solve the problem. If I cannot find another way, I
> will use your solution of recording the ring tone.
>
> Le 23/08/2016 à 20:53, Israel Gottlieb a écrit :
>
> Maybe try progress() instead of answer ()
>
> בתאריך 23 באוג׳ 2016 7:19 PM,‏ "Jean Aunis"  כתב:
>
>> Thank you, I just tried your suggestion. Strangely, the announcement is
>> played only if I try to dial a SIP peer which is not available (not
>> registered to be more precise). If the SIP peer is available, I only get
>> the ring tone, and never hear the announcement. Here is the dialplan (I had
>> to add an Answer() before the Dial, otherwise the announcement is never
>> played, even in the first case) :
>>
>> exten = 007,1,Answer()
>> same  = n,Dial(SIP/foo/s@playme,40)
>>
>> [playme]
>> exten = s,1,Ringing()
>> same  = n,Wait(10)
>> same  = n,Playback(/var/lib/asterisk/sounddir/announce,noanswer)
>> When it is working, I can see the following output in the CLI, which is
>> not there otherwise :
>> -- SIP/x requested media update control 26, passing it to
>> Local/s@playme-05be;1
>>
>> Otherwise, no error message, Asterisk tells he is playing the
>> announcement but I don't hear it.
>>
>> Best regards
>>
>> Jean Aunis
>>
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>   http://www.asterisk.org/community/astricon-user-conference
>
> 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
>



-- 
[image: Digium logo]
*David Duffett*
Digium, Inc. · Director, Worldwide Asterisk Community
6 Landscape Close · Weston on the Green · Bicester · Oxfordshire OX25 3SX ·
UK
direct/fax: +1 256 428 6119 · mobile: +44 7722 442236
twitter: dduffett · linkedin: www.linkedin.com/in/davidduffett
Check us out at: http://digium.com · http://asterisk.org

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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 and start music on hold after timeout

2016-08-24 Thread Jean Aunis
Using Progress didn't solve the problem. If I cannot find another way, I 
will use your solution of recording the ring tone.



Le 23/08/2016 à 20:53, Israel Gottlieb a écrit :


Maybe try progress() instead of answer ()


בתאריך 23 באוג׳ 2016 7:19 PM,‏ "Jean Aunis" > כתב:


Thank you, I just tried your suggestion. Strangely, the
announcement is played only if I try to dial a SIP peer which is
not available (not registered to be more precise). If the SIP peer
is available, I only get the ring tone, and never hear the
announcement. Here is the dialplan (I had to add an Answer()
before the Dial, otherwise the announcement is never played, even
in the first case) :

exten = 007,1,Answer()
same  = n,Dial(SIP/foo/s@playme,40)

[playme]
exten = s,1,Ringing()
same  = n,Wait(10)
same  = n,Playback(/var/lib/asterisk/sounddir/announce,noanswer)

When it is working, I can see the following output in the CLI,
which is not there otherwise :
-- SIP/x requested media update control 26, passing it to
Local/s@playme-05be;1

Otherwise, no error message, Asterisk tells he is playing the
announcement but I don't hear it.

Best regards

Jean Aunis



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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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 and start music on hold after timeout

2016-08-23 Thread Israel Gottlieb
Maybe try progress() instead of answer ()

בתאריך 23 באוג׳ 2016 7:19 PM,‏ "Jean Aunis"  כתב:

> Thank you, I just tried your suggestion. Strangely, the announcement is
> played only if I try to dial a SIP peer which is not available (not
> registered to be more precise). If the SIP peer is available, I only get
> the ring tone, and never hear the announcement. Here is the dialplan (I had
> to add an Answer() before the Dial, otherwise the announcement is never
> played, even in the first case) :
>
> exten = 007,1,Answer()
> same  = n,Dial(SIP/foo/s@playme,40)
>
> [playme]
> exten = s,1,Ringing()
> same  = n,Wait(10)
> same  = n,Playback(/var/lib/asterisk/sounddir/announce,noanswer)
> When it is working, I can see the following output in the CLI, which is
> not there otherwise :
> -- SIP/x requested media update control 26, passing it to
> Local/s@playme-05be;1
>
> Otherwise, no error message, Asterisk tells he is playing the announcement
> but I don't hear it.
>
> Best regards
>
> Jean Aunis
>
> Le 23/08/2016 à 16:07, David Duffett a écrit :
>
> How about:
>
> exten => s,1,Dial(SIP/alice/555@delayed-announce,40)
>
> [delayed-announce]
> exten =>  555,1,Wait(20)
> same => n,Playback(myannouncement,noanswer)
> same => n,NoOP(Whatever else you want to do goes here)
>
> The 'noanswer' option on the Playback means that SIP/alice should continue
> to ring for the remaining 20 of the 40 seconds, as the Playback will not
> answer (terminate) the call.
>
> Don't forget AstriCon this year - www.astricon.net
>
> On 23 August 2016 at 12:52, Israel Gottlieb  wrote:
>
>> You could m and make a moh file that has ringing the first 30 sec and
>> then the anouncment
>>
>> בתאריך 22 באוג׳ 2016 7:19 PM,‏ "Jean Aunis"  כתב:
>>
>> Thank you for the idea. The problem with RetryDial, is that it will
>>> cancel the first call, play the announce and then dial the SIP peer once
>>> again, so the telephone will display a missed call. I would prefer to do
>>> everything in a single call.
>>>
>>> Le 22/08/2016 à 17:57, John Kiniston a écrit :
>>>
>>> You could try using RetryDial() instead of Dial, It supports playing an
>>> announcement.
>>>
>>>
>>> On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis 
>>> wrote:
>>>
 Sorry, I forgot to write that the SIP peer must keep ringing while the
 announcement is being played.

 Le 22/08/2016 à 17:42, John Kiniston a écrit :

 This seems like the obvious answer but maybe I'm misunderstanding the
 question.

 exten => s,1,Dial(SIP/alice,20)
  same =>   n,Playback(myannouncement)
  same =>   n,NoOP(Whatever else you want to do goes here)

 On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis 
 wrote:

> Hello,
>
> I am searching a way to dial a SIP peer, and if it does not answer
> within 20 seconds, play an announcement to the caller. This means that the
> caller would hear a ring tone for 20 seconds, and only then hear the
> announcement if the callee did not answer.
>
> I know it is possible to do this with ARI, but in this particular case
> I do not want to use ARI. I would like to do this purely with dialplan and
> AGI scripts, but I cannot find a way. I have read about the "m" option of
> Dial application, but it starts the announcement immediately, whereas I
> would like to start it after 20 seconds of timeout.
>
> Does anybody have an idea ?
>
> Best regards,
>
> Jean Aunis
>
>
> --
> _
> -- 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
>



 --
 A human being should be able to change a diaper, plan an invasion,
 butcher a hog, conn a ship, design a building, write a sonnet, balance
 accounts, build a wall, set a bone, comfort the dying, take orders, give
 orders, cooperate, act alone, solve equations, analyze a new problem, pitch
 manure, program a computer, cook a tasty meal, fight efficiently, die
 gallantly. Specialization is for insects.
 ---Heinlein




 --
 _
 -- 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

>>>
>>>
>>>
>>> --
>>> A 

Re: [asterisk-users] Dial and start music on hold after timeout

2016-08-23 Thread John Kiniston
Damn, I was going to suggest trying a Queue with a single member using the
'r' option to play ringing instead of MOH and using an announcement but the
queue will stop ringing your agent while it plays the announcement.

It'd go right back to ringing after the announcement however.

On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis  wrote:

> Sorry, I forgot to write that the SIP peer must keep ringing while the
> announcement is being played.
>
> Le 22/08/2016 à 17:42, John Kiniston a écrit :
>
> This seems like the obvious answer but maybe I'm misunderstanding the
> question.
>
> exten => s,1,Dial(SIP/alice,20)
>  same =>   n,Playback(myannouncement)
>  same =>   n,NoOP(Whatever else you want to do goes here)
>
> On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis  wrote:
>
>> Hello,
>>
>> I am searching a way to dial a SIP peer, and if it does not answer within
>> 20 seconds, play an announcement to the caller. This means that the caller
>> would hear a ring tone for 20 seconds, and only then hear the announcement
>> if the callee did not answer.
>>
>> I know it is possible to do this with ARI, but in this particular case I
>> do not want to use ARI. I would like to do this purely with dialplan and
>> AGI scripts, but I cannot find a way. I have read about the "m" option of
>> Dial application, but it starts the announcement immediately, whereas I
>> would like to start it after 20 seconds of timeout.
>>
>> Does anybody have an idea ?
>>
>> Best regards,
>>
>> Jean Aunis
>>
>>
>> --
>> _
>> -- 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
>>
>
>
>
> --
> A human being should be able to change a diaper, plan an invasion, butcher
> a hog, conn a ship, design a building, write a sonnet, balance accounts,
> build a wall, set a bone, comfort the dying, take orders, give orders,
> cooperate, act alone, solve equations, analyze a new problem, pitch manure,
> program a computer, cook a tasty meal, fight efficiently, die gallantly.
> Specialization is for insects.
> ---Heinlein
>
>
>
>
> --
> _
> -- 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
>



-- 
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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 and start music on hold after timeout

2016-08-23 Thread Jean Aunis
Thank you, I just tried your suggestion. Strangely, the announcement is 
played only if I try to dial a SIP peer which is not available (not 
registered to be more precise). If the SIP peer is available, I only get 
the ring tone, and never hear the announcement. Here is the dialplan (I 
had to add an Answer() before the Dial, otherwise the announcement is 
never played, even in the first case) :


exten = 007,1,Answer()
same  = n,Dial(SIP/foo/s@playme,40)

[playme]
exten = s,1,Ringing()
same  = n,Wait(10)
same  = n,Playback(/var/lib/asterisk/sounddir/announce,noanswer)

When it is working, I can see the following output in the CLI, which is 
not there otherwise :
-- SIP/x requested media update control 26, passing it to 
Local/s@playme-05be;1


Otherwise, no error message, Asterisk tells he is playing the 
announcement but I don't hear it.


Best regards

Jean Aunis

Le 23/08/2016 à 16:07, David Duffett a écrit :

How about:

exten => s,1,Dial(SIP/alice/555@delayed-announce,40)

[delayed-announce]
exten =>  555,1,Wait(20)
same => n,Playback(myannouncement,noanswer)
same => n,NoOP(Whatever else you want to do goes here)

The 'noanswer' option on the Playback means that SIP/alice should 
continue to ring for the remaining 20 of the 40 seconds, as the 
Playback will not answer (terminate) the call.


Don't forget AstriCon this year - www.astricon.net 



On 23 August 2016 at 12:52, Israel Gottlieb > wrote:


You could m and make a moh file that has ringing the first 30 sec
and then the anouncment


בתאריך 22 באוג׳ 2016 7:19 PM,‏ "Jean Aunis" > כתב:

Thank you for the idea. The problem with RetryDial, is that it
will cancel the first call, play the announce and then dial
the SIP peer once again, so the telephone will display a
missed call. I would prefer to do everything in a single call.


Le 22/08/2016 à 17:57, John Kiniston a écrit :

You could try using RetryDial() instead of Dial, It supports
playing an announcement.


On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis
> wrote:

Sorry, I forgot to write that the SIP peer must keep
ringing while the announcement is being played.


Le 22/08/2016 à 17:42, John Kiniston a écrit :

This seems like the obvious answer but maybe I'm
misunderstanding the question.

exten => s,1,Dial(SIP/alice,20)
 same => n,Playback(myannouncement)
 same =>   n,NoOP(Whatever else you want to do goes here)

On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis
>
wrote:

Hello,

I am searching a way to dial a SIP peer, and if it
does not answer within 20 seconds, play an
announcement to the caller. This means that the
caller would hear a ring tone for 20 seconds, and
only then hear the announcement if the callee did
not answer.

I know it is possible to do this with ARI, but in
this particular case I do not want to use ARI. I
would like to do this purely with dialplan and AGI
scripts, but I cannot find a way. I have read about
the "m" option of Dial application, but it starts
the announcement immediately, whereas I would like
to start it after 20 seconds of timeout.

Does anybody have an idea ?

Best regards,

Jean Aunis


-- 
_

-- 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





-- 
A human being should be able to change a diaper, plan an

invasion, butcher a hog, conn a ship, design a building,
write a sonnet, balance accounts, build a wall, set a
bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty
meal, fight efficiently, die gallantly. Specialization
is for insects.
---Heinlein





--


Re: [asterisk-users] Dial and start music on hold after timeout

2016-08-23 Thread David Duffett
How about:

exten => s,1,Dial(SIP/alice/555@delayed-announce,40)

[delayed-announce]
exten =>  555,1,Wait(20)
same => n,Playback(myannouncement,noanswer)
same => n,NoOP(Whatever else you want to do goes here)

The 'noanswer' option on the Playback means that SIP/alice should continue
to ring for the remaining 20 of the 40 seconds, as the Playback will not
answer (terminate) the call.

Don't forget AstriCon this year - www.astricon.net

On 23 August 2016 at 12:52, Israel Gottlieb  wrote:

> You could m and make a moh file that has ringing the first 30 sec and then
> the anouncment
>
> בתאריך 22 באוג׳ 2016 7:19 PM,‏ "Jean Aunis"  כתב:
>
> Thank you for the idea. The problem with RetryDial, is that it will cancel
>> the first call, play the announce and then dial the SIP peer once again, so
>> the telephone will display a missed call. I would prefer to do everything
>> in a single call.
>>
>> Le 22/08/2016 à 17:57, John Kiniston a écrit :
>>
>> You could try using RetryDial() instead of Dial, It supports playing an
>> announcement.
>>
>>
>> On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis 
>> wrote:
>>
>>> Sorry, I forgot to write that the SIP peer must keep ringing while the
>>> announcement is being played.
>>>
>>> Le 22/08/2016 à 17:42, John Kiniston a écrit :
>>>
>>> This seems like the obvious answer but maybe I'm misunderstanding the
>>> question.
>>>
>>> exten => s,1,Dial(SIP/alice,20)
>>>  same =>   n,Playback(myannouncement)
>>>  same =>   n,NoOP(Whatever else you want to do goes here)
>>>
>>> On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis 
>>> wrote:
>>>
 Hello,

 I am searching a way to dial a SIP peer, and if it does not answer
 within 20 seconds, play an announcement to the caller. This means that the
 caller would hear a ring tone for 20 seconds, and only then hear the
 announcement if the callee did not answer.

 I know it is possible to do this with ARI, but in this particular case
 I do not want to use ARI. I would like to do this purely with dialplan and
 AGI scripts, but I cannot find a way. I have read about the "m" option of
 Dial application, but it starts the announcement immediately, whereas I
 would like to start it after 20 seconds of timeout.

 Does anybody have an idea ?

 Best regards,

 Jean Aunis


 --
 _
 -- 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

>>>
>>>
>>>
>>> --
>>> A human being should be able to change a diaper, plan an invasion,
>>> butcher a hog, conn a ship, design a building, write a sonnet, balance
>>> accounts, build a wall, set a bone, comfort the dying, take orders, give
>>> orders, cooperate, act alone, solve equations, analyze a new problem, pitch
>>> manure, program a computer, cook a tasty meal, fight efficiently, die
>>> gallantly. Specialization is for insects.
>>> ---Heinlein
>>>
>>>
>>>
>>>
>>> --
>>> _
>>> -- 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
>>>
>>
>>
>>
>> --
>> A human being should be able to change a diaper, plan an invasion,
>> butcher a hog, conn a ship, design a building, write a sonnet, balance
>> accounts, build a wall, set a bone, comfort the dying, take orders, give
>> orders, cooperate, act alone, solve equations, analyze a new problem, pitch
>> manure, program a computer, cook a tasty meal, fight efficiently, die
>> gallantly. Specialization is for insects.
>> ---Heinlein
>>
>>
>>
>>
>> --
>> _
>> -- 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 --
>
> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>   http://www.asterisk.org/community/astricon-user-conference
>
> New to Asterisk? Start here:
>   

Re: [asterisk-users] Dial and start music on hold after timeout

2016-08-23 Thread Israel Gottlieb
You could m and make a moh file that has ringing the first 30 sec and then
the anouncment

בתאריך 22 באוג׳ 2016 7:19 PM,‏ "Jean Aunis"  כתב:

> Thank you for the idea. The problem with RetryDial, is that it will cancel
> the first call, play the announce and then dial the SIP peer once again, so
> the telephone will display a missed call. I would prefer to do everything
> in a single call.
>
> Le 22/08/2016 à 17:57, John Kiniston a écrit :
>
> You could try using RetryDial() instead of Dial, It supports playing an
> announcement.
>
>
> On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis  wrote:
>
>> Sorry, I forgot to write that the SIP peer must keep ringing while the
>> announcement is being played.
>>
>> Le 22/08/2016 à 17:42, John Kiniston a écrit :
>>
>> This seems like the obvious answer but maybe I'm misunderstanding the
>> question.
>>
>> exten => s,1,Dial(SIP/alice,20)
>>  same =>   n,Playback(myannouncement)
>>  same =>   n,NoOP(Whatever else you want to do goes here)
>>
>> On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis 
>> wrote:
>>
>>> Hello,
>>>
>>> I am searching a way to dial a SIP peer, and if it does not answer
>>> within 20 seconds, play an announcement to the caller. This means that the
>>> caller would hear a ring tone for 20 seconds, and only then hear the
>>> announcement if the callee did not answer.
>>>
>>> I know it is possible to do this with ARI, but in this particular case I
>>> do not want to use ARI. I would like to do this purely with dialplan and
>>> AGI scripts, but I cannot find a way. I have read about the "m" option of
>>> Dial application, but it starts the announcement immediately, whereas I
>>> would like to start it after 20 seconds of timeout.
>>>
>>> Does anybody have an idea ?
>>>
>>> Best regards,
>>>
>>> Jean Aunis
>>>
>>>
>>> --
>>> _
>>> -- 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
>>>
>>
>>
>>
>> --
>> A human being should be able to change a diaper, plan an invasion,
>> butcher a hog, conn a ship, design a building, write a sonnet, balance
>> accounts, build a wall, set a bone, comfort the dying, take orders, give
>> orders, cooperate, act alone, solve equations, analyze a new problem, pitch
>> manure, program a computer, cook a tasty meal, fight efficiently, die
>> gallantly. Specialization is for insects.
>> ---Heinlein
>>
>>
>>
>>
>> --
>> _
>> -- 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
>>
>
>
>
> --
> A human being should be able to change a diaper, plan an invasion, butcher
> a hog, conn a ship, design a building, write a sonnet, balance accounts,
> build a wall, set a bone, comfort the dying, take orders, give orders,
> cooperate, act alone, solve equations, analyze a new problem, pitch manure,
> program a computer, cook a tasty meal, fight efficiently, die gallantly.
> Specialization is for insects.
> ---Heinlein
>
>
>
>
> --
> _
> -- 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 --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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 and start music on hold after timeout

2016-08-22 Thread Jean Aunis
Thank you for the idea. The problem with RetryDial, is that it will 
cancel the first call, play the announce and then dial the SIP peer once 
again, so the telephone will display a missed call. I would prefer to do 
everything in a single call.



Le 22/08/2016 à 17:57, John Kiniston a écrit :
You could try using RetryDial() instead of Dial, It supports playing 
an announcement.



On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis > wrote:


Sorry, I forgot to write that the SIP peer must keep ringing while
the announcement is being played.


Le 22/08/2016 à 17:42, John Kiniston a écrit :

This seems like the obvious answer but maybe I'm misunderstanding
the question.

exten => s,1,Dial(SIP/alice,20)
 same =>   n,Playback(myannouncement)
 same =>   n,NoOP(Whatever else you want to do goes here)

On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis
> wrote:

Hello,

I am searching a way to dial a SIP peer, and if it does not
answer within 20 seconds, play an announcement to the caller.
This means that the caller would hear a ring tone for 20
seconds, and only then hear the announcement if the callee
did not answer.

I know it is possible to do this with ARI, but in this
particular case I do not want to use ARI. I would like to do
this purely with dialplan and AGI scripts, but I cannot find
a way. I have read about the "m" option of Dial application,
but it starts the announcement immediately, whereas I would
like to start it after 20 seconds of timeout.

Does anybody have an idea ?

Best regards,

Jean Aunis


-- 
_

-- 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





-- 
A human being should be able to change a diaper, plan an

invasion, butcher a hog, conn a ship, design a building, write a
sonnet, balance accounts, build a wall, set a bone, comfort the
dying, take orders, give orders, cooperate, act alone, solve
equations, analyze a new problem, pitch manure, program a
computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein





--
_
-- 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





--
A human being should be able to change a diaper, plan an invasion, 
butcher a hog, conn a ship, design a building, write a sonnet, balance 
accounts, build a wall, set a bone, comfort the dying, take orders, 
give orders, cooperate, act alone, solve equations, analyze a new 
problem, pitch manure, program a computer, cook a tasty meal, fight 
efficiently, die gallantly. Specialization is for insects.

---Heinlein




-- 
_
-- 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] Dial and start music on hold after timeout

2016-08-22 Thread John Kiniston
You could try using RetryDial() instead of Dial, It supports playing an
announcement.


On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis  wrote:

> Sorry, I forgot to write that the SIP peer must keep ringing while the
> announcement is being played.
>
> Le 22/08/2016 à 17:42, John Kiniston a écrit :
>
> This seems like the obvious answer but maybe I'm misunderstanding the
> question.
>
> exten => s,1,Dial(SIP/alice,20)
>  same =>   n,Playback(myannouncement)
>  same =>   n,NoOP(Whatever else you want to do goes here)
>
> On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis  wrote:
>
>> Hello,
>>
>> I am searching a way to dial a SIP peer, and if it does not answer within
>> 20 seconds, play an announcement to the caller. This means that the caller
>> would hear a ring tone for 20 seconds, and only then hear the announcement
>> if the callee did not answer.
>>
>> I know it is possible to do this with ARI, but in this particular case I
>> do not want to use ARI. I would like to do this purely with dialplan and
>> AGI scripts, but I cannot find a way. I have read about the "m" option of
>> Dial application, but it starts the announcement immediately, whereas I
>> would like to start it after 20 seconds of timeout.
>>
>> Does anybody have an idea ?
>>
>> Best regards,
>>
>> Jean Aunis
>>
>>
>> --
>> _
>> -- 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
>>
>
>
>
> --
> A human being should be able to change a diaper, plan an invasion, butcher
> a hog, conn a ship, design a building, write a sonnet, balance accounts,
> build a wall, set a bone, comfort the dying, take orders, give orders,
> cooperate, act alone, solve equations, analyze a new problem, pitch manure,
> program a computer, cook a tasty meal, fight efficiently, die gallantly.
> Specialization is for insects.
> ---Heinlein
>
>
>
>
> --
> _
> -- 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
>



-- 
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein
-- 
_
-- 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] Dial and start music on hold after timeout

2016-08-22 Thread Jean Aunis
Sorry, I forgot to write that the SIP peer must keep ringing while the 
announcement is being played.



Le 22/08/2016 à 17:42, John Kiniston a écrit :
This seems like the obvious answer but maybe I'm misunderstanding the 
question.


exten => s,1,Dial(SIP/alice,20)
 same =>   n,Playback(myannouncement)
 same =>   n,NoOP(Whatever else you want to do goes here)

On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis > wrote:


Hello,

I am searching a way to dial a SIP peer, and if it does not answer
within 20 seconds, play an announcement to the caller. This means
that the caller would hear a ring tone for 20 seconds, and only
then hear the announcement if the callee did not answer.

I know it is possible to do this with ARI, but in this particular
case I do not want to use ARI. I would like to do this purely with
dialplan and AGI scripts, but I cannot find a way. I have read
about the "m" option of Dial application, but it starts the
announcement immediately, whereas I would like to start it after
20 seconds of timeout.

Does anybody have an idea ?

Best regards,

Jean Aunis


-- 
_

-- 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





--
A human being should be able to change a diaper, plan an invasion, 
butcher a hog, conn a ship, design a building, write a sonnet, balance 
accounts, build a wall, set a bone, comfort the dying, take orders, 
give orders, cooperate, act alone, solve equations, analyze a new 
problem, pitch manure, program a computer, cook a tasty meal, fight 
efficiently, die gallantly. Specialization is for insects.

---Heinlein




-- 
_
-- 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] Dial and start music on hold after timeout

2016-08-22 Thread John Kiniston
This seems like the obvious answer but maybe I'm misunderstanding the
question.

exten => s,1,Dial(SIP/alice,20)
 same =>   n,Playback(myannouncement)
 same =>   n,NoOP(Whatever else you want to do goes here)

On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis  wrote:

> Hello,
>
> I am searching a way to dial a SIP peer, and if it does not answer within
> 20 seconds, play an announcement to the caller. This means that the caller
> would hear a ring tone for 20 seconds, and only then hear the announcement
> if the callee did not answer.
>
> I know it is possible to do this with ARI, but in this particular case I
> do not want to use ARI. I would like to do this purely with dialplan and
> AGI scripts, but I cannot find a way. I have read about the "m" option of
> Dial application, but it starts the announcement immediately, whereas I
> would like to start it after 20 seconds of timeout.
>
> Does anybody have an idea ?
>
> Best regards,
>
> Jean Aunis
>
>
> --
> _
> -- 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
>



-- 
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein
-- 
_
-- 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] Dial and start music on hold after timeout

2016-08-22 Thread Jean Aunis

Hello,

I am searching a way to dial a SIP peer, and if it does not answer 
within 20 seconds, play an announcement to the caller. This means that 
the caller would hear a ring tone for 20 seconds, and only then hear the 
announcement if the callee did not answer.


I know it is possible to do this with ARI, but in this particular case I 
do not want to use ARI. I would like to do this purely with dialplan and 
AGI scripts, but I cannot find a way. I have read about the "m" option 
of Dial application, but it starts the announcement immediately, whereas 
I would like to start it after 20 seconds of timeout.


Does anybody have an idea ?

Best regards,

Jean Aunis


--
_
-- 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] Dial command for SIP driver with To-header config

2016-04-27 Thread Nitesh Bansal
Thanks Matt, I adjusted my code to trim the URI scheme.

Regards,
Nitesh

On Tue, Apr 26, 2016 at 2:45 PM, Matthew Jordan  wrote:

>
> On Fri, Apr 22, 2016 at 11:04 AM, Nitesh Bansal 
> wrote:
>
>> Hello,
>>
>> I'm using the following Dial command syntax:
>> Dial*(SIP/peer/exten!sip:x...@xyz.com *), the SIP URI
>> after the '!' mark should be set as To-URI in outgoing INVITE
>> from Asterisk.
>> It works, but problem is that To-URI formatting is a bit messed up,
>> It looks as follows:
>> *sip:sip:x...@xyz.com *, it seems that Asterisk
>> added an extra '*sip:'* in the
>> To-header and it breaks.
>>
>> I'm using Asterisk 13.
>> I'm wondering if this behaviour is intended or a potential bug?
>>
>>
> I would think that it isn't a bug. If you look at the documentation of
> that dial string option for the chan_sip channel driver in sip.conf.sample,
> you can see that the URI scheme is left off:
>
>   54 ; All of these dial strings specify the SIP request URI.
>   55 ; In addition, you can specify a specific To: header by adding an
>   56 ; exclamation mark after the dial string, like
>   57 ;
>   58 ; SIP/sales@mysipproxy!sa...@edvina.net
>
> While it might be nice if it didn't always use a scheme of 'sip', that'd
> probably be categorized as an improvement to this option.
>
> --
> Matthew Jordan
> Digium, Inc. | Director of Technology
> 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] Dial command for SIP driver with To-header config

2016-04-26 Thread Matthew Jordan
On Fri, Apr 22, 2016 at 11:04 AM, Nitesh Bansal 
wrote:

> Hello,
>
> I'm using the following Dial command syntax:
> Dial*(SIP/peer/exten!sip:x...@xyz.com *), the SIP URI
> after the '!' mark should be set as To-URI in outgoing INVITE
> from Asterisk.
> It works, but problem is that To-URI formatting is a bit messed up,
> It looks as follows:
> *sip:sip:x...@xyz.com *, it seems that Asterisk
> added an extra '*sip:'* in the
> To-header and it breaks.
>
> I'm using Asterisk 13.
> I'm wondering if this behaviour is intended or a potential bug?
>
>
I would think that it isn't a bug. If you look at the documentation of that
dial string option for the chan_sip channel driver in sip.conf.sample, you
can see that the URI scheme is left off:

  54 ; All of these dial strings specify the SIP request URI.
  55 ; In addition, you can specify a specific To: header by adding an
  56 ; exclamation mark after the dial string, like
  57 ;
  58 ; SIP/sales@mysipproxy!sa...@edvina.net

While it might be nice if it didn't always use a scheme of 'sip', that'd
probably be categorized as an improvement to this option.

-- 
Matthew Jordan
Digium, Inc. | Director of Technology
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

[asterisk-users] Dial command for SIP driver with To-header config

2016-04-22 Thread Nitesh Bansal
Hello,

I'm using the following Dial command syntax:
Dial*(SIP/peer/exten!sip:x...@xyz.com *), the SIP URI
after the '!' mark should be set as To-URI in outgoing INVITE
from Asterisk.
It works, but problem is that To-URI formatting is a bit messed up,
It looks as follows:
*sip:sip:x...@xyz.com *, it seems that Asterisk
added an extra '*sip:'* in the
To-header and it breaks.

I'm using Asterisk 13.
I'm wondering if this behaviour is intended or a potential bug?

Thanks,
Nitesh
-- 
_
-- 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] Dial()-Function

2016-03-20 Thread Dominique Haeber

Hi all! :)

I search a function or option for application Dail().


My situations:

I have two or more Dial()s with multiple devices (Handgroups).

Level1: Dial(SIP/device1,20)
Level2: Dial(SIP/device1/device2,20)
Level3: Dial(SIP/device1/device2/device3,20)

When in level one, no one accept the call until the timeout, they have a missed 
call on device.
When in level two, no one accept the call until the timeout, they have a missed 
call on device again.
If SIP/device3 accept the call, SIP/device1 has two missed calls and 
SIP/device2 has one missed call.

If on the same level anyone accept the call, the other in the same level get 
"Call complered elsewhere". (That's okay)

If i use option "c" for Dial() in any case asterisk send "Call completed 
elsewhere". 
Also if the Caller hangup during ringing/cancel the call.


What i need:

On timeout: "Call completed elsewhere"  (this is with option "c")
If any other in the same level accept the call: "Call completed elsewhere" 
(Thats normal) 

And special, if the caller cancel the call during ringing: "Missed Call" (This 
is without option "c")
But i need this behavior with option c, cause on timeout i need a "Call 
completed elsewhere".

How can I achieve this?

Sincerely,
Dominique

-- 
_
-- 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] Dial()-Function

2016-03-19 Thread jg



Hi all! :)

I search a function or option for application Dail().


My situations:

I have two or more Dial()s with multiple devices (Handgroups).

Level1: Dial(SIP/device1,20)
Level2: Dial(SIP/device1/device2,20)
Level3: Dial(SIP/device1/device2/device3,20)

When in level one, no one accept the call until the timeout, they have a missed 
call on device.
When in level two, no one accept the call until the timeout, they have a missed 
call on device again.
If SIP/device3 accept the call, SIP/device1 has two missed calls and 
SIP/device2 has one missed call.

If on the same level anyone accept the call, the other in the same level get "Call 
complered elsewhere". (That's okay)

If i use option "c" for Dial() in any case asterisk send "Call completed 
elsewhere".
Also if the Caller hangup during ringing/cancel the call.


What i need:

On timeout: "Call completed elsewhere"  (this is with option "c")
If any other in the same level accept the call: "Call completed elsewhere" 
(Thats normal)

And special, if the caller cancel the call during ringing: "Missed Call" (This is without 
option "c")
But i need this behavior with option c, cause on timeout i need a "Call completed 
elsewhere".

How can I achieve this?

Sincerely,
Dominique

Wouldn't it be easier to use a local channel and do something like is done in the "Delay Dialing 
Devices Example"?


https://wiki.asterisk.org/wiki/display/AST/Delay+Dialing+Devices+Example

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

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


Re: [asterisk-users] Dial()-Function

2016-03-18 Thread jg


No, i think unfortunately it is not easier. :/ I have a string from database (Macro/appdata) 
in the format: function|timeout|function|timeout|function|timeout| Up to seven value 
pairs. "function" can be "Queue" (Identified by: "qu"-string), "Voicemail" (Identified by: 
"vm"-string), "Anouncement" (Identified by: "an"-string), "Enddiveces" (Identified by: 
"SIP/"-string)) or an "external Number". Every function with an timeout to the next. I loop 
all. I have no idea how I can pass the function and the timeout to the extension by the most 
beautiful way. Without a variables war. One possibility would be to package the parameters in 
the extension, but that would be very ugly. Yes, today we would solve the most different. :)
I can't see what you are trying to do and how your "appdata" relate to your previous mails. I am 
also wondering why you want to "pass" functions and timeouts. Wouldn't it be enough to dispatch 
everything, set some channelvars, assemble a dial string, and then let the local channels take 
care of the rest?


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

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


Re: [asterisk-users] Dial()-Function

2016-03-18 Thread Dominique Haeber
hi jg,

jg  schrieb am Don, 17. Mär 14:05:
> Wouldn't it be easier to use a local channel and do something like
> is done in the "Delay Dialing Devices Example"?
> 
> https://wiki.asterisk.org/wiki/display/AST/Delay+Dialing+Devices+Example

No, i think unfortunately it is not easier. :/

I have a string from database (Macro/appdata) in the format:

function|timeout|function|timeout|function|timeout|

Up to seven value pairs.

"function" can be "Queue" (Identified by: "qu"-string), "Voicemail" (Identified 
by: "vm"-string),
"Anouncement" (Identified by: "an"-string), "Enddiveces" (Identified by: 
"SIP/"-string)) 
or an "external Number".

Every function with an timeout to the next. I loop all.

I have no idea how I can pass the function and the timeout to the
extension by the most beautiful way. Without a variables war.
One possibility would be to package the parameters in the extension,
but that would be very ugly.


Yes, today we would solve the most different. :)




> jg


Sincerely,
Dominique

-- 
_
-- 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] Dial your phone and contact phone from within outlook?

2016-03-03 Thread Ryan, Travis

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Olivier
Sent: Thursday, March 03, 2016 10:50 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Dial your phone and contact phone from within 
outlook?

Is TAPI still available on Windows 10, for instance ?

2016-03-02 23:22 GMT+01:00 Neeraj Chand 
<nrjc...@gmail.com<mailto:nrjc...@gmail.com>>:
Hi Travis,

Have a look at this:

http://www.ipcom.at/en/telephony/siptapi/

I have used this in the past to do something similar, unless you have an 
Exchange Enterprise setup in which case I would suggest exploring unified 
messaging

Thanks,

Neeraj

On Thu, Mar 3, 2016 at 8:22 AM, Ryan, Travis 
<ry...@oscarwinski.com<mailto:ry...@oscarwinski.com>> wrote:
I am wondering what the best solution is for initiating a call from Outlook 
Contacts. I imagine something that would start the call from the outlook card 
(or similar) and then dial the user’s extension and the contact’s phone number 
and place them in a bridge.

Anyone use something like this?

Travis Ryan
Director of Information Technologies
Oscar Winski Company
2407 North Ninth Street
Lafayette, IN 47905
ry...@oscarwinski.com<mailto:ry...@oscarwinski.com>
(765) 742-1102

FFYI, this worked great for me on Windows 7. Not sure if it works with any 
after as I’ve not tested.
-- 
_
-- 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] Dial your phone and contact phone from within outlook?

2016-03-03 Thread Olivier
Is TAPI still available on Windows 10, for instance ?

2016-03-02 23:22 GMT+01:00 Neeraj Chand :

> Hi Travis,
>
> Have a look at this:
>
> http://www.ipcom.at/en/telephony/siptapi/
>
> I have used this in the past to do something similar, unless you have an
> Exchange Enterprise setup in which case I would suggest exploring unified
> messaging
>
> Thanks,
>
> Neeraj
>
> On Thu, Mar 3, 2016 at 8:22 AM, Ryan, Travis 
> wrote:
>
>> I am wondering what the best solution is for initiating a call from
>> Outlook Contacts. I imagine something that would start the call from the
>> outlook card (or similar) and then dial the user’s extension and the
>> contact’s phone number and place them in a bridge.
>>
>>
>>
>> Anyone use something like this?
>>
>>
>>
>> Travis Ryan
>> Director of Information Technologies
>> Oscar Winski Company
>> 2407 North Ninth Street
>> Lafayette, IN 47905
>> ry...@oscarwinski.com
>> (765) 742-1102
>>
>>
>> *We're not the IT departmentWe're the I-TEAM department!*
>>
>>
>>
>> --
>> _
>> -- 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
>
-- 
_
-- 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] Dial your phone and contact phone from within outlook?

2016-03-03 Thread Tech Support
Hey;

I’ve used Camrivox in the past and it is an excellent product, the best 
I’ve seen. However, it is commercial software, so you’ll have to determine if 
it's within your budget or not. You can check it out at http://www.camrivox.com.

Regards;

John V.

 

Tech Support

Tech Support

VoIP Business Solutions

240-215-3479 x325

supp...@voipbusiness.us <mailto:f...@voipbusiness.us> 

 

 

 

 

 

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Neeraj Chand
Sent: Wednesday, March 02, 2016 5:22 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Dial your phone and contact phone from within 
outlook?

 

Hi Travis, 

 

Have a look at this: 

 

http://www.ipcom.at/en/telephony/siptapi/

 

I have used this in the past to do something similar, unless you have an 
Exchange Enterprise setup in which case I would suggest exploring unified 
messaging 

 

Thanks, 

 

Neeraj

 

On Thu, Mar 3, 2016 at 8:22 AM, Ryan, Travis <ry...@oscarwinski.com> wrote:

I am wondering what the best solution is for initiating a call from Outlook 
Contacts. I imagine something that would start the call from the outlook card 
(or similar) and then dial the user’s extension and the contact’s phone number 
and place them in a bridge. 

 

Anyone use something like this?

 

Travis Ryan
Director of Information Technologies
Oscar Winski Company
2407 North Ninth Street
Lafayette, IN 47905
 <mailto:ry...@oscarwinski.com> ry...@oscarwinski.com
(765) 742-1102


We're not the IT departmentWe're the I-TEAM department!

 


--
_
-- 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] Dial your phone and contact phone from within outlook?

2016-03-03 Thread A J Stiles
On Wednesday 02 Mar 2016, Ryan, Travis wrote:
> I am wondering what the best solution is for initiating a call from Outlook
> Contacts. I imagine something that would start the call from the outlook
> card (or similar) and then dial the user's extension and the contact's
> phone number and place them in a bridge.
> 
> Anyone use something like this?

I'm not familiar with Outlook; but I imagine it must have the ability to run 
external helper programs, substituting placeholders in the command line with 
fields from the contact's database record, to perform actions such as dialling 
numbers.

Here, we use Kontact  (part of KDE)  which definitely has such an ability.  So 
I configured it to use wget to fire off a request to a CGI script which 
generates 
a call file; then you just click to dial a contact's number, your phone begins 
to ring, you answer it and the remote contact's phone begins to ring.

The backend script is fairly simple.  We can determine the extension number 
nearest to the user from their IP address  (the DHCP server is configured 
always to offer the same IP address to the same hardware address, so 
workstations effectively have static IP addresses),  which will be passed to 
the script by the Apache server.

If you can fire off a wget request when clicking on a number, you should be 
good 
to go.  (You can request a non-existent script at first; the request will show 
up in /var/log/apache2/error.log .)  If you need help with the script, ask 
again  :)

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

-- 
_
-- 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] Dial your phone and contact phone from within outlook?

2016-03-02 Thread Neeraj Chand
Hi Travis,

Have a look at this:

http://www.ipcom.at/en/telephony/siptapi/

I have used this in the past to do something similar, unless you have an
Exchange Enterprise setup in which case I would suggest exploring unified
messaging

Thanks,

Neeraj

On Thu, Mar 3, 2016 at 8:22 AM, Ryan, Travis  wrote:

> I am wondering what the best solution is for initiating a call from
> Outlook Contacts. I imagine something that would start the call from the
> outlook card (or similar) and then dial the user’s extension and the
> contact’s phone number and place them in a bridge.
>
>
>
> Anyone use something like this?
>
>
>
> Travis Ryan
> Director of Information Technologies
> Oscar Winski Company
> 2407 North Ninth Street
> Lafayette, IN 47905
> ry...@oscarwinski.com
> (765) 742-1102
>
>
> *We're not the IT departmentWe're the I-TEAM department!*
>
>
>
> --
> _
> -- 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] Dial your phone and contact phone from within outlook?

2016-03-02 Thread Ryan, Travis
I am wondering what the best solution is for initiating a call from Outlook 
Contacts. I imagine something that would start the call from the outlook card 
(or similar) and then dial the user's extension and the contact's phone number 
and place them in a bridge.

Anyone use something like this?

Travis Ryan
Director of Information Technologies
Oscar Winski Company
2407 North Ninth Street
Lafayette, IN 47905
ry...@oscarwinski.com
(765) 742-1102

We're not the IT departmentWe're the I-TEAM department!

-- 
_
-- 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] Dial command: channel type detection

2016-02-03 Thread jg



Some of my users connect to my asterisk box using SIP, other using iax
(in users.conf, I set "hasiax=yes" for those users).

How do I detect which protocol some user is using ? I cannot find any
variable which contains that information.

Reason is: I need this information for the Dial() command to work with
all my users, as the protocol is needed when using this command.

Why can't you evaluate the CHANNEL variable with something like 
Set(TECHNOLOGY=${CUT(CHANNEL,/,1)})? One could also initially use a special context for IAX 
channels and set a variable. It depends on what you want to do.


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

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


[asterisk-users] Dial command: channel type detection

2016-02-02 Thread Julien Sansonnens
Hi,

Some of my users connect to my asterisk box using SIP, other using iax
(in users.conf, I set "hasiax=yes" for those users).

How do I detect which protocol some user is using ? I cannot find any
variable which contains that information.

Reason is: I need this information for the Dial() command to work with
all my users, as the protocol is needed when using this command.

Thanks a lot, regards,
Julien Sansonnens

-- 
_
-- 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] Dial L options and attended tranfer

2015-07-14 Thread sysad...@reed-media.com

Hello guys,

there is something i'm not sure and would like to ask please :

let's say i have B calling and talking to A.(  A  --   B  )
Then B would like to attended transfer A to C.
In the behind extensions.conf when B is calling C (first part of the 
attended transfer) the Dial application is called

with the L(x,y,z) options.   (  B  - C )

Then B hangup and C is talking to A.  ( A  --- C )

my questions are :
1) Is the limit of the call and time to play warning are calculated when 
the Dial begins (1st part of the attended transfer) (  B - C ) ?
2) if yes is there a way to make the calculation begin when the transfer 
is completed ( A  --- C ) ?



thanks a lot,

regards,


Alan



--
_
-- 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] dial out with channel variable; sub-string usage

2015-04-13 Thread John Kiniston
BABY appears to be a global variable in your example.

In your CLI output testcarrier is a peer, It's not a variable at all.

The context field for your peer testcarrier is where incoming calls from
testcarrirer will be routed to.

Here is some example dialplan showing how you can use one context
'trunk1-out' to dial out through your trunk

[trunk1-out]
exten = _[0-9a-zA-Z].,1,Verbose(Dialing out TRUNK1)
same = n,Set(CHANNEL(amaflags)=BILLING)
same = n,Dial(PJSIP/${EXTEN}@trunk1,60,o)
same = n,Log(ERROR,Dial to ${EXTEN} ended - DIALSTATUS is ${DIALSTATUS} -
HANGUPCAUSE is ${HANGUPCAUSE})
same = n,Playtones(busy)
same = n,Busy(8)
same = n,Hangup()

[pstn-local]
exten = _976,1,Macro(fastbusy)
exten = _nxx,1,Goto(trunk1-out,${EXTEN},1)

[toll-free]
exten = _1855NXX,1,Goto(trunk1-out,${EXTEN},1)
exten = _1866NXX,1,Goto(trunk1-out,${EXTEN},1)
exten = _1877NXX,1,Goto(trunk1-out,${EXTEN},1)
exten = _1888NXX,1,Goto(trunk1-out,${EXTEN},1)
exten = _1800NXX,1,Goto(trunk1-out,${EXTEN},1)

[long-distance]
exten =
_1NXXNXX,1,Authenticate(/etc/asterisk//ldcodes.txt,a,KINISTON-001-)
same  =   n,Goto(trunk1-out,${EXTEN},1)

Then your internal phone context would include the above contexts:

[internal-phones]
include = pstn-local
include = toll-free
include = long-distance

Does that help make it clearer Thufir?


On Sun, Apr 12, 2015 at 5:31 PM, thufir hawat.thu...@gmail.com wrote:


 vici:~ # asterisk -rx sip show peers
 Name/username Host Dyn Forcerport ACL Port Status
 300/300   (Unspecified) D   N 0UNKNOWN
 301/301   192.168.0.24 D   N 5060 OK (29
 ms)
 302/302   (Unspecified) D   N 0UNKNOWN
 gs102/gs102   (Unspecified) D   N 0UNKNOWN
 testcarrier/19876543210 198.38.7.34  N
  5065 OK (82 ms)
 5 sip peers [Monitored: 2 online, 3 offline Unmonitored: 0 online, 0
 offline]
 vici:~ #
 vici:~ # asterisk -rx sip show peer testcarrier

   * Name   : testcarrier
   Secret   : Set
   MD5Secret: Not set
   Remote Secret: Not set
   Context  : default

 Which just brings me back to...the context for BABY...is...?  BABY is a
 channel variable.  In the above CLI output, the channel variable is
 testcarrier, which has a context of default.

 Each channel variable maps to at most one context?  Many channel variables
 can map to a single context?




A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein
-- 
_
-- 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] dial out with channel variable; sub-string usage

2015-04-12 Thread thufir

On 15-04-09 12:06 PM, Chad Wallace wrote:

but don't know where to put those lines.  I have BABY defined as
channel variable:

BABY = SIP/babytel_out

but that seems circular, somehow.

You put them in the context for your clients... From what you show
below, I'd say they go in the local_200 context.  You can verify
this by looking in sip.conf, in the section that starts with [200],
find the line that starts with context=.  It's probably
context=local_200.  Then you put the outbound dialplan in that context
in extensions.conf.  Mind you, then 200 is the only phone that can dial
out.  201 can only dial 200 and nothing else.



Wait a minute, slow down.  I re-installed, same sort of problem:

vici:~ #
vici:~ # asterisk -rx sip show peers
Name/username Host Dyn Forcerport ACL Port Status
300/300   (Unspecified) D   N 0UNKNOWN
301/301   192.168.0.24 D   N 5060 OK (29 
ms)

302/302   (Unspecified) D   N 0UNKNOWN
gs102/gs102   (Unspecified) D   N 0UNKNOWN
testcarrier/19876543210 198.38.7.34  
N 5065 OK (82 ms)
5 sip peers [Monitored: 2 online, 3 offline Unmonitored: 0 online, 0 
offline]

vici:~ #
vici:~ # asterisk -rx sip show peer testcarrier


  * Name   : testcarrier
  Secret   : Set
  MD5Secret: Not set
  Remote Secret: Not set
  Context  : default


I simply want all outbound calls to go through a specific context, I 
think, if I understand how the channel passes control to the correct 
context.  I want, or need, an outbound context?


I know that the text has an example of ServerA routing through serverB.  
Simply add a line, like:



exten = _9x.,1,Dial(SIP/${EXTEN:1}@babytel_out)

or


exten = _9x.,1,Dial(${BABY}/${EXTEN:1})

Which just brings me back to...the context for BABY...is...?  BABY is a 
channel variable.  In the above CLI output, the channel variable is 
testcarrier, which has a context of default.


Each channel variable maps to at most one context?  Many channel 
variables can map to a single context?




thanks,

Thufir


--
_
-- 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] dial out with channel variable; sub-string usage

2015-04-09 Thread Chad Wallace
On Wed, 08 Apr 2015 16:10:30 -0700
thufir hawat.thu...@gmail.com wrote:

 I want to do something like:
 
 
 exten = _NXXXNxx,1,Dial(${BABY}/${EXTEN})
 exten = _Nxx,1,Dial(${BABY}/${EXTEN})
 exten = _1NXXNxx,1,Dial(${BABY}/${EXTEN})
 exten = _011.,1,Dial(Dial({TOLL}/${EXTEN})
 exten = _9NXXXNxx,1,Dial(${BABY}/${EXTEN})
 exten = _9Nxx,1,Dial(${BABY}/${EXTEN})
 exten = _91NXXNxx,1,Dial(${BABY}/${EXTEN})
 exten = _9011.,1,Dial(Dial({TOLL}/${EXTEN})
 
 (adapted from the book)
 
 
 but don't know where to put those lines.  I have BABY defined as
 channel variable:
 
 BABY = SIP/babytel_out
 
 but that seems circular, somehow.

You put them in the context for your clients... From what you show
below, I'd say they go in the local_200 context.  You can verify
this by looking in sip.conf, in the section that starts with [200],
find the line that starts with context=.  It's probably
context=local_200.  Then you put the outbound dialplan in that context
in extensions.conf.  Mind you, then 200 is the only phone that can dial
out.  201 can only dial 200 and nothing else.

One suggestion...  those 8 lines are redundant.  The first 4 let you
dial out without the 9 in front, and the last 4 need you to dial 9 to
get out.  You should probably decide which way you want to do it, and
use only 4 of the lines instead of 8.  Keep it simple.  Also, if you
don't use 7-digit dialing in your area, you can drop the second line
(_Nxx) and only have 3.  

Mind you, even if your local area supports 7-digit dialing, I'm
guessing babytel doesn't, so it wouldn't even work like that.  You
would have to add your area code (or 1 and your area code) after the
slash between ${BABY} and ${EXTEN}, just on that one line.



 inbound calls work fine:
 
 [inbound-calls]
   exten = 16046289850,1,Dial(SIP/200)
 
 [local_200]
 exten = _9x.,1,Set(CALLERID(all)=Ali Baba 123456789)
 exten = _9x.,1,Dial(SIP/${EXTEN:1}@babytel_out)
 exten = 201,1,Dial(SIP/201)
 
 [local_201]
 exten = 200,1,Dial(SIP/200)
 
 
 in local_200, that just seems suspect.  Yes, dial out, but shouldn't
 it be using BABY?  I don't understand why it's using sub-string with
 the 1.

That's a different syntax for the same thing.  These three lines all do
the same thing:

exten = _9x.,1,Dial(SIP/${EXTEN:1}@babytel_out)

and

exten = _9x.,1,Dial(SIP/babytel_out/${EXTEN:1})

and

exten = _9x.,1,Dial(${BABY}/${EXTEN:1})

The ${EXTEN:1} strips off the 9 at the front of EXTEN, because babytel
doesn't want to get the 9 that you dial on the phone.  If you go with
dialing without the 9, you'll use ${EXTEN}, not ${EXTEN:1}.


-- 

C. Chad Wallace, B.Sc.
The Lodging Company
http://www.lodgingcompany.com/
OpenPGP Public Key ID: 0x262208A0


-- 
_
-- 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] dial out with channel variable; sub-string usage

2015-04-08 Thread thufir

I want to do something like:


exten = _NXXXNxx,1,Dial(${BABY}/${EXTEN})
exten = _Nxx,1,Dial(${BABY}/${EXTEN})
exten = _1NXXNxx,1,Dial(${BABY}/${EXTEN})
exten = _011.,1,Dial(Dial({TOLL}/${EXTEN})
exten = _9NXXXNxx,1,Dial(${BABY}/${EXTEN})
exten = _9Nxx,1,Dial(${BABY}/${EXTEN})
exten = _91NXXNxx,1,Dial(${BABY}/${EXTEN})
exten = _9011.,1,Dial(Dial({TOLL}/${EXTEN})

(adapted from the book)


but don't know where to put those lines.  I have BABY defined as channel 
variable:


BABY = SIP/babytel_out

but that seems circular, somehow.


inbound calls work fine:

[inbound-calls]
 exten = 16046289850,1,Dial(SIP/200)

[local_200]
exten = _9x.,1,Set(CALLERID(all)=Ali Baba 123456789)
exten = _9x.,1,Dial(SIP/${EXTEN:1}@babytel_out)
exten = 201,1,Dial(SIP/201)

[local_201]
exten = 200,1,Dial(SIP/200)


in local_200, that just seems suspect.  Yes, dial out, but shouldn't it 
be using BABY?  I don't understand why it's using sub-string with the 1.




thanks,

Thufir

--
_
-- 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] Dial to PJSIP Channel with Typo PJSIP// Causes Asterisk Shutdown

2015-03-26 Thread Trey Hilyard
I found an issue with how PJSIP handles a typo in the Dial application. If
the Channel is mistakenly typed with two slashes (i.e Dial(PJSIP//...),
the Dial applications fails (obviously), but it also kills the server.

I put some code in my pbx_config to check for that string and not let the
dialplan reload, but it seems like there should be a better way to handle
in in the PJSIP stack or Dial app so that it doesn't take the server down
if it gets through.

I am not a developer, but I was hoping maybe someone who monitors this
mailing list might feel like taking this on as a bug fix.I haven't tried
with any other channel drivers, so it may cross to others.
-- 
_
-- 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] Dial to PJSIP Channel with Typo PJSIP// Causes Asterisk Shutdown

2015-03-26 Thread Matthew Jordan
On Thu, Mar 26, 2015 at 9:28 AM, Trey Hilyard kct...@gmail.com wrote:
 I found an issue with how PJSIP handles a typo in the Dial application. If
 the Channel is mistakenly typed with two slashes (i.e Dial(PJSIP//...),
 the Dial applications fails (obviously), but it also kills the server.

 I put some code in my pbx_config to check for that string and not let the
 dialplan reload, but it seems like there should be a better way to handle in
 in the PJSIP stack or Dial app so that it doesn't take the server down if it
 gets through.

 I am not a developer, but I was hoping maybe someone who monitors this
 mailing list might feel like taking this on as a bug fix.I haven't tried
 with any other channel drivers, so it may cross to others.


Please open an issue on the issue tracker:

https://issues.asterisk.org/jira

A backtrace from the crash will be needed as well. Instructions on
generating a backtrace can be found on the wiki here:

https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

-- 
Matthew Jordan
Digium, Inc. | Director of Technology
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


[asterisk-users] Dial Plan Issue

2015-02-10 Thread Haley,Scott A
I am trying to transition an application over from a FreePbx box to a Standard 
build Asterisk 11.6 box. I have a job that creates a call file and plays a 
sound file. If it detects a voicemail, then it plays it, waits 1 second and 
replays it.

The FreePbx box works fine but the Standard Asterisk build is dropping the call 
during the first Voicemail  playback and it does not leave the voicemail. Here 
is the printout of the log file for both boxes.

Free PBX:
[2015-02-10 12:12:34] VERBOSE[10502] pbx.c: -- Executing 
[XX@subMachine:4] Playback(SIP/trunk503out-9728, temp/0250002) 
in new stack
[2015-02-10 12:13:29] VERBOSE[10502] pbx.c: -- Executing [XX 
@subMachine:5] Wait(SIP/trunk503out-9728, 1) in new stack
[2015-02-10 12:13:30] VERBOSE[10502] pbx.c: -- Executing [XX 
@subMachine:6] Playback(SIP/trunk503out-9728, temp/0250002) in new stack

Standard Asterisk Build:
[2015-02-10 15:01:12] VERBOSE[32567][C-000f] pbx.c: -- Executing 
[xx @subMachine:1] SendDTMF(SIP/SMtrunk1-000f, w1w) in new 
stack
[2015-02-10 15:01:16] VERBOSE[32567][C-000f] pbx.c: -- Executing 
[xx @subMachine:2] Set(SIP/SMtrunk1-000f, IVR_MSG=temp/0250002) 
in new stack
[2015-02-10 15:01:16] VERBOSE[32567][C-000f] pbx.c: -- Executing 
[xx@subMachine:3] System(SIP/SMtrunk1-000f, /bin/echo -e 
xx,RUN2,i9,02102015145822,MACHINE,SIP/SMtrunk1-000f,02.10.2015 
15.01log/outbound.txt) in new stack
[2015-02-10 15:01:16] VERBOSE[32567][C-000f] pbx.c: -- Executing 
[xx @subMachine:4] Playback(SIP/SMtrunk1-000f, temp/0250002) in 
new stack
[2015-02-10 15:01:16] VERBOSE[32567][C-000f] file.c: -- 
SIP/SMtrunk1-000f Playing 'temp/0250002.slin' (language 'en')
[2015-02-10 15:01:50] VERBOSE[32567][C-000f] pbx.c:   == Spawn extension 
(subMachine, xx, 4) exited non-zero on 'SIP/SMtrunk1-000f'

I copied the context from the FreePbx box over to the new box so the code 
should be the same. Any help would be appreciated.

Thanks,
Scott



If you are not the intended recipient of this message (including attachments), 
or if you have received this message in error, immediately notify us and delete 
it and any attachments.

If you do not wish to receive any email messages from us, excluding 
administrative communications, please email this request to 
messa...@edwardjones.com along with the email address you wish to unsubscribe.

For important additional information related to this email, visit 
www.edwardjones.com/US_email_disclosurehttp://www.edwardjones.com/US_email_disclosure.
 Edward D. Jones  Co., L.P. d/b/a Edward Jones, 12555 Manchester Road, St. 
Louis, MO 63131 © Edward Jones. All rights reserved.

-- 
_
-- 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] Dial Plan Issue

2015-02-10 Thread Haley,Scott A
One follow-up. At the end of the call, after it dis-connects I get the 
following error:

[2015-02-10 15:33:42] NOTICE[4524]: pbx_spool.c:402 attempt_thread: Call 
completed to SIP/SMtrunk1/xx

Thanks,
Scott Haley
5-2244

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Haley,Scott A
Sent: Tuesday, February 10, 2015 3:15 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Dial Plan Issue

I am trying to transition an application over from a FreePbx box to a Standard 
build Asterisk 11.6 box. I have a job that creates a call file and plays a 
sound file. If it detects a voicemail, then it plays it, waits 1 second and 
replays it.

The FreePbx box works fine but the Standard Asterisk build is dropping the call 
during the first Voicemail  playback and it does not leave the voicemail. Here 
is the printout of the log file for both boxes.

Free PBX:
[2015-02-10 12:12:34] VERBOSE[10502] pbx.c: -- Executing 
[XX@subMachine:4] Playback(SIP/trunk503out-9728, temp/0250002) 
in new stack
[2015-02-10 12:13:29] VERBOSE[10502] pbx.c: -- Executing [XX 
@subMachine:5] Wait(SIP/trunk503out-9728, 1) in new stack
[2015-02-10 12:13:30] VERBOSE[10502] pbx.c: -- Executing [XX 
@subMachine:6] Playback(SIP/trunk503out-9728, temp/0250002) in new stack

Standard Asterisk Build:
[2015-02-10 15:01:12] VERBOSE[32567][C-000f] pbx.c: -- Executing 
[xx @subMachine:1] SendDTMF(SIP/SMtrunk1-000f, w1w) in new 
stack
[2015-02-10 15:01:16] VERBOSE[32567][C-000f] pbx.c: -- Executing 
[xx @subMachine:2] Set(SIP/SMtrunk1-000f, IVR_MSG=temp/0250002) 
in new stack
[2015-02-10 15:01:16] VERBOSE[32567][C-000f] pbx.c: -- Executing 
[xx@subMachine:3] System(SIP/SMtrunk1-000f, /bin/echo -e 
xx,RUN2,i9,02102015145822,MACHINE,SIP/SMtrunk1-000f,02.10.2015 
15.01log/outbound.txt) in new stack
[2015-02-10 15:01:16] VERBOSE[32567][C-000f] pbx.c: -- Executing 
[xx @subMachine:4] Playback(SIP/SMtrunk1-000f, temp/0250002) in 
new stack
[2015-02-10 15:01:16] VERBOSE[32567][C-000f] file.c: -- 
SIP/SMtrunk1-000f Playing 'temp/0250002.slin' (language 'en')
[2015-02-10 15:01:50] VERBOSE[32567][C-000f] pbx.c:   == Spawn extension 
(subMachine, xx, 4) exited non-zero on 'SIP/SMtrunk1-000f'

I copied the context from the FreePbx box over to the new box so the code 
should be the same. Any help would be appreciated.

Thanks,
Scott



If you are not the intended recipient of this message (including attachments), 
or if you have received this message in error, immediately notify us and delete 
it and any attachments.

If you do not wish to receive any email messages from us, excluding 
administrative communications, please email this request to 
messa...@edwardjones.commailto:messa...@edwardjones.com along with the email 
address you wish to unsubscribe.

For important additional information related to this email, visit 
www.edwardjones.com/US_email_disclosurehttp://www.edwardjones.com/US_email_disclosure.
 Edward D. Jones  Co., L.P. d/b/a Edward Jones, 12555 Manchester Road, St. 
Louis, MO 63131 © Edward Jones. All rights reserved.

-- 
_
-- 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] Dial international number over dahdi trunk

2014-07-18 Thread Daniel Gonzalez
Hi all,

I am trying to perform the following outgoing call:

exten = _49.,1,Log(NOTICE,Dialing German number: ${EXTEN})
 same = n,Set(route=DAHDI/g1/00${EXTEN})
 same = n,Dial(${route})
exten = _0049.,1,Goto(${EXTEN:2},1)
exten = _01149.,1,Goto(${EXTEN:3},1)
exten = _+49.,1,Goto(${EXTEN:1},1)

But this is not working. I have also tried changing the route to:

 same = n,Set(route=DAHDI/g1/${EXTEN})

With similar results:

server1*CLI
...
-- Goto (ctx-carriers,4917,1)
-- Executing [4917@ctx-carriers:1]
Log(SIP/sipserver3-006c, NOTICE,Dialing German number:
4917) in new stack
[Jul 18 07:18:53] NOTICE[19497]: Ext. 4917:1 @ ctx-carriers:
Dialing German number: 4917
-- Executing [4917@ctx-carriers:2]
Set(SIP/sipserver3-006c, route=DAHDI/g1/004917) in new stack
-- Executing [4917@ctx-carriers:3]
Dial(SIP/sipserver3-006c, DAHDI/g1/004917) in new stack
-- Called DAHDI/g1/004917
-- Hungup 'DAHDI/63-1'
  == Everyone is busy/congested at this time (1:0/0/1)

(the number dialed is not really 4917, but a real, working mobile
german number)

How can I dial international numbers via DAHDI? (in case it matters, my SS7
trunk provider is Telefonica España)

Thanks!
Daniel Gonzalez
-- 
_
-- 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] Dial application b subroutine arguments not passing?

2013-08-06 Thread Richard Mudgett
On Fri, Aug 2, 2013 at 3:05 PM, Mitch Claborn mitch...@claborn.net wrote:

 On 08/02/2013 01:28 PM, Matthew Jordan wrote:


 On Fri, Aug 2, 2013 at 12:57 PM, Mitch Claborn mitch...@claborn.net
 mailto:mitch...@claborn.net wrote:

 Asterisk 11.1.0

 I'm trying to use the b subroutine of the Dial application so that
 I can do some stuff with our internal applications that need to have
 access to the called channel information.  I can see that the
 subroutine is being executed, but the arguments I pass don't see to
 make it to the subroutine.

 [callmenow]
 exten = s,1,NoOp(callmenow: Queue without answer)
same =n,Queue(sales,tc)

 [dial-to-customer]
 exten = s,1,NoOp(to-customer)
same =n,Wait(1)
same =n,Playback(custom/callmenow-**announce)
same =n,GoSub(sub-outbound_caller_**id,start,1)
same
 =n,Dial(${TOLL}/${MMCUSTOMER_**NUMBER},,*b(dial-to-customer-**
 sub,s,1,${MMCUSTOMER_NUMBER},$**{MEMBERINTERFACE},${**MEMBERNAME})*)




 Use a '^' to delineate arguments pass to subroutines. This is actually
 true for the U option as well. See:

 https://wiki.asterisk.org/**wiki/display/AST/Pre-Dial+**Handlershttps://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers

 And:

 https://wiki.asterisk.org/**wiki/display/AST/Asterisk+11+**
 Application_Dialhttps://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Dial

 --
 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-**usershttp://lists.digium.com/mailman/listinfo/asterisk-users


 That is not working for me either.

 same 
 =n,Dial(${TOLL}/${MMCUSTOMER_**NUMBER},,b(dial-to-customer-**sub^s^1^fred^$george^$arrrgh))



You are missing a set of parentheses in your invocation:
same
=n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,b(dial-to-customer-sub^s^1(fred^$george^$arrrgh)))


See:
https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers

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

[asterisk-users] Dial application b subroutine arguments not passing?

2013-08-02 Thread Mitch Claborn

Asterisk 11.1.0

I'm trying to use the b subroutine of the Dial application so that I 
can do some stuff with our internal applications that need to have 
access to the called channel information.  I can see that the subroutine 
is being executed, but the arguments I pass don't see to make it to the 
subroutine.


[callmenow]
exten = s,1,NoOp(callmenow: Queue without answer)
  same =n,Queue(sales,tc)

[dial-to-customer]
exten = s,1,NoOp(to-customer)
  same =n,Wait(1)
  same =n,Playback(custom/callmenow-announce)
  same =n,GoSub(sub-outbound_caller_id,start,1)
  same 
=n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,*b(dial-to-customer-sub,s,1,${MMCUSTOMER_NUMBER},${MEMBERINTERFACE},${MEMBERNAME})*) 



[dial-to-customer-sub]
; this runs on the customer's channel
exten =s,1,NoOp()
  same =n,Set(OPERATORID=${ODBC_OPERATORID_FROM_ADDRESS(${ARG2})})
  same =n,Verbose(2, dial-to-customer-sub interface ${ARG2} name 
${ARG3} customer number ${ARG1} operatoriod ${OPERATORID} channel name 
${CHANNEL(name)} unique ID ${CHANNEL(uniqueid)} )

  same =n,Return()

The whole thing is kicked off by an AMI request:
Action: Originate
Channel: Local/s@callmenow
Context: dial-to-customer
Exten: s
Priority: 1
Async: true
Callerid: Call Me Now 777
Variable: MMCUSTOMER_NUMBER=9995551212
Timeout: 99

Output from the subroutine:
-- Executing [s@dial-to-customer-sub:3] Verbose(SIP/voipms-001e, 
2, dial-to-customer-sub interface name  customer number  operatoriod  
channel name SIP/voipms-001e unique ID mlcx500-1375465508.61 ) in 
new stack


The U subroutine seems to work OK
same 
=n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,U(dial-to-customer-sub,${MMCUSTOMER_NUMBER},${MEMBERINTERFACE},${MEMBERNAME})) 



I want the b subroutine, because it is call before attempting to 
connect the remote end.  This gives me plenty of time to notify my 
application and have it look up the customer's record while the call is 
being placed.  The U subroutine is called after the call is connected.


Am I missing something, or is it broke?

(This whole thing is development for a call me now feature from the 
web site.)


--

Mitch

--
_
-- 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] Dial application b subroutine arguments not passing?

2013-08-02 Thread Matthew Jordan
On Fri, Aug 2, 2013 at 12:57 PM, Mitch Claborn mitch...@claborn.net wrote:

  Asterisk 11.1.0

 I'm trying to use the b subroutine of the Dial application so that I can
 do some stuff with our internal applications that need to have access to
 the called channel information.  I can see that the subroutine is being
 executed, but the arguments I pass don't see to make it to the subroutine.

 [callmenow]
 exten = s,1,NoOp(callmenow: Queue without answer)
   same =n,Queue(sales,tc)

 [dial-to-customer]
 exten = s,1,NoOp(to-customer)
   same =n,Wait(1)
   same =n,Playback(custom/callmenow-announce)
   same =n,GoSub(sub-outbound_caller_id,start,1)
   same =n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,*
 b(dial-to-customer-sub,s,1,${MMCUSTOMER_NUMBER},${MEMBERINTERFACE},${MEMBERNAME})
 *)


Use a '^' to delineate arguments pass to subroutines. This is actually true
for the U option as well. See:

https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers

And:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Dial

-- 
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

Re: [asterisk-users] Dial application b subroutine arguments not passing?

2013-08-02 Thread Mitch Claborn

On 08/02/2013 01:28 PM, Matthew Jordan wrote:


On Fri, Aug 2, 2013 at 12:57 PM, Mitch Claborn mitch...@claborn.net
mailto:mitch...@claborn.net wrote:

Asterisk 11.1.0

I'm trying to use the b subroutine of the Dial application so that
I can do some stuff with our internal applications that need to have
access to the called channel information.  I can see that the
subroutine is being executed, but the arguments I pass don't see to
make it to the subroutine.

[callmenow]
exten = s,1,NoOp(callmenow: Queue without answer)
   same =n,Queue(sales,tc)

[dial-to-customer]
exten = s,1,NoOp(to-customer)
   same =n,Wait(1)
   same =n,Playback(custom/callmenow-announce)
   same =n,GoSub(sub-outbound_caller_id,start,1)
   same

=n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,*b(dial-to-customer-sub,s,1,${MMCUSTOMER_NUMBER},${MEMBERINTERFACE},${MEMBERNAME})*)



Use a '^' to delineate arguments pass to subroutines. This is actually
true for the U option as well. See:

https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers

And:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Dial

--
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



That is not working for me either.

same 
=n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,b(dial-to-customer-sub^s^1^fred^$george^$arrrgh)) 



output is

-- Executing [s@dial-to-customer:8] Dial(SIP/mlcm800-0039, 
SIP/voipms/9725232703,,b(dial-to-customer-sub^s^1^fred^$george^$arrrgh)) 
in new stack

-- SIP/voipms-003a Internal Gosub(dial-to-customer-sub,s,1) start
-- Executing [s@dial-to-customer-sub:2] Verbose(SIP/voipms-003a, 
2, number  interface  name  ) in new stack



PS - a link from the Dial page to the Pre-Dial Hanlders page would be 
useful.


--
_
-- 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] Dial plan flow control

2013-07-26 Thread James B. Byrne
Arch = x86_64
OS = CentOS-6.4 (freepbx)
Asterisk = 11.4
FreePBX = 2.11.0.4

I am trying to understand flow control in Asterisk dial plans and not
having very much luck.  I have read the Asterisk book from O'Rielly,
or at least those parts I believe might apply, but that has not helped
me much on this particular issue.

What I wish is to set three distinct ring tones on our Snom phones for
external, internal and transferred calls.  The first is accomplished
simply enough by setting the ALERT_INFO setting on the inbound route
for all phones. Done.

The second was much more complicated but I found a recipe which
demonstrated how to do that using extensions_override_freepbx.conf and
eventually got it working.   Done.

However, in my ignorance I believed that I could use the same
technique, indeed the same code, to check whether the call was
internal or a transfer.  In this belief I appear sadly mistaken.

So, I am left with trying to understand the nature of flow control in
Asterisk dial plans and specifically those distributed with FreePBX.

In FreePBX I see this in extensions.conf:

;-
; from-internal:
;
; Internal dialplan that most internal phones have access to
;
[from-internal]
include = from-internal-noxfer
include = from-internal-xfer
include = bad-number ; auto-generated
;-

;-
; from-internal-noxfer:
;
; Place to put internal dialplan that should not be accessible during
; a blind transfer, this context will not be visible during such.
;
[from-internal-noxfer]
include = from-internal-noxfer-custom
include = from-internal-noxfer-additional ; auto-generated
;-

;-
; from-internal-xfer:
;
; Place to put most internal dialplan, will be visible during
: normal calls and blind transfers.
;
[from-internal-xfer]
include = from-internal-custom
include = from-internal-additional ; auto-generated
exten = s,1,Macro(hangupcall)
exten = h,1,Macro(hangupcall)
;-


What I would like to do is to add checks for whether or not a call is
internal or transferred between extensions in the
[from-internal-custom] context, which is presumably best placed in the
file named /etc/asterisk/extensions_custom.conf.  To begin testing I
did this

[from-internal-custom]
include = set-snom-ringtone-variables

[set-snom-ringtone-variables]
exten = _X.,1,Noop(CALLERID_ALL=${CALLERID(all)})
exten = _X.,n,Set(CallerIDNum=${CALLERID(num)})

Which simply does not work at all.  The effect is that the extensions
stop working.   So, clearly I misunderstand something very basic about
flow control and thus my question.  How do I return from my
from-internal-custom context back to the from-internal-xfer context at
the point following the include = from-internal-custom statement?

Thank you.

-- 
***  E-Mail is NOT a SECURE channel  ***
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte  Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3


--
_
-- 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] Dial problem with Asterisk 1.8.4.4

2013-07-17 Thread Kevin Larsen
One of my sites asked for a way to identify if the person they are calling 
on another extension is already on another call. To that end, I wrote a 
bit of code in the dialplan for my extensions that checks to see if the 
extension they are dialing has a device status that is anything other than 
NOT_INUSE. If the device is NOT_INUSE, then it dials the call normally. If 
it has a different status, then it dials using the option m(ringing) where 
ringing is a musiconhold class that plays a standard ring with a beep at 
the end so that they have an audible clue that the other person is on a 
call. This works well in most cases, but we have found one case that seems 
to cause an issue. If they try to blind transfer a call to an extension 
that is on another call, then the person being transferred does not get 
the ringing musiconhold played to them. 

The basic call flow is that a call comes in from an outside trunk and is 
answered by person A. They then hit the transfer button on their phone 
(Polycom IP 450) and dial person B. During this time, the caller hears the 
standard musiconhold. Person A hears the audio they should hear based on 
the m(ringing) option for the Dial application. Person A then hits 
transfer again to finish a blind transfer. At this point, the musiconhold 
that the caller hears cuts out and is not replaced by the m(ringing) 
audio. Any thoughts on if it is possible to make this work?

Kevin Larsen - Systems Analyst - Pioneer Balloon - Ph: 316-688-8208--
_
-- 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] Dial-App / Feature Disconnect

2013-06-04 Thread Thorsten Göllner

Hi,

I configured in features.conf, that the Dial-App may be cancelled by 
pressing the pound key. That works fine. The caller can cancel the 
bridged call. BUT can I configure it that way, that the dialing itself 
can NOT be cancelled? My dial should only be cancelled by the timeout 
or by the gangup of the caller.


Asterisk 11.3.0

Best regards,
-Thorsten-

--
_
-- 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] dial and bridge

2013-05-16 Thread Lenz Emilitri
Thanks all for your help, in the end I was able to do something like:

Action: Originate
Channel: Local/300@from-internal/n
Application: MusicOnHold
Async: 1


As soon as this connects, the callee hears MOH. I get the channel out via
AMI events and start another call:

Action: Originate
Channel: Local/301@from-internal/n
Application: Bridge
Data: Local/300@from-internal-aa8c;1
Async: 1

when this connects, it is immediately bridged to the first callee. I just
have to keep track of errors and hang up the first call if the seconds does
not go through.

Thanks a lot!
l.




2013/5/15 Dan Cropp d...@amtelco.com

 You could use AsyncAGI to achieve this.

 ** **

 Originate the first call (passing in some unique identifier as a
 variable), then using AMI you will see the channel data.  When you see an
 Event: AysncAGI for that channel (with that id, you have control of the
 call).  Send a Dial Action telling it to dial the call and bridge them
 together if the person answers.  If they don’t answer, you will be notified
 and can do something with the original call (play a message, hangup, etc).
 If they are bridged, you can see how long, etc.

 ** **

 Setup an extension, naming it something like patching

 ** **

 exten = patching,1,AGI(agi:async)

 ** **

 Action: Originate
 Channel: Local/300@from-internal

 Async: 1
 Exten: 1

 Context: patching
 Data: 1973

 Variable: YourUniquePatchID=1234

 ** **

 ** **

 Using AsyncAGI and AMI, you can have full control of the call.  You do
 have to setup a very simple dial plan so Asterisk knows you are using
 AsyncAGI to control the call.

 ** **

 Have a great day!

 Dan

 ** **

 ** **

 ** **

 *From:* asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *Lenz Emilitri
 *Sent:* Tuesday, May 14, 2013 11:16 AM
 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* [asterisk-users] dial and bridge

 ** **


 

 Hi all,

 I need some advice - I have been working on originating multiple calls
 using AMI and then joining them. 

 What I want to do is:

 - dial call 1 (where the caller is in a channel format, like SIp/1234 or
 Local/1234@ext) and park it somehow

 - dial call 2 (where again the caller is in channel format) and join it to
 the previous call.

 ** **

 As a requirement, I cannot use the dialplan as an end-point (as I cannot
 change it) but need to use the AMI only.

 ** **

 I tried doing something like:

 ** **

 Action: Originate
 Channel: Local/300@from-internal

 Async: 1
 Application: Wait
 Data: 1973

 ** **

 So that the call goes to 300 and then basically stays there forever, and
 then I dial again:

 ** **

 Action: Originate
 Channel: Local/500@from-internal

 Async: 1
 Application: Wait
 Data: 1973

   

 And then try to bridge the results, but it does not seem to work.

 What I would like to do would be more on the lines of:

 ** **

 Originate call 1 and park it (using a park or waiting)

 Originate call 2 and bridge it immediately to call1 (using the Application
 part)

 ** **

 But maybe I am missing something? is there anybody who has better
 suggestions?

 ** **

 Thanks

 l.

 ** **

 ** **

 ** **

 ** **

 ** **

 ** **

 -- 

 Loway - home of QueueMetrics - http://queuemetrics.com

 Test-drive WombatDialer beta @ http://wombatdialer.com 

 --
 _
 -- 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




-- 
Loway - home of QueueMetrics - http://queuemetrics.com
Test-drive WombatDialer beta @ http://wombatdialer.com
--
_
-- 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] dial and bridge

2013-05-15 Thread Lenz Emilitri
Hi Mitul,
I agree that the dialplan way is easier, but it's a client requirement to
avoid using it. I was wondering if there was a way to send a call directly
to a parking slot right from the originate, because that is cheaper than
running conferences, and then joining the second call right to the parked
call, so that all we have to do is two originates.
l.


2013/5/14 Mitul Limbani mi...@enterux.in

 Dial first call and put it into a conference, then dial second call and
 put him into same conference to bridge both.

 However dial plan way is much more simpler.

 Mitul


 On Tuesday, May 14, 2013, Lenz Emilitri wrote:


 Hi all,
 I need some advice - I have been working on originating multiple calls
 using AMI and then joining them.
 What I want to do is:
 - dial call 1 (where the caller is in a channel format, like SIp/1234
 or Local/1234@ext) and park it somehow
 - dial call 2 (where again the caller is in channel format) and join it
 to the previous call.

 As a requirement, I cannot use the dialplan as an end-point (as I cannot
 change it) but need to use the AMI only.

 I tried doing something like:

 Action: Originate
 Channel: Local/300@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 So that the call goes to 300 and then basically stays there forever, and
 then I dial again:

 Action: Originate
 Channel: Local/500@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 And then try to bridge the results, but it does not seem to work.
 What I would like to do would be more on the lines of:

 Originate call 1 and park it (using a park or waiting)
 Originate call 2 and bridge it immediately to call1 (using the
 Application part)

 But maybe I am missing something? is there anybody who has better
 suggestions?

 Thanks
 l.






 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com



 --
 Regards,
 Mitul Limbani,
 Chief Architech  Founder,
 Enterux Solutions Pvt. Ltd.
 110 Reena Complex, Opp. Nathani Steel,
 Vidyavihar (W), Mumbai - 400 086. India
 http://www.enterux.com/
 http://www.entvoice.com/
 email: mi...@enterux.in
 DID: +91-22-71967121
 Cell: +91-9820332422



 --
 _
 -- 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




-- 
Loway - home of QueueMetrics - http://queuemetrics.com
Test-drive WombatDialer beta @ http://wombatdialer.com
--
_
-- 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] dial and bridge

2013-05-15 Thread Lenz Emilitri
Hi Warren,
the problem is that all I have is two channels, so the specs might be join
SIP/123 and SIP/345 not join SIP/123 to 456@from-internal. They might be
Local channels, but this should be able handle the general case. The reason
why I have channels and not ext@ctxt is that I read them live from the AMI
itself. any idea on how to do this?
Thanks
l.



2013/5/14 Warren Selby wcse...@selbytech.com

 On Tue, May 14, 2013 at 11:16 AM, Lenz Emilitri lenz.lo...@gmail.comwrote:


 Hi all,
 I need some advice - I have been working on originating multiple calls
 using AMI and then joining them.
 What I want to do is:
 - dial call 1 (where the caller is in a channel format, like SIp/1234
 or Local/1234@ext) and park it somehow
 - dial call 2 (where again the caller is in channel format) and join it
 to the previous call.



 Why not just originate from one extension to the other?  Something like
 this (not tested):

 Action: Originate
 Channel: Local/300@from-internal
 Context: from-internal
 Exten: 500
 Timeout: 30

 Should dial extension 500 in the from-internal context after the call to
 300@from-internal is answered.  Meaning, the person at 300@from-internalwould 
 have their phone ring, they'd pick it up, and then they'd hear
 ringing on the line as asterisk then dialed extension 500@from-internal.



 --
 Thanks,
 --Warren Selby, dCAP
 http://www.SelbyTech.com http://www.selbytech.com

 --
 _
 -- 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




-- 
Loway - home of QueueMetrics - http://queuemetrics.com
Test-drive WombatDialer beta @ http://wombatdialer.com
--
_
-- 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] dial and bridge

2013-05-15 Thread Mitul Limbani
The dial n bridge might work, but there ain't indefinite wait in that
scenario.
Direct calls to parking you might try Local(70X@from-internal) but I m not
sure if this method works reliably.

The method I mentioned is used by vicidial and it works flawlessly, yes it
comes with some computing load, however you can try the newer ConfBridge
app to see if its cheaper.

Mitul

On Wednesday, May 15, 2013, Lenz Emilitri wrote:

 Hi Mitul,
 I agree that the dialplan way is easier, but it's a client requirement to
 avoid using it. I was wondering if there was a way to send a call directly
 to a parking slot right from the originate, because that is cheaper than
 running conferences, and then joining the second call right to the parked
 call, so that all we have to do is two originates.
 l.


 2013/5/14 Mitul Limbani mi...@enterux.in javascript:_e({}, 'cvml',
 'mi...@enterux.in');

 Dial first call and put it into a conference, then dial second call and
 put him into same conference to bridge both.

 However dial plan way is much more simpler.

 Mitul


 On Tuesday, May 14, 2013, Lenz Emilitri wrote:


 Hi all,
 I need some advice - I have been working on originating multiple calls
 using AMI and then joining them.
 What I want to do is:
 - dial call 1 (where the caller is in a channel format, like SIp/1234
 or Local/1234@ext) and park it somehow
 - dial call 2 (where again the caller is in channel format) and join it
 to the previous call.

 As a requirement, I cannot use the dialplan as an end-point (as I cannot
 change it) but need to use the AMI only.

 I tried doing something like:

 Action: Originate
 Channel: Local/300@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 So that the call goes to 300 and then basically stays there forever, and
 then I dial again:

 Action: Originate
 Channel: Local/500@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 And then try to bridge the results, but it does not seem to work.
 What I would like to do would be more on the lines of:

 Originate call 1 and park it (using a park or waiting)
 Originate call 2 and bridge it immediately to call1 (using the
 Application part)

 But maybe I am missing something? is there anybody who has better
 suggestions?

 Thanks
 l.






 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com



 --
 Regards,
 Mitul Limbani,
 Chief Architech  Founder,
 Enterux Solutions Pvt. Ltd.
 110 Reena Complex, Opp. Nathani Steel,
 Vidyavihar (W), Mumbai - 400 086. India
 http://www.enterux.com/
 http://www.entvoice.com/
 email: mi...@enterux.in javascript:_e({}, 'cvml', 'mi...@enterux.in');
 DID: +91-22-71967121
 Cell: +91-9820332422



 --
 _
 -- 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




 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com



-- 
Regards,
Mitul Limbani,
Chief Architech  Founder,
Enterux Solutions Pvt. Ltd.
110 Reena Complex, Opp. Nathani Steel,
Vidyavihar (W), Mumbai - 400 086. India
http://www.enterux.com/
http://www.entvoice.com/
email: mi...@enterux.in
DID: +91-22-71967121
Cell: +91-9820332422
--
_
-- 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] dial and bridge

2013-05-15 Thread Lenz Emilitri
I never actually used parking, but should it work if I call the Park
application as the second leg of the Originate (w/o going through the
dialplan)? I dont seem to be able to make it work.
l.


2013/5/15 Mitul Limbani mi...@enterux.in

 The dial n bridge might work, but there ain't indefinite wait in that
 scenario.
 Direct calls to parking you might try Local(70X@from-internal) but I m
 not sure if this method works reliably.

 The method I mentioned is used by vicidial and it works flawlessly, yes it
 comes with some computing load, however you can try the newer ConfBridge
 app to see if its cheaper.

 Mitul

 On Wednesday, May 15, 2013, Lenz Emilitri wrote:

 Hi Mitul,
 I agree that the dialplan way is easier, but it's a client requirement to
 avoid using it. I was wondering if there was a way to send a call directly
 to a parking slot right from the originate, because that is cheaper than
 running conferences, and then joining the second call right to the parked
 call, so that all we have to do is two originates.
 l.


 2013/5/14 Mitul Limbani mi...@enterux.in

 Dial first call and put it into a conference, then dial second call and
 put him into same conference to bridge both.

 However dial plan way is much more simpler.

 Mitul


 On Tuesday, May 14, 2013, Lenz Emilitri wrote:


 Hi all,
 I need some advice - I have been working on originating multiple calls
 using AMI and then joining them.
 What I want to do is:
 - dial call 1 (where the caller is in a channel format, like SIp/1234
 or Local/1234@ext) and park it somehow
 - dial call 2 (where again the caller is in channel format) and join it
 to the previous call.

 As a requirement, I cannot use the dialplan as an end-point (as I
 cannot change it) but need to use the AMI only.

 I tried doing something like:

 Action: Originate
 Channel: Local/300@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 So that the call goes to 300 and then basically stays there forever,
 and then I dial again:

 Action: Originate
 Channel: Local/500@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 And then try to bridge the results, but it does not seem to work.
 What I would like to do would be more on the lines of:

 Originate call 1 and park it (using a park or waiting)
 Originate call 2 and bridge it immediately to call1 (using the
 Application part)

 But maybe I am missing something? is there anybody who has better
 suggestions?

 Thanks
 l.






 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com



 --
 Regards,
 Mitul Limbani,
 Chief Architech  Founder,
 Enterux Solutions Pvt. Ltd.
 110 Reena Complex, Opp. Nathani Steel,
 Vidyavihar (W), Mumbai - 400 086. India
 http://www.enterux.com/
 http://www.entvoice.com/
 email: mi...@enterux.in
 DID: +91-22-71967121
 Cell: +91-9820332422



 --
 _
 -- 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




 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com



 --
 Regards,
 Mitul Limbani,
 Chief Architech  Founder,
 Enterux Solutions Pvt. Ltd.
 110 Reena Complex, Opp. Nathani Steel,
 Vidyavihar (W), Mumbai - 400 086. India
 http://www.enterux.com/
 http://www.entvoice.com/
 email: mi...@enterux.in
 DID: +91-22-71967121
 Cell: +91-9820332422



 --
 _
 -- 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




-- 
Loway - home of QueueMetrics - http://queuemetrics.com
Test-drive WombatDialer beta @ http://wombatdialer.com
--
_
-- 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] dial and bridge

2013-05-15 Thread Ioan Indreias
I think you could use twice the Park action to park the channels -
https://wiki.asterisk.org/wiki/display/AST/ManagerAction_Park

In the end you will have to bridge the parked channels.

HTH,
Ioan


On Wed, May 15, 2013 at 1:03 PM, Lenz Emilitri lenz.lo...@gmail.com wrote:

 I never actually used parking, but should it work if I call the Park
 application as the second leg of the Originate (w/o going through the
 dialplan)? I dont seem to be able to make it work.
 l.


 2013/5/15 Mitul Limbani mi...@enterux.in

 The dial n bridge might work, but there ain't indefinite wait in that
 scenario.
 Direct calls to parking you might try Local(70X@from-internal) but I m
 not sure if this method works reliably.

 The method I mentioned is used by vicidial and it works flawlessly, yes
 it comes with some computing load, however you can try the newer ConfBridge
 app to see if its cheaper.

 Mitul

 On Wednesday, May 15, 2013, Lenz Emilitri wrote:

 Hi Mitul,
 I agree that the dialplan way is easier, but it's a client requirement
 to avoid using it. I was wondering if there was a way to send a call
 directly to a parking slot right from the originate, because that is
 cheaper than running conferences, and then joining the second call right to
 the parked call, so that all we have to do is two originates.
 l.


 2013/5/14 Mitul Limbani mi...@enterux.in

 Dial first call and put it into a conference, then dial second call and
 put him into same conference to bridge both.

 However dial plan way is much more simpler.

 Mitul


 On Tuesday, May 14, 2013, Lenz Emilitri wrote:


 Hi all,
 I need some advice - I have been working on originating multiple calls
 using AMI and then joining them.
 What I want to do is:
 - dial call 1 (where the caller is in a channel format, like
 SIp/1234 or Local/1234@ext) and park it somehow
 - dial call 2 (where again the caller is in channel format) and join
 it to the previous call.

 As a requirement, I cannot use the dialplan as an end-point (as I
 cannot change it) but need to use the AMI only.

 I tried doing something like:

 Action: Originate
 Channel: Local/300@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 So that the call goes to 300 and then basically stays there forever,
 and then I dial again:

 Action: Originate
 Channel: Local/500@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 And then try to bridge the results, but it does not seem to work.
 What I would like to do would be more on the lines of:

 Originate call 1 and park it (using a park or waiting)
 Originate call 2 and bridge it immediately to call1 (using the
 Application part)

 But maybe I am missing something? is there anybody who has better
 suggestions?

 Thanks
 l.






 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com



 --
 Regards,
 Mitul Limbani,
 Chief Architech  Founder,
 Enterux Solutions Pvt. Ltd.
 110 Reena Complex, Opp. Nathani Steel,
 Vidyavihar (W), Mumbai - 400 086. India
 http://www.enterux.com/
 http://www.entvoice.com/
 email: mi...@enterux.in
 DID: +91-22-71967121
 Cell: +91-9820332422



 --
 _
 -- 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




 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com



 --
 Regards,
 Mitul Limbani,
 Chief Architech  Founder,
 Enterux Solutions Pvt. Ltd.
 110 Reena Complex, Opp. Nathani Steel,
 Vidyavihar (W), Mumbai - 400 086. India
 http://www.enterux.com/
 http://www.entvoice.com/
 email: mi...@enterux.in
 DID: +91-22-71967121
 Cell: +91-9820332422



 --
 _
 -- 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




 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com

 --
 _
 -- 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 

Re: [asterisk-users] dial and bridge

2013-05-15 Thread Ioan Indreias
BTW - what was exactly the problem when trying to bridge the two channels
that you have sent to the wait application?


On Wed, May 15, 2013 at 4:29 PM, Ioan Indreias indre...@gmail.com wrote:

 I think you could use twice the Park action to park the channels -
 https://wiki.asterisk.org/wiki/display/AST/ManagerAction_Park

 In the end you will have to bridge the parked channels.

 HTH,
 Ioan


 On Wed, May 15, 2013 at 1:03 PM, Lenz Emilitri lenz.lo...@gmail.comwrote:

 I never actually used parking, but should it work if I call the Park
 application as the second leg of the Originate (w/o going through the
 dialplan)? I dont seem to be able to make it work.
  l.


 2013/5/15 Mitul Limbani mi...@enterux.in

 The dial n bridge might work, but there ain't indefinite wait in that
 scenario.
 Direct calls to parking you might try Local(70X@from-internal) but I m
 not sure if this method works reliably.

  The method I mentioned is used by vicidial and it works flawlessly, yes
 it comes with some computing load, however you can try the newer ConfBridge
 app to see if its cheaper.

 Mitul

 On Wednesday, May 15, 2013, Lenz Emilitri wrote:

 Hi Mitul,
 I agree that the dialplan way is easier, but it's a client requirement
 to avoid using it. I was wondering if there was a way to send a call
 directly to a parking slot right from the originate, because that is
 cheaper than running conferences, and then joining the second call right to
 the parked call, so that all we have to do is two originates.
 l.


 2013/5/14 Mitul Limbani mi...@enterux.in

 Dial first call and put it into a conference, then dial second call
 and put him into same conference to bridge both.

 However dial plan way is much more simpler.

 Mitul


 On Tuesday, May 14, 2013, Lenz Emilitri wrote:


 Hi all,
 I need some advice - I have been working on originating multiple
 calls using AMI and then joining them.
 What I want to do is:
 - dial call 1 (where the caller is in a channel format, like
 SIp/1234 or Local/1234@ext) and park it somehow
 - dial call 2 (where again the caller is in channel format) and join
 it to the previous call.

 As a requirement, I cannot use the dialplan as an end-point (as I
 cannot change it) but need to use the AMI only.

 I tried doing something like:

 Action: Originate
 Channel: Local/300@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 So that the call goes to 300 and then basically stays there forever,
 and then I dial again:

 Action: Originate
 Channel: Local/500@from-internal
 Async: 1
 Application: Wait
 Data: 1973

 And then try to bridge the results, but it does not seem to work.
 What I would like to do would be more on the lines of:

 Originate call 1 and park it (using a park or waiting)
 Originate call 2 and bridge it immediately to call1 (using the
 Application part)

 But maybe I am missing something? is there anybody who has better
 suggestions?

 Thanks
 l.






 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com



 --
 Regards,
 Mitul Limbani,
 Chief Architech  Founder,
 Enterux Solutions Pvt. Ltd.
 110 Reena Complex, Opp. Nathani Steel,
 Vidyavihar (W), Mumbai - 400 086. India
 http://www.enterux.com/
 http://www.entvoice.com/
 email: mi...@enterux.in
 DID: +91-22-71967121
 Cell: +91-9820332422



 --
 _
 -- 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




 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com



 --
 Regards,
 Mitul Limbani,
 Chief Architech  Founder,
 Enterux Solutions Pvt. Ltd.
 110 Reena Complex, Opp. Nathani Steel,
 Vidyavihar (W), Mumbai - 400 086. India
 http://www.enterux.com/
 http://www.entvoice.com/
 email: mi...@enterux.in
 DID: +91-22-71967121
 Cell: +91-9820332422



 --
 _
 -- 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




 --
 Loway - home of QueueMetrics - http://queuemetrics.com
 Test-drive WombatDialer beta @ http://wombatdialer.com

 --
 _
 -- 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:
 

  1   2   3   4   5   6   7   8   9   10   >