[asterisk-users] Two Asterisk Boxes Playing Together

Alex Balashov abalashov at evaristesys.com
Wed Jan 9 18:50:42 CST 2008


You can do it over SIP or IAX2.  What you would do is set up a SIP or IAX2 
trunk between the two Asterisk boxes (type=peer) and then define 
extensions in your dial plan such that those extensions are routed over
the trunk.

In sip.conf, define your trunk.  I'm going to use SIP in this example,
but you can use IAX2 if you like.  Do this on both machines:

[SomeTrunkName]

type=peer
insecure=very
nat=no
canreinvite=no
host=the_remote_ip_addr
context=dialplan_context_for_calls_to_land_into


On your Asterisk box:

 	exten => 27,1,Dial(SIP/27 at sip_trunk_id)

On his:

 	exten => 277,1,Dial(SIP/9999 at sip_trunk_id2)

Also, make sure to create [dialplan_context_for_calls_to_land_into]
in your dial plan on both sides to route calls coming over the trunk
inward into the system, i.e. map 9999 to your phone.

Hope that helps,

-- Alex

On Wed, 9 Jan 2008, Shane D wrote:

> Okay, here's the dal.
>
> Me and my friend both have asterisk boxes. I want to be able to type
> extension 27 on my end and get his extension 27, and he wants to be
> able to type 277 on his end and get my extension 9999. We both have
> FQDN's, and would like to see about doing this either over sip or
> IAX...
>
> Any help much papreciated,
> Shane
>
> -- 
> -Shane
> Blog: http://blind-geek.com/blog/
> CoOwner: http://sjtechzone.com
> AIM: inhaddict
> Skype: chatter8712
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>

--
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : +1-678-954-0670
Direct : +1-678-954-0671



More information about the asterisk-users mailing list