Dial Plan for Incoming Calls

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
JRayfield
Posts: 147
Joined: Mon Dec 03, 2012 5:50 pm
Location: Springfield, MO

Dial Plan for Incoming Calls

Post by JRayfield »

1. Brekeke Product Name and Version:

Brekeke SIP Server 3.5 (BSS3)

2. Java version:

Not sure

3. OS type and the version:

Windows 7 Pro

4. UA (phone), gateway or other hardware/software involved:

3CX IP PBX Server

5. Your problem:

I'm trying to set up a dial plan for incoming calls, but not having any success.

My underlying VoIP carrier uses IP authentication, rather than username/password authentication. I'm attempting to route incoming calls to a specific DID number, into a 3CX IP PBX.

I have INVITE authentication OFF in BSS3.
xxx.xxx.xxx.xxx is the IP address of my underlying VoIP carrier.
yyy.yyy.yyy.yyy is the IP address of the 3CX IP PBX.
12223334444 is the DID number.

Here is my dialplan:

Matching Pattern:

$addr=^xxx.xxx.xxx.xxx$
$request=^INVITE
To=sip:(12223334444)@

Deploy Pattern:

$rtp=false
To=sip:%1@yyy.yyy.yyy.yyy
$target=yyy.yyy.yyy.yyy

When I call the DID from my cell phone, packet captures on the BSS3 server show that BSS3 never generates an INVITE out to 3CX. It does respond back to the underlying VoIP carrier with a "Trying" message, but doesn't 'pass on' the incoming call to the 3CX IP PBX.

What am I doing wrong here?

John
John Rayfield, Jr. CETma
Rayfield Communications
Springfield, MO
www.rayfield.net
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

Are there any other DialPlan rules which intercept or overwrite the above rule?
Check the [Dial Plan]->[History] to find matched rule.

Is it possible to make a call from the 3CX to another through Brekeke SIP Server?
JRayfield
Posts: 147
Joined: Mon Dec 03, 2012 5:50 pm
Location: Springfield, MO

Post by JRayfield »

The Dial Plan --> History doesn't show anything regarding "matched rule". However, the Error Log shows "no matched rules".

That is odd, since I know that the "To" line of the incoming call's Invite message matches the Match Rule that I posted here. And BSS3 responds to the VoIP carrier with a SIP 100 Trying message. BSS3 then sends a SIP 404 Not Found message to the VoIP carrier.

During this attempted incoming call, I don't see any SIP messages being sent to the 3CX IP PBX.

Outbound calls (from 3CX through BSS3) work fine.

John
John Rayfield, Jr. CETma
Rayfield Communications
Springfield, MO
www.rayfield.net
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

It seems $addr= or/and To= definition in Matching Pattern doesn't match with an incoming INVITE sent from the VoIP carrier.

When you capture INVITE packet, check its source IP address.
Is it the same IP address as $addr's ?
JRayfield
Posts: 147
Joined: Mon Dec 03, 2012 5:50 pm
Location: Springfield, MO

Post by JRayfield »

I double-checked that IP address and it was wrong. But, I'm now getting a different SIP error - 600 Busy Everywhere.

The BSS3 Error Log shows "call leg does not exist". And the IP address used in the "To", that should be going to the 3CX server, is still showing the IP address of BSS3. So, the Deploy Pattern doesn't appear to be doing anything yet.

John
John Rayfield, Jr. CETma
Rayfield Communications
Springfield, MO
www.rayfield.net
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

Do you have a DialPlan rule which sends "600 Busy Everywhere"?
If not, I suppose the 3CX sent the response.

Check the "600" response's Server: header.
Does it indicate the Brekeke SIP Server? or 3CX?
JRayfield
Posts: 147
Joined: Mon Dec 03, 2012 5:50 pm
Location: Springfield, MO

Post by JRayfield »

I'm getting nothing at all, either to or from, the 3CX server.

John
John Rayfield, Jr. CETma
Rayfield Communications
Springfield, MO
www.rayfield.net
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

Where did you find the "600 Busy Everywhere"?
Was it at Wireshark?

