[asterisk-users] Is it possible to have two trunks between two Asterisk boxes ?
jcolp at digium.com
Tue Apr 5 10:12:46 CDT 2016
> For lab testing, I'm trying to build two differents PJSIP trunks between
> two Asterisk 13.8.0enabled boxes.
> I thought I could set up both trunks like this:
> Box A/port 5060 <------ Trunk1 -----> Box B/port 5060
> Box A/port 5062 <------ Trunk2 -----> Box B/port 5062
> and declare trunks like this:
> match=100.66.1.104:5060 <http://100.66.1.104:5060>
> contact=sip:100.66.1.104:5060 <http://100.66.1.104:5060>
You would need to use From user based matching to differentiate the two
trunks. This can be accomplished by specifying the remote endpoint name
to match using the from_user parameter on an endpoint. Example:
When an outbound call is initiated using the trunk1 endpoint then the
From user will be 'trunk2'. If this is received by another chan_pjsip
it will attempt to look for an endpoint named 'trunk2'.
This will allow you to differentiate.
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-users