Use first free SIP channel to dialout

hello. i have 4 SIP registered channels (2 simultaneous call per account).

i use call files or ORIGINATE AMI action to call out user for alarms.

i can make 2 simultaneous call with first sip channel.

but how can i use another sip channel for third simultaneous call ?

how to create “outgoing group”, or how to test if a channel is free before make a call with this one ?
I tried with “failed” extension, but i cannot make something work…

Thanks for your help.

Firstly you are talking about commercial limits, rather than technical ones.

The Dial application will fall through to the next dialplan priority if the call fails. You can examine HANGUPCAUSE, or look at the underlying SIP cause code to determine whether the failure is a result of exceeding the commercial limits on the account.

SIP doesn’t provide any means of testing whether a call would be commercially permitted, without making the call. More generally you can’t tell whether a call would fail without making the call.

You could also use group counts to track the number of active calls via the specific endpoint, but, if incoming calls are allowed, this would be subject to race conditions, in which an incoming call arrived after the test, but before the endpoint became aware of your outgoing attempt.

Thx for your answer !
of course the call can go out. the idea is to switch automatically to “provider2” if “provider1” fail or is congested.
i will try to understand you proposal and try to make it run in dialplan.
but with dial file or “originate” command, it don’t work as a “dial” command in a diaplan priority scheme.
you define which context/priority to go when call run. … Then i have difficulties to imagine how to do it !

You use a local channel as the A side.

1 Like

THX, i will try this, mixing with you first answer ! :wink: i’m come back to explain my result !

@david551 THANK YOU, it work as you said. local dialplan with simple dial commands on each channel… (real dest in variable). you save me ! if i can offer you a beer (pack), it’s a pleasure ! :wink:
really great to share time for others. THANKS again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.