Asterisk and multiple SIP Trunks

Hi to all,
this is the first time i post a topic and i hope someone will clarify me some stuff.

I’ve setup some asterisk boxes in various office and i’ve connected toghether via iax trunk and all seems to work properly.

Now what i’ll want to do is to connect via sip trunk some other alcatel pbx with an asterisk boxe that starting from now i will call “voipgateway”.

My needs are to create an asterisk box connected with my principal alcatel pbx vua sip trunk .

When a branch pbx (asterisk,alcatel or whichever not important) calls an extension it will be redirected to “voipgateway” that route
the call trought the correct trunk (iax trunk for “voipgateway” to another asterisk, sip trunk for “voipgateway” to alcatel ).

I’m not sure it is possible with asterisk or what kind of additional layer do i need?

Can you suggest me the correct design in order to achieve this goal?

Thank you

As long as these SIP destinations (Asterisk doesn’t actually have concept of SIP trunks) have different IP addresses or port numbers, this should be very straightforward. Just write the dialplan to end up issuing a Dial for the correct sip.conf entry.

Thank you for your answer.

Sorry but i don’t have a clear understand of what u mean…

Could you explain me well the logic behind your answer?

so what i have to do in order to reach my goal?

take note that i have only one sip trunk license on my alcatel omnipcx so i need to connect my asterisk “voipgateway” with sip trunk to alcatel…then i need to route calls based on extension made by other asterisk or sip pbx to “voipgateway” to reach alcatel connected phones.

Thank you to clarify me

You need to read Asterisk: The Future of Telephony, as this is basically Asterisk 101.

Asterisk selects a context according to the the incoming device, which may be what you call a SIP trunk. It then runs the dialplan for that context. The dialplan pattern matches the dialled digits and ends up invoking the Dial application. The dial application takes a parameter, which, for SIP, is of the form SIP/@[/] or SIP/<sip.conf-section-name>[/digits].

For what you call a trunk you would proably use the second form, with the digits. There is an alternative syntax for providing the digits in this case.

Thus, your dialplan has to match calls you want to got out on a particular “trunk” and terminate on a Dial application call that names the sip.conf section name for the desired trunk and passes the appropriate digits to use for that trunk.

ok…thank you

I’ve read The Future of Telephony in past but now its better to do a refresh…i will do shortly

Anyway one more question:
Due a license limitation of alcatel sip trunk (limitation regarding the number of channel that can be opened simultaneously) when a call is in place from a asterisk phone and an alcatel phone can asterisk leave the connection only to the 2 endpoint?

if not a channel probably is consumed by asterisk transaction

and:

Waht about a sip trunk between alcatel and asterisk
is there any tutorial or best pratices guide to use.

May i have to place particular attention about anything? (codesc…or something else?)

thank you very much

If the Alcatel supports SIP re-invites, the RTP path can be made direct by using directmedia=yes on the Asterisk side. However, I suspect this will still consume licences.

You may want to investigate the Transfer application, but please be aware that it may not work in your case, and if it does work, the standard version of Asterisk has poor failure handling. Unless the phone is also registered to the Alcatel, you may well not save any licences.

Thank you very much for your answer

in your opinion is there any alternative method to make alcatel and asterisk boxes to communicate better then this?

I’m tryng to design a project in order to achieve unify communication between pbx but i’m newbie and maybe i couldn’t see
any other alternative way to do it.

Is there any post or document that can be read about it?

Alcatel PBX are very popular so surelly someone had the same situation like me.

What can be done based on your knowledge?

thank you

I don’t know enough about the Alcatel.