News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Howto make OBi accept SIP registration

Started by weiqj, December 28, 2011, 12:04:06 PM

Previous topic - Next topic

weiqj

I am using 3CX to connect to OBi and I want OBi act as a gateway to route calls from 3CX.
However the OBi rejects registration from 3CX. Here is the error log from OBi:

<7> sendto c0a80bfe:5060(341)
SIP/2.0 404 Not Found
Call-ID: MjU2MTMwMzVhYThiZTZkMmVhZTg2MGVkN2U3Nzg0YTg.
CSeq: 1 INVITE
Content-Length: 0
From: "01"<sip:XXXXXXX@192.168.11.26:5061>;tag=f311cf0b
To: <sip:0000000@192.168.11.26:5061>
Via: SIP/2.0/UDP 192.168.11.254:5060;branch=z9hG4bK-d8754z-ad69734fb10cb325-1---
d8754z-;received=192.168.11.254;rport=5060

Is there any wrong?

RonR

The OBi is not a SIP server and will not accept SIP registration requests.

You can initiate calls through the OBi from a SIP client using unregistered SIP URI's (unauthenticated INVITE's).  Direct the SIP URI to port 5060 for SP1 and 5061 for SP2.  The target SPx Service must be configured for SIP.

weiqj

Thanks. I registered SP2 as a SIP client. Still can't make calls through it.

RonR

Quote from: weiqj on December 28, 2011, 01:29:01 PM
I registered SP2 as a SIP client.

Does this mean you have a SIP service provider configured on SP2 which you are able to use to make calls with?

What does the main status page of the OBi show for SP2 Service Status?

What is the SIP URI you are using from the SIP client?

weiqj

The SP2 connects to my 3CX server. The status is below:
Registered (server=192.168.11.254:5060; expire in 47s)

So it registered to the 3CX server.
I also use x-lite to connect to the 3CX server, which also works fine.

I set up outbound rule to forward calls in 3CX to OBi.
When I tried to make calls from x-lite, it failed. And 3CX reported receiving 404 error from OBi.

RonR

What is the SP2 InboundCallRoute?

Is this still what's being sent to the OBi?:

To: <sip:0000000@192.168.11.26:5061>

weiqj

It's set to L1.
Below is the reject sent to 3CX. I replaced my cell phone number to XXXXXX.

<7> SIP DLG reject: 503
<7> sendto c0a80bfe:5060(405)
SIP/2.0 503 Service Unavailable
Call-ID: M2FlZmFkZDkwNDFlOTEwOGE3Y2I3YTExNzcxNjNkMDk.
CSeq: 1 INVITE
Content-Length: 0
From: "Dad"<sip:10001@192.168.11.254:5060>;tag=50310c47
To: <sip:XXXXXXXXX@192.168.11.26:5061>;tag=SP2469b1d3b5a1d0ff7
Via: SIP/2.0/UDP 192.168.11.254:5060;branch=z9hG4bK-d8754z-de7e6b1699337370-1---
d8754z-;received=192.168.11.254;rport=5060
Server: OBIHAI/OBi110-1.3.0.2651


RonR

Quote from: weiqj on December 28, 2011, 03:10:24 PM
It's set to L1.

That's not a valid InboundCallRoute value.  Please tell me what the vaue is at:

Voice Services -> SP2 Service -> X_InboundCallRoute

weiqj

Sorry I set it to "LI1" according to this documentation: (default is ph)

http://www.3cx.com/forums/solution-to-using-obi110-with-3cx-phone-system-v10-21295.html

I am still getting 404 error.

<7> sendto c0a80bfe:5060(337)
SIP/2.0 404 Not Found
Call-ID: NjI5NTRkODI1YzNmMjRlNzRkMTk0OGY0YTYwOGJhZWI.
CSeq: 1 INVITE
Content-Length: 0
From: "Dad"<sip:10001@192.168.11.254:5060>;tag=ef21880c
To: <sip:XXXXXXXXXX@192.168.11.26:5061>
Via: SIP/2.0/UDP 192.168.11.254:5060;branch=z9hG4bK-d8754z-a739cd6aa14ab755-1---
d8754z-;received=192.168.11.254;rport=5060

