FreePBX to Siemens Hipath PBX

Hi All,

I have Freepbx installed with a TE110P connected to our Siemens Hipath.
The PRI is working fine but I cant figure our how to route the calls from the Hipath to the SIP trunk on the Asterisk server.

Here is the CLI output when dialing from the Siemens box.

This is when I dial 1905 - it only seems to pick our the 1


Connected to Asterisk 1.4.21.2 currently running on pbx (pid = 2988)
Verbosity is at least 6
– Accepting call from ‘0339’ to ‘1’ on channel 0/31, span 1
– Executing [1@from-pstn:1] Set(“Zap/31-1”, “__FROM_DID=1”) in new stack
– Executing [1@from-pstn:2] NoOp(“Zap/31-1”, “Received an unknown call with DID set to 1”) in new stack
– Executing [1@from-pstn:3] Goto(“Zap/31-1”, “s|a2”) in new stack
– Goto (from-pstn,s,2)
– Executing [s@from-pstn:2] Answer(“Zap/31-1”, “”) in new stack
– Executing [s@from-pstn:3] Wait(“Zap/31-1”, “2”) in new stack
– Executing [s@from-pstn:4] Playback(“Zap/31-1”, “ss-noservice”) in new stack
– <Zap/31-1> Playing ‘ss-noservice’ (language ‘en’)
– Executing [s@from-pstn:5] SayAlpha(“Zap/31-1”, “1”) in new stack
– <Zap/31-1> Playing ‘digits/1’ (language ‘en’)
– Executing [s@from-pstn:6] Hangup(“Zap/31-1”, “”) in new stack
== Spawn extension (from-pstn, s, 6) exited non-zero on ‘Zap/31-1’
– Executing [h@from-pstn:1] Hangup(“Zap/31-1”, “”) in new stack
== Spawn extension (from-pstn, h, 1) exited non-zero on ‘Zap/31-1’
– Hungup 'Zap/31-1’
pbx*CLI>

Would anyone know how I can route the calls from Siemens to the SIP trunk.

Thanks, Joe

I should say, im using

Frepbx - 2.5.2.2
Asterisk - Asterisk 1.4.21.2
Zaptel - 1.4.12.1
Libpri - 1.4.10
Addons - 1.4.7

Thanks, Joe

double post

Ok got it working, incase anyone else has this setup.

Siemens HiPath 3800 + tsm2 (PRI) card
|
| Crossover T1 Cable
v
Asterisk + TE110P


Frepbx - 2.5.2.2
Asterisk - Asterisk 1.4.21.2
Zaptel - 1.4.12.1
Libpri - 1.4.10
Addons - 1.4.7

/etc/Zaptel.conf


span=1,0,0,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16
loadzone = uk
defaultzone = uk

/etc/asterisk/zapata.conf


[trunkgroups]

[channels]

language = en
context = from-zaptel
pridialplan = unknown
resetinterval = never
prilocaldialplan = unknown
usecallerid = yes
hidecallerid = no
callwaiting = yes
usecallingpres = yes
callwaitingcallerid = yes
threewaycalling = yes
transfer = yes
cancallforward = yes
callreturn = yes
echocancel = yes
echocancelwhenbridged = yes
echotraining = 400
rxgain = 0.0
txgain = 0.0
group = 0
callgroup = 1
pickupgroup = 1
immediate = no
overlapdial=yes
facilityenable = yes
callerid = asrecieved
switchtype = euroisdn
signalling = pri_net
channel = 1-15,17-31


/etc/asterisk/extensions_additional.conf


[from-zaptel]
exten=> _X.,1,Dial(SIP/Your Sip Trunk Name/${EXTEN})
exten=> _X.,2,hangup
include => from-zaptel-custom
exten => _X.,1,Set(DID=${EXTEN})
exten => _X.,n,Goto(s,1)
exten => s,1,Noop(Entering from-zaptel with DID == ${DID})
exten => s,n,Ringing()
exten => s,n,Set(DID=${IF($["${DID}"= “”]?s:${DID})})
exten => s,n,Noop(DID is now ${DID})
exten => s,n,GotoIf($["${CHANNEL:0:3}"=“Zap”]?zapok:notzap)
exten => s,n(notzap),Goto(from-pstn,${DID},1)
exten => s,n,Macro(Hangupcall,dummy)
exten => s,n(zapok),Noop(Is a Zaptel Channel)
exten => s,n,Set(CHAN=${CHANNEL:4})
exten => s,n,Set(CHAN=${CUT(CHAN,-,1)})
exten => s,n,Macro(from-zaptel-${CHAN},${DID},1)
exten => s,n,Noop(Returned from Macro from-zaptel-${CHAN})
exten => s,n,Goto(from-pstn,${DID},1)
exten => fax,1,Goto(ext-fax,in_fax,1)


Excellent software guys, keep up the great work.

Cheers, Joe

a slight problem, when I make a change in Freepbx and reload it removes these two lines from-zaptel

exten=> _X.,1,Dial(SIP/Your Sip Trunk Name/${EXTEN})
exten=> _X.,2,hangup

So i changed it to

[from-zaptel]
#include extensions_custom.conf
include => from-zaptel-custom

and in extensions_custom.conf a new context from-zaptel-custom

[from-zaptel-custom]
exten=> _X.,1,Dial(SIP/My SIP Provider/${EXTEN})
exten=> _X.,2,hangup

but this doesnt seem to work, it bypasses the include => from-zaptel-custom
Is there anyway to force it to use the from-zaptel-custom context.

Thanks, Joe

Got it working by changing the Zapata context to

context = outbound-allroutes

This by default will pass all calls from the Siemens box to the Outbound Routes in Freepbx.

Would not from-internal have accompished the same thing? It would have also given you access to the internal dial plan (if you have extensions hung off the FreePBX box).

from-internal is a better option, Thanks sky.

One last thing, I have setup the outbound routes for calls from Asterisk to Siemens and vice versa, this is working great but I have to dial the DDI of the Siemens extensions in order to connect.

E.g. Siemens extension ‘139’ DDI ‘0339’

When calling from an Asterisk extension I need to dial 0339, 139 goes nowhere.
I’m trying a few things on the Siemens end to fix this but would it be possible to setup Freepbx that when 139 is dialled it would pass 0339 instead?

Thanks, Joe

This should be possible in the dial plan of the out bound route to the Siemens box.

All the seimens extension DDI’s begin with ‘03’

So when a user dials 139 - I need the dial plan to strip the 1 and replace it with 03

Does anyone know how to do this.

Thanks, Joe

Got it working

Trunk Zap/go
Dial Plan

1|03+NX

Out Route to Siemens
1XX

Hi,

I am trying to do the same setup for our office and wonder if you could tell me the ISDN port on the siemens what have you got set for the ISDN Protocol.

So far we have ours set to SO Automatic BUS becasue this is the default but i suspect i need to change it to something else but not sure what.