Fax server not working

Status
Not open for further replies.
Port 10000 is set in the fax config files, I even tried changing them to 10002 but that only made 3cx send out 10004.
I have no firewall and firewall check's out all pass. This is strange.
 
I was so concerned with the port 10000 that I missed the obvious!

You are getting G711 codecs and not switched to T38. Your 3Cx did not send a request back to broadvox to use t38.

I bet you missed the very last step in the fax configuration setup.

You need to go into Settings > Advanced > Custom Parameters, scroll down until you see the FAXDIRECTSDP parameter and set it to 1. Then restart the whole 3cx (I find this works better as it rereads the configurations).

Then try it.
 
It is set 1, it always has been.
 
Your 3cx is not sending a reinvite on t38 for the fax (see #4 in your wireshark).

If your FaxDirectSDP is 1 then there is most likely an error in your config files.

Can you post or IM me the 2 fax config files please?
 
I'm having *exactly* the same problem. I've setup everything as per the guide, and yes, FAXDIRECTSDP is definitely 1 (and always was). 3CX does not send a T.38 re-invite back.

One thing that will help understand this... on what basis does 3CX decide to send this re-invite back? Is it simply because the particular line/DID is configured to receive a fax, as it is in my case? Or is 3CX expecting some kind of value or header from the VoIP provider, and only then making the decision to send the re-invite? I've asked my VoIP provider and they say that T.38 is definitely supported and working for other clients (though I doubt they meant specifically for 3CX users).

I'm just trying to understand the signal flow here. Maybe I can trick 3CX to see some kind of header it's expecting, and then it will send the re-invite. The call is definitely being routed through to the fax extension, and all of that. But just like for 'djboxny', it uses port 10002/10003, instead of 10000, even though I definitely have it set to 10000 in the fax config files (in both places). And I, like 'djboxny', also tried setting that value to 10002 after I saw it using that, but just like him, 3CX then decided to use 10004/10005. So my issue appears to be very related to his problem.

Does anyone have any more info on this? It's so frustrating!

I'm using the latest build of version 9, licensed version.

There's some T.38 fax properties that are commented out in one of those fax service config files. Maybe they are supposed to be uncommented out and are only that way because I initially had the trial version of 3CX phone system installed on this machine?
 
There are some lines supposed to be commented out in the two provisioning files.

3cx sends the reinvite back based on the inbound rules you have set which should send to fax of extension xxx. As soon as it processes that rule then it will start the fax server and send the invite back for t38.

Are you sending to the default fax extension or for a user? Do you have port 5090 open on your firewall?

Try calling the fax number from your cell phone and seeing if the rule is processed in 3cx first (you should see something along the lines of "user=fax" in the 3cx logs when the call is first answered by 3cx. Then run a wireshark to see the reinvite (it is a sip header so filter for sip).
 
Thanks abc123! Actually I've already done some Wireshark captures and managed to find out what is going on (at my end, at least).

3CX does indeed send the T.38 re-INVITE back, and always has been, but you'd never know it from the logs it produces in the GUI ("Server Activity Log"). I can see now that it's quite normal for 3CX to use port 10002/10003 for the initial audio RTP connection. That connection only lasts for a second though, and then 3CX sends the re-invite back to the VoIP provider and does indeed use port 10000 as per the config file (though you don't see any this in the 3CX logs -- you have to use Wireshark).

I still don't have faxing working. My VoIP provider seems to be ignoring the T.38 packets coming back at it, even though it accepts the T.38 re-invite and provides a media IP and port to use in its SIP SDP. So no audio is heard at the other end, no matter which phone or fax machine I call from. But at least I can see from the Wireshark captures that 3CX is indeed sending out the T.38 v21-preamble (fax handshaking signal), etc. It's just that that never gets converted to audio to make it through to the other end of the call.

I don't expect to hear the fax tones when calling from an internal extension or some phone on my SIP network as I realise that usually won't work and is therefore not a good test. All of my test calls are from another regular line/fax machine, or cell phone.

I've contacted my provider and hope to hear more back from them. They've already assured me that they definitely support T.38 and that many customers are using it. And based on the Wireshark captures I can even see that they're advertising T.38 in the initial SIP INVITE SDP that they send when a call arrives. So I don't doubt that they do indeed support T.38. But for some reason, the 3CX-generated T.38 packets are being rejected or ignored by the provider. I've checked that they're being sent to the correct IP/port that the provider specifies in the SDP after accepting the re-invite, and they are.

So I'm really at a loss now. Are there just weird compatibility problems with T.38 that could cause the protocol to fail in many environments? I want to tweak values, but nothing in the 3CX Fax Service provisioning files are really properly documented, other than the basic network/NAT settings.

Yes, I have all the appropriate ports open and I can clearly see the traffic coming in and leaving correctly (except I don't seem to get any T.38 packets from the VoIP provder on port 10000 -- but the port is definitely open and forwarded and 3CX is correctly specifying it in the SDP of the re-invite, so I think this is related to the whole general issue that the provider doesn't seem to like 3CX T.38 packets).

It makes me wonder, is this whole "initiate call, wait for one second, then re-invite back using T.38" the typical way of handling FoIP? Or is it just a 3CX thing? (Sure, I know the concept of re-invites in general is pretty standard, but I mean in relation to handling fax calls). Maybe some providers just aren't geared up for that approach. They say they have heaps of customers using Asterisk with T.38, so I'm wondering if Asterisk uses the same approach.

Any thoughts at this stage are really helpful!

And any explanations for some of the values in the provisioning files. Eg. I can see that in the default in_session.cfg the "T.38 remote capabilities" section has TCP parameters that are commented out. Are these important if TCP is to be used, in relation to the "kind of T.38 transport = " setting above. There's a comment about this latter setting, but it doesn't also mention those TCP settings below. Anyway, I'm using UDP and expecting it should work as a baseline. Also the "incoming call no filter = FALSE" setting in the "T.38 media address" section is possibly of interest, but not documented anywhere. Even Google doesn't bring up anything much for any of these settings except for basically a couple of posts on this forum (now my post will cause more!).

Cheers!
 
Firstly check your firewall on the network.

What are you using?

I have one that had an attack prevention system and a "Sip helper" I turned off the sip helper as I found it was hijacking the invites and changing the ip.

The clue that I had was when I sat down with Broadvox (our sip provider) and we sent a test fax and both ran a wireshark at the same time.

I could see the reinvite going out correctly and Broadvox could see their acknowledgement going back correctly from them but when we received it inside the sdp details their address had been changed to another (in india!). We first thought someone was hijacking our packets but later i looked into our gateway router (ie after broadvox but before 3cx server) and made some changes there. It was changing the ip based on what it thought was an attack.

So just because your wireshark captures look ok, delve into the details in the response back from your provider. It is pretty simple. Also a good hint is if you see the t38 preamble then look to see where it is going (ie the destination address) to make sure it is to your provider (this was my first hint something was up).

What you should be looking for in your wireshark is your t38 reinvite going out (as an sip/sdp) which you should look into the details to make sure the ips are correct.

Then you will get a response back from the provider (usually saying wait while we process it). Then a second 200 (? from memory) response acknowledging that invite - check the details match. Then you should start seeing your t38s go out to the provider. Make sure your provider is seeing them come in.

If you get that far without fixing it let me know.
 
Yep, that's the thing. The T.38 preamble, etc (in fact ALL traffic to do with the call) is going out to the correct IP of the provider.

The firewall is a SnapGear SG560 box. It does have a SIP proxy feature, but that's disabled, and I've been using these boxes for years and am very familiar with them. All regular SIP calls work fine. It's just the T.38 stuff.

The only thing that's a little confusing (because I haven't delved deep enough into SIP to understand it) is that there is another IP address referenced in the SIP INVITE from the provider in the SIP message header in the "Contact" field. 3CX never sends any packets to this alternative IP, though it does reference it when sending the re-invite, appropriately also in the "Contact" field.

So I guess my question is, is it correct that 3CX would send the re-invite back to the main provider IP and not the IP mentioned in the Contact field? I'm assuming that the Contact field is more like a handle, than the actual address you're supposed to send SIP messages to (although in many cases they will obviously be the same IP).

So basically, all packets going back and forth between my system and the VoIP provider are all between my system's IP and the VoIP provider's primary IP address. But there is another IP referenced in the Contact field of SIP messages from the provider. The actual SDP body, on the other hand, specifically references the provider's main IP (and a seemingly random port each time) as the place to send RTP or T.38 media to, and 3CX does indeed send to this.

But no, there's no strange IPs in there (unless you count this alternative IP that the provider seems to reference in their SIP INVITES in the Contact field). So I don't think it's anything to do with firewall. And I am receiving the initial PCMA packets from the provider for the short duration of time that the call remains a regular audio call -- these are on port 10002 as previously mentioned for both myself and 'djboxny' (and these get through fine because I have port forwarding configured for ports 10000 to 10049 even though the 3CX fax notes say that you only really need 10000 itself open).
 
This sounds like a provider problem not your end.

The only thing i can advise (I dont know who your provider is - we use Broadvox and they are great for support) is to call their support (not email) and run a wireshark at the same time to see where it is getting lost.
 
I've got the same problem. Of the 3 vendors I've tried it seems the only one that supports T.38 properly was Bandwidth. So I setup an account with T.38faxing.com who use a cisco gateway connected directly to the PSTN via PRI, and I'm still not able to get the 3cx Faxserver to recieve a fax.

I noticed in the log that the initial connection shows up as:
12:35:38.621 [CM503010]: Making route(s) to <sip:8888@outside_ip_address:5060;user=fax>

but then when it runs the script it changes to:
12:35:38.636 [CM503004]: Call(204): Route 1: @[Dev:sip:8888@outside_ip_address:5100;user=phone]

It's almost as if after that change it treats the call as a voice call not a fax.
 
Status
Not open for further replies.