Contact too long

Status
Not open for further replies.

Daniele

Member
Feb 1, 2017
45
0
6
43
Hi,
I've a strange problem with a Voip provider.
Sometimes the registration fails with :

2017-02-02 18:54:28.070235 [WARNING] sofia_reg.c:505 01585d4d-efe0-4688-b74a-97e9f2f1bce9 Failed Registration [503], setting retry to 30 seconds.
2017-02-02 18:54:27.110239 [ERR] sofia_reg.c:2447 01585d4d-efe0-4688-b74a-97e9f2f1bce9 Failed Registration with status Contact too long [503]. failure #2

I traced the SIP traffic and I see that in the contact uri there is the name of the gateway that is the uuid and it's long. My guess is that some providers (this one is using Cirpak) make a strict validation of the uri and block that.
I tried to change the setting "Extension in contact" in the gateway setting and this permitted to register; but again ofter the gateway is offline due to the "Contact too long" error message.
Is there a way to format the contact in a short and more compatible way?

Thanks
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
I'm not sure if this should be a question for your supplier. I'm not sure if the RFC specifies a length but if it does and you are within it, then its a supplier problem. This is the first time in five years I have seen this error so I doubt if its freeswitch.
 

Daniele

Member
Feb 1, 2017
45
0
6
43
I'm waiting for the reply of the supplier. Anyway maybe it's a "problem" of fusionpbx because the name of the gateway is the uuid that is typically long.
I'll ping with more information of with the solution if I've news from the supplier.

Thanks
 

Daniele

Member
Feb 1, 2017
45
0
6
43
Hi,
the provider reply as I guessed:
This is the contact that the provider receive:
Contact: sip:gw+01585d4d-efe0-4688-b74a-97e9f2f1bce9@fusionpbxIp:5080;transport=udp;gw=01585d4d-efe0-4688-b74a-97e9f2f1bce9

Insted they say that the correct contact id should be:

sip: idNumber@ipOfProvider

Could I change how this contact header is set in fusionpbx?

Thanks
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
Can they not do an IP auth trunk then you would not have this problem? I do not see this as a valid fusionpbx problem. This same method works with hundreds of providers worldwide
 

Daniele

Member
Feb 1, 2017
45
0
6
43
Hi,
for sure they can do an auth trunk but I think it is not the point. The fact fusionpbx works with hunreds of providers doens't mean that could not be some bugs.
I guess that users with fusionpbx in Italy are not so many like in the rest of the world.

The provider has a Cirpak Thompson, so is not a small uncompliant provider. What I am asking if there is a way to change the contact header because seems that the way fusionpbx is using right now is not compliant with Cirpak Thompson.

Thanks
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
I absolutely do not accept that this is a FusionPBX/Freeswitch problem.

The actual sample contact quoted in RFC3261 is as follows:

Contact: "Mr. Watson" <sip:watson@worcester.bell-telephone.com>;q=0.7; expires=3600, "Mr. Watson" <mailto:watson@bell-telephone.com> ;q=0.1 m: <sips:bob@192.0.2.4>;expires=60

Any RFC compliant sip server should be able to accept this, if it can't then its their problem, they are not complying with the RFC. Moreover, I have searched Google and can find no reference to this error.

You may be better posting to the Freeswitch mailing list but I would guess their answer may well be the same. I do not know if the contact can safely be chopped about, certainly not generically anyway. You may be able to hack the code but then you could end up with it only working with that particular carrier.
 

Daniele

Member
Feb 1, 2017
45
0
6
43
Hi,
thanks for your reply. I think you are right and I'm investigating the problem with the provider. Seems anyway the real problem that prevent me also to make calls is that the from and Remote-Party-Id in INVITE packets cointains the extension number and not the username of the gateway I'm using.

Example: my extension number is 911@mydomain.com. This is part of the header fusionpbx/freeswitch send to the provider:

Code:
From: "911" <sip:911@myPbxIp>;tag=j7pj8mH3a83tF
Remote-Party-ID: "911" <sip:911@myPbxIp>;party=calling;screen=yes;privacy=off

The provider reply SIP/2.0 403 Wrong login or password. Instead the provider expects something like:

Code:
From: "911" <sip:02123456@myPbxIp>;tag=S67Zmj7Up6ZXg
Remote-Party-ID: "911" <sip:02123456@myPbxIp>;party=calling;screen=yes;privacy=off

where 02123456 is the username used to register to the provider.

I made a test, setting 02123456 into the field "Outbound Caller ID Number" inside the extension 911, and infact it works fine. Obviosly is not something desiderable because when the extension make an outboun call sometimes the call exits with the GatewayA, sometimes with the GatewayB and so the "Outbound Caller ID Number" should depend on the gateway that is used in that moment.

Is there some options in fusionpbx to allow this behaviour?

Thanks
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
Again, unless I am losing the plot, the way they want the rpid is wrong too:

A real rpid should work like so:

Remote-Party-ID: "Darren Williams" <sip:441617102180@myPbxIp>;party=calling;screen=yes;privacy=off

This translates in FusionPBX extension settings to:

Outbound Caller ID Name = Darren Williams
Outbound Caller Number = 441617102180
 

Daniele

Member
Feb 1, 2017
45
0
6
43
Hi,
in that case I think the provider is right. Infact what you wrote is correct. The problem is that fusionpbx is sending the request with sip:911 where 911 is the local extension. Instead it should be the phone number like you wrote in your example.

Sure, like you said I can write that data in the Outbound Caller ID Name and Outbound Caller Number in the extension number 911, but again is not so flexible because that extension could make a call with many providers and that parameters should bound to the gateway not to the extension.

I hope to explained better the problem.

Thanks
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
No, not at all, what you see in my Outbound Caller Number IS my outbound callerID so irrespective of the gateway I use it will always be the same.

I think what you are saying is they want SIP username in that field
 

Daniele

Member
Feb 1, 2017
45
0
6
43
I got your point. Yes, there want the username that is the same of the callerId.

And here in Italy the law doesn't permit you to use the same callerId using different gateways. For each gateway you should use a different outbound caller Id.
So what I should figure out is if there is a way to set the "from" and the "Remote-party-ID" specifically for each provider.

It's strange because I used Asterisk for years and also with default configuration I never had this kind of problems.

Thanks
 

Daniele

Member
Feb 1, 2017
45
0
6
43
Ok, finally I solved. My provider needed these two options active:

Caller ID In From: false
Extension In Contact: true

Now it seems work fine! Thanks
 
Status
Not open for further replies.