Sorry for the delay, I’m still working on a few tweaking using a PRI trunk to the Toshiba system. I will state the issue I had with the SIP trunk between Toshiba CIX and the FreePBX. As I get time, I would like to make a detailed guide, but here is the brief overview of how I have it setup and the one major issue that had me pursue a PRI trunk using an Adtran instead.
For the SIP trunk to work, you have to first make sure you have SIP trunking license on the Toshiba. Then you’ll also need an MIPU card, which I assume if you’re reading this you already have. In my setup, I then made sure the MIPU had an IP address in the same network as the FreePBX.
On the Toshiba, you need to first create the Incoming and Outgoing Line groups to use in the SIP Trunking. This is under Trunk -> ILG and the Trunk -> OLG. For simplicity, I made mine the same, in this case 41 for both ILG and the OLG.
Create = 41
01 Group Type: SIP
02 Line Type: Tie
03 Service Type: DIT
04 Private Service Type : Q-SIG
11 DID Digits: 3 (I have 3 digit dialing on the Toshiba system)
Create = 41
01 Group Type: SIP
02 Trunk Type: Tie/E&M
03 Service Type: Standard (this is where I had issues–see comment at the end)
Next, you have to setup a SIP trunk. This is under IP-Telephony -> SIP Trunking
On the Channel Group Setting tab (Prg 326), click Create and enter a number, again, I chose 41 so everything would match.
01 Equipment: (location of your MIPU card, in this case it was 0301 – ie Cabinet 03 and Slot 01)
02 LAN interface number: 1
03 SIP Trunk Channels: 4 (or however many channels you licensed)
Next, setup your Service Definition (Prg 327)
Again, create and I chose 41
This section is where I didn’t spend a lot of time, so maybe you can tweak things here to make it behave better, but this is what I set:
01 Registration Mode: Client
02 ILG: 41 (or what you used for your ILG)
03 OLG: 41 (or what you used for you OLG)
04 Effective Channel Number: 4 (ie, what you licensed for your SIP trunk channels)
05 Domain Name: IP address of the FreePBX
06 SIP Server: IP address of the FreePBX (believe you can also put :)
35 SIP Trunk Message Option: SIP Server IP Address
36 SIP Trunk Message to Header OPtion: SIP Server IP Address
37 SIP Trunk Register Message From Header Option: IPU IP Address (don’t believe this is critical)
Next you have to link the Channel group and Service Definition together, this is under the Service Assignment (Prg 328)
00 Channel Group: Select 41 (ie, what you put in Prg326)
Click on the Service No 1 slot.
Then under 02 Service Index, select 41 (or what you put under Prg327)
Lastly, and this is very important, you need to setup your URI. Click on URI
00 SIP URI Trunk Service Index: select 41 (or what you put for Prg326)
Click on the Index 1, which should populate 01 SIP URI Index
Now enter the following data (again, there may be a better way, but this is how I got it working):
02 SIP URI: toshiba
03 SIP URI Username: toshiba
(for this to work, both the URI and username have to be the same)
04 SIP URI password: toshiba (or whatever password you want to use)
05 SIP URI Channel Group: 41 (or what you use in )) SIP URI Trunk Service Index, this should auto populate)
06 SIP URI Attribution: main
Click Add, which is usually next to 00 SIP URI Trunk Service Index
This will then save and populate your 1st index. Now, this is just to enable the trunk, next you have to add a URI for each extension or Multiple Call Group you want users from the FreePBX to call. For example:
I have Ext 111, so in order for users from the FreePBX to call Toshiba, I need to add it to the URI.
Select Index 2, it should populate 01 SIP URI Index with 2
02 SIP URI: 111 (or what extension you want to add)
Leave Username and password blank
05 SIP URI Channel Group: 41 (or what is in 00 SIP URI Trunk Service Index)
06 SIP URI Attribution: sub
Now, you’ve got that setup, now you need to route calls from Toshiba to the FreePBX. For testing, I just added a Flexible Access Code (or System -> Flexible Access Code)
Prg 102 Flexible Access Code
00 Access Code: 87 (or whatever two digit or prefix you want to use to dial to the FreePBX)
01 Feature Name: Line group access code- one access code for each OLG
02 OLG Number: 41 (or whatever you setup for your OLG)
Now, you’re ready to create the trunk on the FreePBX
First, create the Trunk, I did mine with PJSIP, but you can use SIP as well.
Trunk Name: toshiba (this will need to match the URI and username you set for the URI)
Secret: toshiba (or whatever password you used in URI)
Codes: ulaw (that’s all I have setup, in Toshiba that is the G.711u found under SIP Trunking Prg 327 - 17 Primary Audio Codec)
Click Submit and Apply Config
Next, you have to setup an Outbound Route on FreePBX. For simplicity, I just created a Prefix, in my case 88, to dial to Toshiba. So create an Outbound route, I called it Toshiba.
Trunk Sequence, choose the Toshiba trunk
Dial Patters: in the Prefix put 88, and “.” (without the quote) for the match pattern.
Click Submit and Apply Config.
At this point, you may need to restart your MIPU card by pushing the reset button. Then try calling. Once I did this, I was able to call between the systems. The downside with this setup is any call coming from Toshiba -> FreePBX will always show the URI or “Toshiba”. So any extension from Toshiba can call Freepbx. Again, for your FreePBX to call Toshiba, you have to add a URI for each extension or multiple call group or Hunt group.
Now, I bet the CallerID would pass across, if you could choose QSIG for the OLG. If you do, as I started with, you’ll see the following in your Asterisk Logs:
[2018-05-27 16:58:22] ERROR: pjproject:0 <?>: sip_transport.c Error processing 714 bytes packet from UDP :5060 : PJSIP syntax error exception when parsing ‘From’ header on line 4 col 12: PJSIP syntax error exception when parsing ‘Contact’ header on line 8 col 14:
INVITE sip:2011@ SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK1ca4f80c9a7462b90f7777b3506346c8
Call-ID: b15b0ae3ec@<MIPU IP Address
CSeq: 1 INVITE
Contact: sip:▒88111@<MIPU IP Address
Notice the ▒, not sure what this is, but basically Asterisk sees it and throws an error. If there was a way to filter that out, I’m sure it would work. My guess is it is a Toshiba StrataNet specific packet that is being sent. Hence, it won’t work. Because of this issue, I’m now using a PRI card (BPTU) card with an Adtran 924. This solved the CallerID issue and allows calling between the system. I’m still working out some other issues, but so far, much better solution.
So in short:
Toshiba to FreePBX SIP trunk is possible, but limited, just need to figure out how to get QSIG working
Purchase a BPTU (PRI card) for the Toshiba and use a device to translate to SIP, such as an Adtran 924
As I get more time, I’ll see about putting together a better guide and how we setup the PRI trunk.
If anyone has any ideas on the QSIG or better options, feel free to comment.