RonR

Let's take small steps...

Set:

Voice Services -> SP2 Service -> X_InboundCallRoute : ph

and see if a call to any number rings the OBi PHONE Port.  This has to work before going any further.

weiqj

Set it to ph, same problem.
So that tutorial doesn't work?

RonR

weiqj,

I'm not an expert down at the SIP protocol level.  Looking at the syslog entry you provided, it's not clear to me what the OBi doesn't like about the INVITE from the 3CX server.  It's very similar to calls successfully initiated from my PAP2 to the OBi.  Normally, such calls get routed via the InboundCallRoute, which in this case, should ring the PHONE Port.

weiqj

Appreciate your help very much. Below is everything recorded from syslog, including the request. I have no idea why it won't work. (I only replaced the phone number with XXXXXXXXXX).

As a side note, OBi doesn't provide a way to trigger in response to events (incoming call, phone status etc). It is a feature some people, including me, are looking for. For example, they would want to automatically pause XBMC playback on incoming phone call.

Somebody wrote a perl script to keep track of the events. But it sends HTTP query for port status XML every second, which puts a lot of load on both client and OBi box.

I think the perfect solution is to watch syslog, it is triggered by UDP packets and will be the best way to solve the problem. I may build something like when I have time and share it with people. Now it's just some thoughts.


<7> RxFrom:c0a80bfe:5060
INVITE sip:XXXXXXXXXX@192.168.11.26:5061 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.254:5060;branch=z9hG4bK-d8754z-e9620904787a5d65-1---
d8754z-;rport
Max-Forwards: 70
Contact: <sip:10001@192.168.11.254:5060>
To: <sip:XXXXXXXXXX@192.168.11.26:5061>
From: "Home"<sip:10001@192.168.11.254:5060>;tag=8f7e9d6d
Call-ID: YWE4MjNlZjRiZDcwMTdkMDhjNzk1ZGY4Y2ZlNjE3ZWQ.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, IN
FO, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: 3CXPhoneSystem 10.0.22539.0
Content-Length: 410

v=0
o=- 12969595059572250 1 IN IP4 192.168.11.13
s=CounterPath X-Lite 4.1
c=IN IP4 192.168.11.13
t=0 0
a=ice-ufrag:54a623
a=ice-pwd:87158d76464039cf541a5507397aa163
m=audio 55036 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 192.168.11.13 55036 typ host
a=candidate:1 2 UDP 659134 192.168.11.13 55037 typ host
<7> sendto c0a80bfe:5060(337)
SIP/2.0 404 Not Found
Call-ID: YWE4MjNlZjRiZDcwMTdkMDhjNzk1ZGY4Y2ZlNjE3ZWQ.
CSeq: 1 INVITE
Content-Length: 0
From: "Dad"<sip:10001@192.168.11.254:5060>;tag=8f7e9d6d
To: <sip:XXXXXXXXXX@192.168.11.26:5061>
Via: SIP/2.0/UDP 192.168.11.254:5060;branch=z9hG4bK-d8754z-e9620904787a5d65-1---
d8754z-;received=192.168.11.254;rport=5060

<7> RxFrom:c0a80bfe:5060
ACK sip:XXXXXXXXXX@192.168.11.26:5061 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.254:5060;branch=z9hG4bK-d8754z-e9620904787a5d65-1---
d8754z-;rport
Max-Forwards: 70
To: <sip:XXXXXXXXXX@192.168.11.26:5061>
From: "Home"<sip:10001@192.168.11.254:5060>;tag=8f7e9d6d
Call-ID: YWE4MjNlZjRiZDcwMTdkMDhjNzk1ZGY4Y2ZlNjE3ZWQ.
CSeq: 1 ACK
Content-Length: 0

weiqj

Thanks a lot for your help. It now works. Problem is that II didn't have a chance to check what did I do wrong. It just worked all of a sudden.

joseacarras

Could you provide the final configuration you use so anyone could replicate it on the future?