I am using asterisk to make a phone call to multiple numbers simultaneously using
Dial(SIP/XXXXX&SIP/YYYYY&SIP/ZZZZZ)
This will call all three numbers at once and which ever one picks up first gets connected and other are hung up.
What I am trying to work out is there anyway in the dial plan to determine which of those numbers was the one that answered?
Little bit more information:
What happens is that a call comes in from outside DID number over SIP, I look up in my database and get a list of numbers to call at once (again outside PSTN type numbers) which the system rings using above.
XXXX could be 0712345678@provider
YYYY Could be 0412345678@provider
etc
one way to do this is look at CDR disposition and dstchannel values, like this:
exten=>h,1,NoOp( -- ${CDR(disposition)} -- ${CDR(dstchannel)} -- )