Using trixbox CE as a SIP Gateway
If you have a need to have multiple PBX systems running and you want them all to make and receive calls, you will run into a major problem with that because of NAT issues and port forwarding limitations. In this article, I will explain how to use a trixbox CE system as a front-end gateway that will manage the trunks to the SIP providers and forward calls to the different PBX systems as well as allow the PBX systems to dial out through the trixbox CE system.
Besides testing different PBX platforms like I do, why might you want to do a setup like this? There are several reasons I can think of:
- Single VoIP provider to service multiple companies at a single location each with their own PBX system
- Setting up separate PBX systems for different departments
- Having a single media gateway that serves multiple locations (over a VPN)
- Test systems for development
- Temporary setup during migration from one system to another.
While this is only showing a SIP provider to multiple PBX’s, the concept can also be applied to a SIP trunk coming into the gateway and then a PRI connection to a legacy PBX that doesn’t support SIP trunks, thus allowing a non-IP PBX system to use VoIP trunks.
We won’t go into the setup of the actual SIP trunk into the trixbox CE (FreePBX) system as that is dependant upon the provider and should be pretty straightforward. What we will need to do is create trunks from the other PBX systems into the trixbox CE box in order to route calls.
Setting up the PBX trunks in trixbox CE
All we need between the trixbox CE gateway system and the other PBX is a very simple SIP trunk. While you could get fancy and add in authentication, the only thing we will do is restrict the trunks based on the IP addresses.
Step 1: Create a new SIP trunk
In PEER Details:
Trunk Name: PBX-in
host=<ip address of PBX>
type=peer
context=from-internal
In the USER Details:
Trunk Name: PBX-Out
host=<ip address of PBX>
type=user
context=from-internal
Step 2: Create an Outbound Route
This step is to allow you to route specific DID numbers to different PBX’s. Each DID that matches in the Dial Patterns will be sent to the trunk that is selected.
Select Intra Company Route
Enter DIDs into the Dial Patterns field
Select the trunk that points to the PBX that we created in step 1
In this example we have three DID’s that will be sent to a trunk we setup to a trixbox Pro system. At this point trixbox CE will know how to send a call to the second PBX, but we still need to tell it how to handle a call when it comes into the system.
Step 3: Create a Misc Destination
If the FreePBX code was simply able to route calls to trunks, then this step wouldn’t be needed, but since we need to actually “dial” the number for the call to get transferred we can create a Misc. Destination that will do what we want.
All we need to put into the Misc Destination is a description and the DID number we are transferring.
Step 4: Create an Inbound Route
As part of the previous step, trixbox CE has to know what to do with the call when it arrives into the system., the Misc Destination is an interim piece we need for this final step.
Go to Inbound Routes and create a new route, in the DID number put in the DID number we are going to match on, then at the bottom, set the Destination to the Misc Destination we created in the previous step.
To put this into a visual perspective, in the following graphic you can see how the call flow comes into the inbound route, is sent to the Misc Destination which then sends it through the outbound route.
![]()
Actually, the hard part is all done now and we just need to tell our PBXs to create trunks and send the calls to that trunk the same way we would with any other SIP provider. I will cover a few of the common IP PBX platforms quickly. If you are using another trixbox CE system, you just need to duplicate the trunk configuration above but change the IP addresses to point to the gateway server.
trixbox Pro
Setting up the route in trixbox Pro is dead simple, the only fields you need to enter anything into are a route name and the server IP (the gateway server IP address). In our setup, we just called our route “trixboxce” and set the Server field to the IP address of the trixbox CE gateway machine.

For the dialplan options in trixbox Pro, simply change all of the options to strip 1 digit. Depending on your SIP provider, you may have to change local calls to also prepend your local area code.
3CX
Setting up 3CX is also fairly simple. From the VOIP Provider setup tool, select Generic SIP provider, for the SIP server IP and Outbound proxy IP set those to the IP address of the trixbox CE gateway server, for the External number I used the DID number for this system, and for the Authentication I used 3CX even though it isn’t actually being used 3CX does require something in that field. You also have to have a number in the Maximum Simultaneous Calls fields so I just put a 4 in there for now.

