How to dial multiple calls at once using asterisk ?



I want to dial to multiple numbers at once ,I had tried with func. Dial(PJSIP/101 & PJSIP/102) but it will only ring to both user and hung-up the other ,if any one user has picked up the call.

e.g,101–> dialing,102–> dialing

if 101 pick up the call.

101—> Answer,102—>Hangup(automatically by asterisk)

but, i want to make calls simultaneously to multiple user ,either they Answer or not.

e.g,101–> dialing,102–> dialing
101—> Answer,102—>Answer


Originate with a conference accessed from the target dialplan.

Page, in the special case of one way communication.


Thanks for your reply david551,
Currently our motive is to not to do conference call,instead we want calls to initiate parallelly to mutilple clients.

we tried originate func.,but it was not able to set callerId and not working for outbound calls through our SIP trunk.
We have tried call files and they seem to be working fine, but is there any overhead associate with them or does any better way exist?


hi david,
I had tried the call files, it is working fine in case if i have to playback something but in case of
AGI function it will not executing . below is showing our configuration and logs.

Channel: PJSIP/101
MaxRetries: 0
RetryTime: 15
WaitTime: 15
Application: AGI


  • Attempting call on PJSIP/101 for application AGI(/home/voi/Documents/test.agi) (Retry 1)
    – Called 101
    – PJSIP/101-00000038 is ringing
    > 0x7f651400be50 – Strict RTP learning after remote address set to:
    – PJSIP/101-00000038 answered
    > Launching AGI(/home/voi/Documents/test.agi) on PJSIP/101-00000038
    – Launched AGI Script /home/voi/Documents/test.agi
    > 0x7f651400be50 – Strict RTP switching to RTP target address as source
    – <PJSIP/101-00000038>AGI Script /home/voi/Documents/test.agi completed, returning 0
    [Aug 17 18:41:14] NOTICE[14636]: pbx_spool.c:463 attempt_thread: Call completed to PJSIP/101


Looks like a successful call to me. I’d look at what your AGI script does.


we are trying to playback some files and generate logs of the calls ,so for that we are using AGI script of python for more control over flow.
below is “test.agi”

#!/usr/bin/env python
from asterisk.agi import AGI
from app.callLogs import callLogs
from callconferencing import socketClient

def playbackMessage():
agi = AGI()
# print(“playback Message started”)
agi.verbose("&&&& playback message $$$$")
# audioFile = socketClient.audioFilePath
# get the file form particular path
# set the call logs for the users.
dialStatus = agi.get_variable(“DIALSTATUS”)
agi.verbose("SET out call Logs started ")
callLogs.setOutCallLog(agi, employeeId, employeeName, empCallType, dialStatus, hungUpBy)
except Exception as E:


Why are you indirecting through /usr/bin/env?


you are right i have used wrong path /usr/bin/env ,
but after writing /usr/bin/python.
the results are same.

  • Attempting call on PJSIP/101 for application AGI(/home/voi/Documents/ (Retry 1)
    – Called 101
    – PJSIP/101-0000000a is ringing
    > 0x7f7fb000ecb0 – Strict RTP learning after remote address set to:
    > 0x7f7fb000ecb0 – Strict RTP switching to RTP target address as source
    – PJSIP/101-0000000a answered
    > Launching AGI(/home/voi/Documents/ on PJSIP/101-0000000a
    – Launched AGI Script /home/voi/Documents/
    – <PJSIP/101-0000000a>AGI Script /home/voi/Documents/ completed, returning 0
    [Aug 17 19:41:19] NOTICE[20227]: pbx_spool.c:463 attempt_thread: Call completed to PJSIP/101


as it was mentioned, Page() is a solution for you.

“Places outbound calls to the given technology/resource and dumps them into a conference bridge as muted participants (if the ‘d’ option is not specified). The original caller is dumped into the conference as a speaker and the room is destroyed when the original caller leaves.”

To get it work smoothly, is better to Page  the Local/s@some-context, where a certain group of extensions are called (precheck if they are currently paging or not ) . 

to test it, use the asterisk cli command:

channel originate Local/s@originating application Page Local/s@answering

having dialplan:
exten => s,1,Answer()
same => n,Playback(demo-instruct)
same => n,Hangup

exten => s,1,Dial( PJSIP/101& PJSIP/102& PJSIP/103,60)
exten => h,1,Noop( Result: ${DIALSTATUS} )