Hey,
At the beginning I would like to say that I’m not big expert in asterisk so I can confuse some names I’m trying to make such functionality using call file:
- Create call file which has defined multiple extensions (or channels?)
- When call file is loaded, call them at the same time
- When someone answer, play recording
- 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:
- How to call at the same time multiple channels/extensions
- How to properly set callerid with value which is defined in extension which answered the call