Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
REGISTER - 400 BAD REQUEST
Author Message
Baxter
Brekeke Junior Member


Joined: 11 Oct 2011
Posts: 5

PostPosted: Tue Oct 11, 2011 4:29 am    Post subject: REGISTER - 400 BAD REQUEST Reply with quote

1. Brekeke Product Name and version: Version 2.4.8.6 Evaluation

2. Java version: 6U27

3. OS type and the version: Windows 7 32bit

4. UA (phone), gateway or other hardware/software involved: X-Lite 3.0, Cisco 2901 VGW

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html : Pattern2

6. Your problem:

Hi,

I am performing some comparison tests between Kamailio and Brekeke, discovering the following issue:

UAC send three REGISTER messages to Brekeke in the following order:

1) FROM: sip:1@[BrekekeIP]
TO: sip:1@[BrekekeIP]
Contact: sip:1@[UAC IP]:5060

2) FROM: sip:2@[BrekekeIP]
TO: sip:2@[BrekekeIP]
Contact: sip:1@[UAC IP]:5060

3) FROM: sip:3@[BrekekeIP]
TO: sip:3@[BrekekeIP]
Contact: sip:1@[UAC IP]:5060

REGISTER 1 is accepted, but 2 and 3 denied with 400 Bad Request. The Registers Client tab shows just one entry for User 1. None entries for 2 and 3.

Doing the same with Kamailio works. I got and AOR for sip:2@[BrekekeIP] and sip:3@[BrekekeIP] with the contact of the UAC.

Does Brekeke not support AOR out of the box? Any configuration or parameter settings to change?

Thanks a lot for your help!
Br
Michael
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Tue Oct 11, 2011 12:54 pm    Post subject: Reply with quote

What kind of SIP UA are you using for sending these REGISTER packets?

Is the Contact-URI parseable?

Can you paste these REGISTER packets here?
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Tue Oct 11, 2011 12:57 pm    Post subject: Reply with quote

The "400 Bad Request" will happen if...
- Contact URI points the SIP Server's IP address.
- There are syntax errors in a REGISTER packet.
Back to top
View user's profile
Baxter
Brekeke Junior Member


Joined: 11 Oct 2011
Posts: 5

PostPosted: Wed Oct 12, 2011 1:00 am    Post subject: Reply with quote

Hi,

Yes, the contact URI of Register 2 and 3 is pointing to the Brekeke IP.

Why I haven`t seen that before?? ;(

I have to check if this is not correct according to RFC and why it is working with Kamailio SIP Server.

Maybe you have some hints?

Thanks!
Mike
Back to top
View user's profile
Baxter
Brekeke Junior Member


Joined: 11 Oct 2011
Posts: 5

PostPosted: Wed Oct 12, 2011 4:43 am    Post subject: Reply with quote

Baxter wrote:
Hi,

Yes, the contact URI of Register 2 and 3 is pointing to the Brekeke IP.

Why I haven`t seen that before?? ;(

I have to check if this is not correct according to RFC and why it is working with Kamailio SIP Server.

Maybe you have some hints?

Thanks!
Mike


Hi,

I have screended some RFCs, mainly 3261, an up to know I found no indication that using the Registrar/Proxy IP in the contact is not allowed.

The AOR in the Kamailio user list shows:

AOR:: 2@[KamailioIP]
Contact:: sip:1@[KamailioIP] Q=
Expires:: 3596
Callid:: 1784755736-26526224-1318416579934@[UAC IP]
Cseq:: 1
User-agent:: SipTapi
State:: CS_SYNC
Flags:: 0
Cflag:: 0
Socket:: udp:[KamailioIP]:5060
Methods:: 4294967295

AOR:: 1@[Kamailio IP]
Contact:: sip:1@[UAC IP]:5060 Q=
Expires:: 3596
Callid:: 3523753626-26526224-1318416579933@[UAC IP]
Cseq:: 1
User-agent:: SipTapi
State:: CS_SYNC
Flags:: 0
Cflag:: 0
Socket:: udp:[KamailioIP]:5060
Methods:: 4294967295


So AOR 1 refers with the contact to AOR 2, which has the UAC as contact.

Any ideas how this can be realized with Brekeke??

Br
Mike
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Wed Oct 12, 2011 11:02 am    Post subject: Reply with quote

>> Yes, the contact URI of Register 2 and 3 is pointing to the Brekeke IP.

It is the reason.

Why does your UA point the SIP server's address in a Contact?


Anyway.. try the following DialPlan rule which will work as you want.

Matching Patterns
$request = ^REGISTER
$localhost( Contact ) = true
$reguri( Contact ) = (.+)
Deploy Patterns
Contact = %1
$action = register
Back to top
View user's profile
Baxter
Brekeke Junior Member


Joined: 11 Oct 2011
Posts: 5

PostPosted: Thu Oct 13, 2011 1:20 am    Post subject: Reply with quote

Hi,

because if I call AOR 2@[BrekekeIP] from the VGW, every UAC registered for this AOR should ring.

You can name this implicit registration.

With the provided DailPlan, just one UAC is ringing, even I have 2 registration entries for User 2, namely the contact of UAC A and B.

In the wireshark trace, I can see that Brekeke is forwarding the Call to just one registered UAC, not to both (no parallel forking).

I found some old threats (2007), that Brekeke SIP Server is not supporting forking. Is this still valid?

Found no clear indication that it is supported by the PBX too: http://www.sip.by/buy/buy_edition_comparison.php

Br
Mike
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Thu Oct 13, 2011 11:14 am    Post subject: Reply with quote

if you want to use a forking, let you try Brekeke PBX which has the feature.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1