Make outside call

I have two registration. When i make a call from internal to external i choose one registration of two. but i need asterisk when i make a call choose the available external line to make the call.

How can i do that?

On Tuesday 11 June 2024 at 14:57:00, walwaw via Asterisk Community wrote:

I have two registration. When i make a call from internal to external i
choose one registration of two. but i need asterisk when i make a call
choose the available external line to make the call.

If I understand your requirement correctly, you have two connections to
external SIP providers, and you want to try placing a call over one, and if it
fails, place it over the other one instead.

How can i do that?

Place the call over the first connection and then check ${DIALSTATUS}.

If it’s “CHANUNAVAIL” or “CONGESTION” then place the call through the other
connection.

Antony.


“The tofu battle I saw last weekend was quite brutal.”

  • Marija Danute Brigita Kuncaitis

                                                Please reply to the list;
                                                      please *don't* CC me.
    

I need to check if the my first external line is busy to make the call through the second line

On Tuesday 11 June 2024 at 15:37:01, walwaw via Asterisk Community wrote:

I need to check if the my first external line is busy to make the call
through the second line

Why?

What’s wrong with my suggestion, to simply place the call and then find out
whether it failed?

Asterisk doesn’t have a concept of “busy” unless you try to make a call and
that’s the SIP response which comes back again, mainly because SIP connections
to external providers often support multiple simultaneous calls, so just
because “there is a call in progress” does not mean that the connection can’t
handle another one.

Also, suppose your connection to your first SIP provider is not in use (so you
think you can place a call through it) but then when you try to place that
call, the provider rejects it (perhaps because you ran out of credit, or they
can’t reach that destination, or they’re having a problem with their own
systems). In all those cases you want to try placing the call through the
second connection instead, even though the first one was not “busy” when you
started.

So, the thing you should use to decide whether to place the call through the
second connection is whether placing the call through the first connection
failed.

Antony.


The best time to plant a tree is 20 years ago.
The second best time is now.

                                               Please reply to the list;
                                                     please *don't* CC me.

I suspect they are using a SOHO/domestic use provider to support multiple concurrent calls, rather than actually using different providers, so they have an artificial limit of one call per registration.

On Tuesday 11 June 2024 at 16:21:18, david551 via Asterisk Community wrote:

I suspect they are using a SOHO/domestic use provider to support multiple
concurrent calls, rather than actually using different providers, so they
have an artificial limit of one call per registration.

Ah; I hadn’t thought of that, but I still think my suggestion of dialling,
checking DIALSTATUS and then dialling differently if appropriate, is good, and
will work in this situation.

Antony.


Users don’t know what they want until they see what they get.

                                               Please reply to the list;
                                                     please *don't* CC me.