Stefan,
This should be easy to do but I would start by first trying to get it to
work within your dialplan then work on the bit that triggers the call from
a file or external command.
For the case that a line declines the call... make sure that the device
does not have a call forward programmed into it. Some devices will
automatically initiate a transfer to another extension if it is on DND or
declines the call and this is outside of Asterisk's control. You would
want to disable that device feature.
I have the scenario you describe working in my dialplan with this code
snippet...
same =
n,Set(myringdevices=${IF(${DB_EXISTS(actionlist/ringdevices)}?${DB_RESULT}:SIP/101)})
same = n,Dial(${myringdevices},${myringtime},r(ring)ig)
same = n,NoOp(${DIALSTATUS})
same = n,GotoIf($["${DIALSTATUS}"="ANSWER"]?hangup)
same = n(noanswer),Goto(voicemenu-leavemessage,s,1)
I get the list of extensions to call from the asterisk db, e.g.
"SIP/101&SIP/102&SIP/201&SIP/202&SIP/203" but default to SIP/101 if the db
entry does not exist.
myringtime is set to something like 30 seconds.
Dial command options...
r(ring) indicate ringing to calling party.
i ignore forward requests received as a result of dialing (this may help
with decline)
g proceed to next diaplan step if destination hangs up.
Try something like this and use the asterisk console with debug and
verbosity so you can see what is happening.
David.
On Wed, Jun 22, 2016 at 10:26 AM, Stefan Ulm <s....@divus.biz> wrote:
> Hi all,
>
>
>
> I’m trying to realize a possibility to start a call from asterisk itself
> to several clients automatically through call files.
>
> All works perfectly when I call only one client; I define as “Channel” the
> client I want to call, the client rings, he ends up in the defined context
> and extension, all perfect.
>
> But my target is to be able to call a group of clients in parallel:
>
> * a daemon copies the call file into spool folder
>
> * the call is started from asterisk
>
> * all clients are ringing
>
> * when on one client the call is answered the others stop ringing
>
> * The answered clients ends up in the defined context and extension.
>
>
>
> I tried the following approaches:
>
> * Using a local extension for parameter “Channel” in call file and the
> command “Dial/SIP101&SIP102..) to call the clients in parallel. The result
> was that the clients are ringing, but when I decline the call on one client
> asterisk re-triggers the call and makes the client ring again; only
> declining a second time stops the ringing on the client. On the other hand,
> when I accept the call on one client, asterisk first hangs up on the other
> clients, but then a call to the second client is triggered again, the
> second client is ringing and when I take the call on the second client both
> clients are connect among each other. This not what Im targeting for.
>
> * Using single call files to connect the single clients to the same
> context and extension: The clients ring and it works all fine, but when I
> take the call on one of the clients the others of course keep on ringing,
> since the processed call files are all single files and so single calls. If
> there is some possibility to hangup the clients which have not answered
> inside the used extension when one of the clients answered, then it will be
> my solution. But it is difficult, since the extension is only jumped in,
> when the call is answered.
>
>
>
> Does anyone know how to achieve a solution:
>
> * start a call from an external executable over call files or if possible
> also directly by communicating to asterisk if possible
>
> * A defined group of SIP clients should then ring
>
> * When one declines the others should go on ringing
>
> * When one answers the call the others should be hang up and so stop
> ringing
>
> * The client who answered the call should end up in a defined context and
> extension
>
>
>
>
>
>
>
>
>
>
>
>
>
> Best regards
>
>
>
> *Stefan Ulm*
>
> Technical Department | Research & Development
>
> stefan....@divus.eu <mo...@divus.biz>
>
>
>
>
>
>
>
>
>
>
> *DIVUS Headquarters* Pillhof 51 . I-39057 Eppan (Südtirol) . Tel. +39
> 0471 633 662 . Fax. +39 0471 631 829
>
> www.divus.eu . Privacy: http://www.divus.eu/media/DivusPrivacy.pdf
>
>
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Astlinux-users mailing list
> Astlinux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/astlinux-users
>
> Donations to support AstLinux are graciously accepted via PayPal to
> pay...@krisk.org.
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users
Donations to support AstLinux are graciously accepted via PayPal to
pay...@krisk.org.