You will also need to setup inbound and outbound dialing rules the same way you would for any other SIP trunk.
Switchvox
Following along the same lines as the previous examples, we just need to create a SIP trunk with the IP address pointed to the gateway server. Switchvox will insist on an account ID and password, just enter any text there to get past the screen. Setup the inbound and outbound routes the same as any other provider and you are set to go.
Summary
While needing a configuration like this may not be very common, there are certainly times that is can be quite helpful to be able to have multiple PBX systems on the same network and this solution will solve the problem with not being able to get the different systems to work properly with VoIP providers.
Related Links
3CX
trixbox Pro
trixbox CE
Switchvox

Kerry,
How would it work outgoing calls from the phones attached to the PBXes to 10-digit numbers?
Assuming we have a perfectly working SIP trunk between the SIP provider and the Trixvox CE. Say a UA attached to one of the PBXes makes a call to a 10 digit number (PSTN) and we’ve configured that PBX to send that call out to Trixbox CE on the established trunk, what would it take to configure the TrixBox CE (working as a SIP GW) to send that call out to the trunk with SIP provider?
–
Umer
On the CE system my outbound route to the SIP provider contains the following:
1800NXXXXXX
1866NXXXXXX
1877NXXXXXX
1888NXXXXXX
1NXXNXXXXXX
NXXNXXXXXX
NXXXXXX
Kerry, sorry, I might have confused you. My outbound routing to the SIP provider works fine when I’m dialing out from an extension attached to the [trixbox CE] box. However, I have the problem when I use the [trixbox CE] as SIP gateway to the provider from an [internal PBX]. The [internal PBX] has a trunk to [trixbox CE] which has a trunk to the [provider], as below:
[internal PBX][trixbox CE][provider]
Configuration of the trunk between [internal PBX] and [trixbox CE], on the [trixbox CE] is:
Outgoing Settings
—————–
disallow=all
allow=alaw&ulaw&gsm
host=10.5.10.7
port=5060
type=peer
Incoming Settings
—————–
disallow=all
allow=alaw&ulaw&gsm
host=10.5.10.7
port=5060
type=user
context=from-internal
So when I send a call from [internal PBX] to [trixbox CE], it doesn’t route it out to the provider and it fails. It doesn’t even show coming in on context: from-internal. It shows up coming in on the context: from-sip-external
[Jun 18 12:16:26] — Executing [6782622075@from-sip-external:1] NoOp(“SIP/10.5.10.7-b7c00a20″, “Received incoming SIP connection from unknown peer to 6782622075″) in new stack
[Jun 18 12:16:26] — Executing [6782622075@from-sip-external:2] Set(“SIP/10.5.10.7-b7c00a20″, “DID=6782622075″) in new stack
[Jun 18 12:16:26] — Executing [6782622075@from-sip-external:3] Goto(“SIP/10.5.10.7-b7c00a20″, “s|1″) in new stack
[Jun 18 12:16:26] — Goto (from-sip-external,s,1)
[Jun 18 12:16:26] — Executing [s@from-sip-external:1] GotoIf(“SIP/10.5.10.7-b7c00a20″, “1?from-trunk|6782622075|1″) in new stack
[Jun 18 12:16:26] — Goto (from-trunk,6782622075,1)
Any ideas??
Thanks,
–
Umer
It looks like you are calling out to the same number you are calling from.
From: is different from To: for sure
[central PBX] is configured in such a way that if it gets a call request to 1-678-262-2075, send it to [trixbox CE] for calling out.
Problem, I guess is that when [trxibox CE] gets the request, it treats it as the context ‘from-sip-external’ rather than ‘from-internal’
another interesting point!
What if the UAs attached to any of the internal PBXes are sitting outside the network and have to pass their registration messages through the trixbox CE?
Your solution can work in a peering environment but perhaps not in a access scenario?
–
Umer WaQar
Kerry…
What happens if I dial a DID that is being used by one of the other PBX’s ? Does it stay on net ? Does the Trixbox Sip Gateway just turn around and send the call back down to the other PBX? Or does the call fail with no audio?
JD
Jason,
Dialing from an External phone, like a cell phone? I would assume via DID routing it would direct the call right to the PBX that is registered to the VoIP Provider who owns that DID.
Mike — understood but I meant dialing from a PBX to a DID registered on one of the other PBX’s.
It would be understood that dialing from an external phone to a DID that it would goto the PBX the trunk was registered from that the DID is assigned via the provider. However, I don’t that is the case here as the three sub PBX’s are registered to the main PBX — so who is registering the trunk for assigned DIDs ?
Let me be specific so there is no more confusion.
As Kerrys outline there would be three PBXs behind a single PBX. PBX’s A/B/C connecting via PBX 1.
PBX A dials a DID that is on PBX B — How would the call be routed ? Does the call stay on-net meaning does it stay on the network established between all PBX’s or would it go all the way out to the provider and back in ? Would it even work?
How with a standard trixbox are those DIDs configured if it is working as I asked?
I don’t see any thing in a vanilla Trixbox that would allow such internal assignments of DIDs to multiple Trixbox servers.
JD
Jason,
Awesome question
I really want to try this out in my lab. Right now I’m actually doing something very similar to this but I’m using an AudioCodes Mediant 1000… which is specially designed for this type of high level routing application.
Kerry is in the Buffalo office this week (where I’m at), I’ll see if I can set aside some time so him and myself can hash this out.
With the described configuration, the call would go out the trunk on pbx 1 and then back into pbx 1 from the telco and then routed to pbx b based on the did. This behavior should be easy enough to change to keep “on net” DIDs from going out of the trunk. Sounds like a good project for a followup article.
I think you would find that with the boxes being behind NAT the phones will ring — but there wouldn’t be any audio routed. This is especially true if you have more than one trunk going to the same provider from the same subnet.
I however, do have this working with a custom Asterisk install driven by a web gui… I have 36 trunks to different trixbox servers and 175 DIDs.. 5 different providers — all making and receiving calls via the asterisk server router (ASR) as I call it.
I even show stats based on each trunk and how many ON NET calls are made.
jason.derr@yahoo.com / On Yahoo IM as jason.derr
JD
No response ?
JD
I can attest to the fact that audio worked perfectly. This is exactly the network that my home system ran on for months with no audio problems at all. I don’t need the ability to have 36 trunks or show stats as I am running this purely for lab testing and not for reselling service or for billing purposes. The point was to show people how you can have a lab environment with multiple PBX platforms behind it and have it work properly, which it does.
Hi Kerry,
Thank for your great article that meet my needs. I have been goggling around for it.
My system have 2 pbx. One is Trixbox 2.6 (172.10.1.8)(Gateway) and one is Trixbox 2.8 (172.10.10.241) for sale department (act as internal and call originated from this PBX will go out through the trixbox 2.6).
After following your steps, extension from Trixbox 2.8 now can make a call out but the call in can not reach trixbox 2.8.
A. Configuration from Trixbox 2.6 as:
1. Inbound routes:
DID Number: 2814801121
…
Set Destination:
Misc Destinations: PBX2
2. Here is the Misc Destinations PBX2 information:
Description: PBX2
Dial:2814801121
3. The Outbound routes of Trixbox 2.6
Route Name: pbx2
Intra Company Route: selected
…
Dial Patterns: 2814801121
…
Trunk Sequence: SIP/pbx2-in
4. Trunk information is as
Outgoing Settings
Trunk Name: pbx2-in
PEER Details:
host=172.10.10.241
type=peer
context=from-internal
Incoming Settings
USER Context: pbx2-out
USER Details:
type=user
context=from-internal
host=172.10.10.241
B. Configuration from Trixbox 2.8
1. 1. Inbound routes:
DID Number: 2814801121
…
Set Destination:
Extensions: Truyen
2. Extension:
900 is created as a regular extension
3. Outbound routes
Route Name: pbx1
Intra Company Route: selected
…
Dial Patterns:
411
911
1800NXXXXXX
1866NXXXXXX
1877NXXXXXX
1888NXXXXXX
1NXXNXXXXXX
1xx
281NXXXXXX
2xx
3xx
4xx
5xx
6xx
713NXXXXXX
7xx
832NXXXXXX
8xx
NXXNXXXXXX
…
Trunk Sequence: SIP/pbx1-in
4. Trunk information is as
Outgoing Settings
Trunk Name: pbx1-in
PEER Details:
host=172.10.1.8
type=peer
context=from-internal
Incoming Settings
USER Context: pbx2-out
USER Details:
type=user
context=from-internal
host=172.10.1.8
WelL! I try to fix it but can not until now. It seems to me that the Inbound Route and Misc Destination doesn’t work because right now I call DID number 2814801121 from my handphone, it is still fall into a IVR that I used to assigned it in Trixbox 2.6 although after I did all of this configuration, I did apply the change so the system can reload the configure file.
Can you just help me out.
many Thanks
Certainly troubleshooting other people’s systems is beyond the scope of this article and the comments. However, if your inbound call is not leaving the trixbox system, then you did not follow the instructions for creating outbound routes for the incoming DID properly. It could also be that you are not getting DID information (like with an analog phone line) and would need to do additional setup to configure FXO DID within trixbox’s PBX configuration tool.
Thank you Kerry, I got it.
A mistake in creating the intra-office route
Hey Kerry or anybody,
I got this question and don’t know where to post in you blog? So I just post here since it related to trixbox 2.8.
I just install trixbox 2.8.0.2 (stable version). Everything is find except that it doesn’t generate event: CDR like it is in trixbox 2.6.
I did modified the cdr_manager.conf as
[general]
enable = yes
Then I reboot the system and try a call from one extension to the other. I got a software to capture the event. All other event generated such as: Event: AGI, Event: Bridge, etc but event: cdr.
So is there any further setup that we need to do so that the system is send out the cdr event.
I checked in the CDR via GUI. It have record all the call details.
Thank you
This was a bug in 2.8.0.2 and was fixed in 2.8.0.3
Oh it it? Thank you Kerry. I will find 2.8.0.3 and installed then test again. Will let you know the result.
many thanks
Hey Kerry,
I just finished testing on 2.8.0.3 But the result is still the same. No CDR event generated but others. You can have a look at the event generated below.
Event: ExtensionStatus
Privilege: call,all
Exten: 900
Context: ext-local
Hint: SIP/900&Custom:DND900
Status: 1
CallerID Result: 8
Event: Newchannel
Privilege: call,all
Channel: SIP/900-08e15f88
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 900
CallerIDName: device
AccountCode:
Uniqueid: 1260733227.7
CallerID Result: 8
Event: Newstate
Privilege: call,all
Channel: SIP/900-08e15f88
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 900
CallerIDName: device
Uniqueid: 1260733227.7
CallerID Result: 8
Event: NewCallerid
Privilege: call,all
Channel: SIP/900-08e15f88
CallerIDNum: 900
CallerIDName: Test-900
Uniqueid: 1260733227.7
CID-CallingPres: 0 (Presentation Allowed, Not Screened)
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 805353285
Command: GET VARIABLE ARG2
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 805353285
Command: GET VARIABLE ARG2
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1965464040
Command: GET VARIABLE ARG1
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1965464040
Command: GET VARIABLE ARG1
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1604237306
Command: DATABASE GET “AMPUSER” “901/recording”
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1604237306
Command: DATABASE GET “AMPUSER” “901/recording”
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 845406623
Command: VERBOSE “Inbound recording not enabled” 1
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 845406623
Command: VERBOSE “Inbound recording not enabled” 1
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1647941359
Command: VERBOSE “Starting New Dialparties.agi” 1
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1647941359
Command: VERBOSE “Starting New Dialparties.agi” 1
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 30676244
Command: GET VARIABLE AMPMGRUSER
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 30676244
Command: GET VARIABLE AMPMGRUSER
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1760794587
Command: GET VARIABLE AMPMGRPASS
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1760794587
Command: GET VARIABLE AMPMGRPASS
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1848744735
Command: GET VARIABLE CWINUSEBUSY
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1848744735
Command: GET VARIABLE CWINUSEBUSY
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 296271619
Command: GET VARIABLE ASTVERSION
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 296271619
Command: GET VARIABLE ASTVERSION
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 292158012
Command: GET VARIABLE ASTCHANDAHDI
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 292158012
Command: GET VARIABLE ASTCHANDAHDI
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 658595699
Command: GET VARIABLE CWIGNORE
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 658595699
Command: GET VARIABLE CWIGNORE
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 208735031
Command: GET VARIABLE CFIGNORE
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 208735031
Command: GET VARIABLE CFIGNORE
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1146594548
Command: GET VARIABLE priority
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1146594548
Command: GET VARIABLE priority
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 575883056
Command: VERBOSE “Caller ID name is ‘Test-900′ number is ‘900′” 1
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 575883056
Command: VERBOSE “Caller ID name is ‘Test-900′ number is ‘900′” 1
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1863908042
Command: GET VARIABLE QUEUEWAIT
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1863908042
Command: GET VARIABLE QUEUEWAIT
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 228279644
Command: SET VARIABLE __KEEPCID “TRUE”
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 228279644
Command: SET VARIABLE __KEEPCID “TRUE”
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1906027417
Command: SET VARIABLE DIALSTATUS_CW “”
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1906027417
Command: SET VARIABLE DIALSTATUS_CW “”
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1963894957
Command: GET VARIABLE ARG1
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1963894957
Command: GET VARIABLE ARG1
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1589465147
Command: GET VARIABLE ARG2
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1589465147
Command: GET VARIABLE ARG2
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 106368263
Command: GET VARIABLE RingGroupMethod
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 106368263
Command: GET VARIABLE RingGroupMethod
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 289360792
Command: GET VARIABLE ALERT_INFO
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 289360792
Command: GET VARIABLE ALERT_INFO
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1842154365
Command: GET VARIABLE SIPADDHEADER
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1842154365
Command: GET VARIABLE SIPADDHEADER
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1008045707
Command: GET VARIABLE PR_DIALSTATUS
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1008045707
Command: GET VARIABLE PR_DIALSTATUS
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1925347061
Command: GET VARIABLE FMGRP
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1925347061
Command: GET VARIABLE FMGRP
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 565720161
Command: GET VARIABLE NODEST
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 565720161
Command: GET VARIABLE NODEST
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 497040477
Command: GET VARIABLE RINGGROUP_INDEX
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 497040477
Command: GET VARIABLE RINGGROUP_INDEX
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1811439290
Command: GET VARIABLE USE_CONFIRMATION
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1811439290
Command: GET VARIABLE USE_CONFIRMATION
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1722876322
Command: VERBOSE “USE_CONFIRMATION: ‘FALSE’” 5
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1722876322
Command: VERBOSE “USE_CONFIRMATION: ‘FALSE’” 5
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1721998231
Command: VERBOSE “RINGGROUP_INDEX: ”” 5
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1721998231
Command: VERBOSE “RINGGROUP_INDEX: ”” 5
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 732852306
Command: VERBOSE “Methodology of ring is ‘none’” 1
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 732852306
Command: VERBOSE “Methodology of ring is ‘none’” 1
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 142661223
Command: GET VARIABLE ARG3
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 142661223
Command: GET VARIABLE ARG3
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 789289245
Command: VERBOSE “Added extension 901 to extension map” 3
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 789289245
Command: VERBOSE “Added extension 901 to extension map” 3
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 41616639
Command: GET VARIABLE ARG4
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 41616639
Command: GET VARIABLE ARG4
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1696807989
Command: GET VARIABLE SCREEN
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1696807989
Command: GET VARIABLE SCREEN
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 411892285
Command: GET VARIABLE FROM_DID
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 411892285
Command: GET VARIABLE FROM_DID
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 168322689
Command: GET VARIABLE ASTVARLIBDIR
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 168322689
Command: GET VARIABLE ASTVARLIBDIR
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1362991731
Command: DATABASE GET “CF” “901″
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1362991731
Command: DATABASE GET “CF” “901″
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 118009644
Command: VERBOSE “Extension 901 cf is disabled” 3
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 118009644
Command: VERBOSE “Extension 901 cf is disabled” 3
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 267250154
Command: DATABASE GET “DND” “901″
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 267250154
Command: DATABASE GET “DND” “901″
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1602520489
Command: VERBOSE “Extension 901 do not disturb is disabled” 3
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1602520489
Command: VERBOSE “Extension 901 do not disturb is disabled” 3
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 204033531
Command: DATABASE GET “CW” “901″
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 204033531
Command: DATABASE GET “CW” “901″
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1604600684
Command: DATABASE GET “CFB” “901″
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1604600684
Command: DATABASE GET “CFB” “901″
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 2024816624
Command: DATABASE GET “CFU” “901″
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 2024816624
Command: DATABASE GET “CFU” “901″
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 2062997654
Command: VERBOSE “extnum 901 has: cw: 1; hascfb: 0 [] hascfu: 0 []” 4
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 2062997654
Command: VERBOSE “extnum 901 has: cw: 1; hascfb: 0 [] hascfu: 0 []” 4
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 2038566912
Command: VERBOSE “ExtensionState: 0″ 4
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 2038566912
Command: VERBOSE “ExtensionState: 0″ 4
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 167846473
Command: DATABASE GET “AMPUSER” “901/device”
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 167846473
Command: DATABASE GET “AMPUSER” “901/device”
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1366609801
Command: DATABASE GET “DEVICE” “901/dial”
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1366609801
Command: DATABASE GET “DEVICE” “901/dial”
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1769941692
Command: DATABASE PUT “CALLTRACE” “901″ “900″
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1769941692
Command: DATABASE PUT “CALLTRACE” “901″ “900″
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1310655317
Command: VERBOSE “dbset CALLTRACE/901 to 900″ 3
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1310655317
Command: VERBOSE “dbset CALLTRACE/901 to 900″ 3
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1682307972
Command: SET VARIABLE FILTERED_DIAL “901″
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1682307972
Command: SET VARIABLE FILTERED_DIAL “901″
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1321688039
Command: VERBOSE “Filtered ARG3: 901″ 3
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1321688039
Command: VERBOSE “Filtered ARG3: 901″ 3
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 2048694053
Command: SET VARIABLE ds “SIP/901,15,tr”
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 2048694053
Command: SET VARIABLE ds “SIP/901,15,tr”
ResultCode: 200
Result: Success
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: Start
Channel: SIP/900-08e15f88
CommandId: 1684261475
Command: SET PRIORITY normdial
CallerID Result: 8
Event: AGIExec
Privilege: call,all
SubEvent: End
Channel: SIP/900-08e15f88
CommandId: 1684261475
Command: SET PRIORITY normdial
ResultCode: 200
Result: Success
CallerID Result: 8
Event: Newchannel
Privilege: call,all
Channel: SIP/901-0903d1b0
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum:
CallerIDName:
AccountCode:
Uniqueid: 1260733228.8
CallerID Result: 8
Event: NewCallerid
Privilege: call,all
Channel: SIP/901-0903d1b0
CallerIDNum: 901
CallerIDName:
Uniqueid: 1260733228.8
CID-CallingPres: 0 (Presentation Allowed, Not Screened)
CallerID Result: 8
Event: ExtensionStatus
Privilege: call,all
Exten: 901
Context: ext-local
Hint: SIP/901&Custom:DND901
Status: 8
CallerID Result: 8
Event: Newstate
Privilege: call,all
Channel: SIP/901-0903d1b0
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 901
CallerIDName:
Uniqueid: 1260733228.8
CallerID Result: 8
Event: Newstate
Privilege: call,all
Channel: SIP/901-0903d1b0
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 901
CallerIDName:
Uniqueid: 1260733228.8
CallerID Result: 8
Event: Newstate
Privilege: call,all
Channel: SIP/900-08e15f88
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 900
CallerIDName: Test-900
Uniqueid: 1260733227.7
CallerID Result: 8
Event: Bridge
Privilege: call,all
Bridgestate: Link
Bridgetype: core
Channel1: SIP/900-08e15f88
Channel2: SIP/901-0903d1b0
Uniqueid1: 1260733227.7
Uniqueid2: 1260733228.8
CallerID1: 900
CallerID2: 901
CallerID Result: 8
Event: ExtensionStatus
Privilege: call,all
Exten: 901
Context: ext-local
Hint: SIP/901&Custom:DND901
Status: 1
CallerID Result: 8
Event: Unlink
Privilege: call,all
Channel1: SIP/900-08e15f88
Channel2: SIP/901-0903d1b0
Uniqueid1: 1260733227.7
Uniqueid2: 1260733228.8
CallerID1: 900
CallerID2: 901
CallerID Result: 8
Event: Hangup
Privilege: call,all
Channel: SIP/901-0903d1b0
Uniqueid: 1260733228.8
CallerIDNum: 901
CallerIDName:
Cause: 16
Cause-txt: Normal Clearing
CallerID Result: 3
Event: ExtensionStatus
Privilege: call,all
Exten: 901
Context: ext-local
Hint: SIP/901&Custom:DND901
Status: 0
CallerID Result: 8
Event: Hangup
Privilege: call,all
Channel: SIP/900-08e15f88
Uniqueid: 1260733227.7
CallerIDNum: 900
CallerIDName: Test-900
Cause: 16
Cause-txt: Normal Clearing
CallerID Result: 0
Event: ExtensionStatus
Privilege: call,all
Exten: 900
Context: ext-local
Hint: SIP/900&Custom:DND900
Status: 0
CallerID Result: 8
Action: Ping
Response: Success
Ping: Pong
CallerID Result: 1
During the call happen, I see in the Linux it saying something like:
– Executing [s@macro-hangupcall:1] ResetCDR (“SIP/900-08e15f88″,”vw”) in the new stack
– Executing [s@macro-hangupcall:1] NoCDR (“SIP/900-08e15f88″,”vw”) in the new stack
So do I miss anything of any further advice would be very much appreciate.
Thank you
Further information when I go to CLI>cdr show status
I see:
CDR logging: enabled
CDR mode: simple
CDR output: unanswered calls: no
CDR registered backend: cdr_manager
CDR registered backend: Adaptive ODBC
CDR registered backend: cdr-custom
CDR registered backend: mysql
I guess I miss something in this version of trixbox 2.8.0.3 to enable event: cdr. Please help
Please post your issues to the trixbox.org forums. If there is something wrong with the build, we cannot help you. My understanding is that logging with 2.8.0.3 should just work.
Thank Kerry, I’ll do it.
On the CE system my outbound route to the SIP provider contains the following:
1800NXXXXXX
1866NXXXXXX
1877NXXXXXX
1888NXXXXXX
1NXXNXXXXXX
NXXNXXXXXX
NXXXXXX