spa400

Hello,
I have FreePBX 2.7 and SPA400 3 lines I need a help how I define Trunks for all line apart?
thank you

Rafi

Rafi,

You don’t. Or at least I could not… I built a trunk, then assigned the Phone Numbers in the SPA setup so that each call came in as the DID and used inbound routing to direct the calls properly…

Been runing for two years with no issues…

JMS…

I try to control has the conversations that exit that I can determine from the line that contacts

For incoming calls :
in extensions_additional.conf try to do this :

[ext-did-0002]
exten => SPA400,1,NOOP(${SIP_HEADER(TO)})
exten => SPA400,n,SET(TMP2=${SIP_HEADER(TO)})
exten => SPA400,n,SET(TMP1=${CUT(TMP2,@,1)})
exten => SPA400,n,SET(DST=${CUT(TMP1,:,2)})
exten => SPA400,n,GotoIf($[ ${DST} = FXO_Port_ID_1 ]?from-did-direct,301,1)
exten => SPA400,n,GotoIf($[ ${DST} = FXO_Port_ID_2 ]?from-did-direct,302,1)
exten => SPA400,n,GotoIf($[ ${DST} = FXO_Port_ID_3 ]?from-did-direct,303,1)
exten => SPA400,n,GotoIf($[ ${DST} = FXO_Port_ID_4 ]?from-did-direct,304,1)

“FXO_Port_ID_1” must be the id of port 1 in SPA400 look for it in the web interface of the SPA400, and so on…
301,302,303 and 304 must be the extension where do you want to route the calls to.
“from-did-direct” is the context.
“SPA400” case sensitive is the name of the trunk to the spa400.

For outgoing calls :
it’s easy just add L1,L2,L3 or L4 to define from which line you want to route out the call, eg :
exten => _06.,n,Macro(dialout-trunk,2,L2${EXTEN},) this will be routed to the 2nd line of the spa400.
If you have further questions ask me : [email protected]

Excellent information, it worked properly for incoming calls, the problem is that the file can not be extension_adittional change, since changes made ​​in the erased. Could you tell me where the line of dialplan for outgoing calls placed? if for example my local calls were XXXXXXXX? From already thank you very much

This is all wholly unnecessary if you follow phonebugg’s advice.

If you are not going to at follow that tip at the very least read this:

http://www.freepbx.org/configuration_files

Thanks for your quick response, with the advice of phonebuff not work for me. what was tested is Mohamed’s advice, and in parts if it worked. So wondering where the line is placed extend => advised for the saliententes calls. thank you very much