[Asterisk-Users] "Multiplexing" (or what ever the term is) FXO ports into a "Trunk"

Josiah Bryan jbryan at productiveconcepts.com
Tue Apr 5 11:49:11 MST 2005


On Tuesday 05 April 2005 2:18 pm, David John Walsh wrote:
> Hi all,
>
> For an event we are doing, we have been donated several analogue PSTN
> lines and an 8 port FXO bridge.
>
> On the bridge, we have set up each of the ports to work on the SIP
> protocol, and have referenced them, line1, line2, line3 etc for their
> username / password.
>
> I have placed the config in sip.conf, and they all work fine, inbound
> and out - for testing anyway!
>
> How do I get asterisk, to treat these 8 lines as one 8 call limit
> trunk?  From a users perspective, all he/she needs to dial is
> 9xxxxxxxx (where x's the number) to get any of the 8 outside lines?
>
> Sure I could "hardcode" somthing in each part of the extensions.conf,
> but if this trial is sucsessful, the number of lines may increase, and
> it would be nice to define the array once as it were.
>

I did something quite similar for my receptionist and her Polycom IP500 phone. 
The IP500 can register 3 SIP lines - e.g. in sip.conf i have [op-1], [op-2], 
and [op-3] defined.  Now, to dial the operator I could just to 
Dial(SIP/op-1&SIP/op-2&SIP/op-3), etc. - but that makes it look like there 
are 2 missed calls for every call answered.

Therefore, I did something exactly like what you are trying to do - I 
"trunked" the three SIP lines into one - that way, whenever somone dials 
'204' for the operator, the system looks at the three sip devices (op-[1-3]) 
and dials the first available device.

Here's the relevant exten:

exten => 204,AGI(opdial.pl)

opdial.pl defines an array of operator lines (my @operators = 
('SIP/op-1', ...)) and then opdial.pl connects using the manager API and 
finds the first available operator channel from the list provided, then calls 
$AGI->exec('Dial',$open_device);

If anyone wants more info, let me know and perhaps I can clean up the 
opdial.pl enough for general consumption.

-josiah


-- 
Josiah Bryan
IT Coordinator
Productive Concepts, Inc.
jbryan at productiveconcepts.com
(765) 964-6009, ext. 224



More information about the asterisk-users mailing list