Can you paste the packet here?
Or let you check the Server: header.
JRayfield
Posts: 147
Joined: Mon Dec 03, 2012 5:50 pm
Location: Springfield, MO

Post by JRayfield »

Let me start over with a couple of things here. Maybe that will help.

I'm attempting to route an inbound call, coming from a VoIP carrier, through BSS3, and into a 3CX IP PBX.

The underlying VoIP carrier through which I'm receiving inbound calls, uses IP authentication. They do not require authentication of INVITE's.

The 3CX IP PBX does require authentication of INVITE's.

If I enable INVITE authentication in BSS3, then I have a problem with the VoIP carrier, as they won't send an INVITE with authentication when BSS3 sends a '407 Proxy Authentication' back to them.

So, I disable INVITE authentication in BSS3, and then BSS3 and the VoIP carrier appear to be 'happy' with each other.

However, this will create a problem, since 3CX is going to require an INVITE authentication with BSS3.

So, I need to configure the Dial Plan in BSS3 to not use INVITE authentication with the VoIP carrier, but to use it with 3CX.

I would expect to see a 'handshake' between the VoIP carrier and BSS3, and then a 'handshake' between BSS3 and the 3CX server. But, I never seen BSS3 even attempt to send any data to the 3CX server, even with INVITE authentication off on BSS3 and, what appears to be, a good 'match' between the VoIP carrier and BSS3.

I've looked for example Dial Plans for BSS3, to do something similar to what I'm trying to do (in effect, 'bridge' between a VoIP carrier and an IP PBX such as 3CX or Asterisk), but I haven't found anything that appears to be 'complete', that will work for this.

John
John Rayfield, Jr. CETma
Rayfield Communications
Springfield, MO
www.rayfield.net
JRayfield
Posts: 147
Joined: Mon Dec 03, 2012 5:50 pm
Location: Springfield, MO

Post by JRayfield »

So, I figured out what's happening. Now, I need to figure out -why- it's happening.

xxx.xxx.xxx.xxx = VoIP Carrier IP address
yyy.yyy.yyy.yyy = Brekeke SIP Server (BSS3) IP address
zzz.zzz.zzz.zzz = 3CX IP PBX IP address

12223334444 = DID number that is being dialed

When an inbound call to 12223334444 is routed from the VoIP carrier to BSS3, BSS3 does recognize it as a valid inbound call. It then sends an INVITE to zzz.zzz.zzz.zzz, the 3CX server.

The problem is that in the INVITE, sent to the 3CX server, the IP address used in the FROM line is the IP address of the VoIP carrier (xxx.xxx.xxx.xxx), and NOT the IP address of BSS3 (yyy.yyy.yyy.yyy). The 3CX server is not programmed to accept inbound calls to this DID from the VoIP carrier (xxx.xxx.xxx.xxx), but is programmed to accept inbound calls to this DID from BSS3 (yyy.yyy.yyy.yyy). So, the call is 'rejected' by the 3CX server (All Busy Here).

I want BSS3 to stay 'in the middle' of the call (not for RTP, but for SIP), that is not what is happening.

What's the easiest way to fix this kind of a problem? Put a new "FROM" line in the Deploy Pattern, so that the FROM that is in the INVITE to 3CX, has the correct IP address in it (the IP address of BSS3)?

John
John Rayfield, Jr. CETma
Rayfield Communications
Springfield, MO
www.rayfield.net
JRayfield
Posts: 147
Joined: Mon Dec 03, 2012 5:50 pm
Location: Springfield, MO

Post by JRayfield »

Finally got everything working. Found that calls were being limited in the 3CX server, too. Once that was fixed, then inbound calls work well.

Brekeke SIP Server has a lot of flexibility. And 3CX has a lot of flexibility. Add the two together and there isn't much that can't be done (if anything). But, along with flexibility comes a lot more complexity and a lot more chances to make a small mistake that will cause everything to not work correctly.

John
John Rayfield, Jr. CETma
Rayfield Communications
Springfield, MO
www.rayfield.net
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

Glad to know it seems you solved the issue.

If you need, you can replace From-URI by DialPlan before the 3CX receives an INVITE.
Post Reply