Using call file to call multiple extensions

Hey,

At the beginning I would like to say that I’m not big expert in asterisk so I can confuse some names :slight_smile: I’m trying to make such functionality using call file:

  1. Create call file which has defined multiple extensions (or channels?)
  2. When call file is loaded, call them at the same time
  3. When someone answer, play recording
  4. After recording call external number, which is also defined in call file

For the moment call file looks like this:

Channel: PJSIP/10101010
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: test-context
Callerid: test-context
Extension: 100
Setvar: waitingTime=2
Setvar: clientNumber=+48XXXXXXX

And this is my context defined in extensions_custom.conf:

[test-context]
exten => 100,1,Answer()
exten => 100,2,Wait({waitingTime}) exten => 100,3,Playback(test-recording) exten => 100,4,Wait({waitingTime})
exten => 100,5,Set(CALLERID(num)=+4822XXXXXXX)
exten => 100,6,Dial(PJSIP/${clientNumber}@dTest,300,Tt)

It works properly but it calls only to one extension which is defined as channel in call file.

It would be wonderful if someone can give me any clue about two issues:

  1. How to call at the same time multiple channels/extensions
  2. How to properly set callerid with value which is defined in extension which answered the call

I dont use call file, but I know a method is uslng local channels

Use local channels (Google will return a page if you give call files and local channels). Encode the external number into the extension called.

Research connected line update for the callee ID.