Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
SIP Server sending incoming calls back to ISDN gateway
Author Message
uhupfeld
Brekeke Talented


Joined: 08 Nov 2008
Posts: 77
Location: Brazil

PostPosted: Tue Nov 11, 2008 10:59 am    Post subject: SIP Server sending incoming calls back to ISDN gateway Reply with quote

1. Brekeke Product Name and version:SIP Server 2.1.6.6/239 (Academic)

2. Java version:1.6.0_02

3. OS type and the version:Windows 2003

4. UA (phone), gateway or other hardware/software involved: AVM FritzBox Fon 7170, Snom phone, QuesCom ISDN/GSM/IP gateway

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html : More like 2, but all phones are in the WAN and SIP Server is behind a router. ISDN gateway also in the WAN

6. Your problem:
The voip devices are registered to the SIP server and can make outbound calls without problems. Calls between registered users work also flawlessly. The dialing rule is very simple: If the dialed number isn't a currently registered number, the call shall be sent to the ISDN gateway:
Matching Patterns
$request = ^INVITE
$registered = false

Deploy Patterns
$target = xxx.xxx.xxx.xxx

The problem is that apparently the SIP server most of the times doesn't recognize when a voip device is registered at the point a call comes in from the ISDN gateway. As a result, and following the dialing rule, it sends the call back to the ISDN gateway.

The weird thing is that I can keep making calls between registered users.
Is this a bug?
Back to top
View user's profile
Andrey
Brekeke Addict


Joined: 21 Apr 2008
Posts: 29

PostPosted: Tue Nov 11, 2008 11:16 am    Post subject: Reply with quote

>> The problem is that apparently the SIP server most of the times doesn't recognize when a voip device is registered ...

Can you see the user's record in the [Registered Clients] page at that time?
Back to top
View user's profile
uhupfeld
Brekeke Talented


Joined: 08 Nov 2008
Posts: 77
Location: Brazil

PostPosted: Tue Nov 11, 2008 12:17 pm    Post subject: SIP Server sending incoming calls back to ISDN gateway Reply with quote

It surely shows as registered. I've even reduced registration timeout to 60 s, but now I'm back to 10 min. Didn't change anything.
And, I can make calls from one registered user to the other. This works!
Why isn't it recognizing the user as registered when receiving the call?
Back to top
View user's profile
uhupfeld
Brekeke Talented


Joined: 08 Nov 2008
Posts: 77
Location: Brazil

PostPosted: Wed Nov 12, 2008 3:13 am    Post subject: SIP Server sending incoming calls back to ISDN gateway Reply with quote

Seems like I'm having a problem much like in 2 other posts: depending from the direction I make the call between REGISTERED extensions I'm getting a 404 also.

Is this a UA or SIP Server issue?

Where can I find previous versions for download to check the SIP Server?
Back to top
View user's profile
Andrey
Brekeke Addict


Joined: 21 Apr 2008
Posts: 29

PostPosted: Wed Nov 12, 2008 11:37 am    Post subject: Reply with quote

I think some of your settings are wrong..

If you disable the above DialPlan rule, can you make calls between registered users without problems?

What kind of UA are you using?
Back to top
View user's profile
uhupfeld
Brekeke Talented


Joined: 08 Nov 2008
Posts: 77
Location: Brazil

PostPosted: Thu Nov 13, 2008 3:29 pm    Post subject: SIP Server sending incoming calls back to ISDN gateway Reply with quote

Now things are getting weird:
I was testing it all without authentication (passwords). I was getting in the UA a 503 response. I've changed user data, adding authentication on this specific UA (FritzBox Fon), and now the calls from this UA are working well, both to UAs as well as to PSTN numbers via ISDN gateway.
Still, incoming calls show the same behavior as previously: the call goes from the gw to the BSS and back to the gateway, generating a 406 Not acceptable (of course...)

It is as if the UA is registered to make outbound calls as well as to make and receive calls to other UAs, but it is always not registered when the call is coming from the outbound rule (the route to the gateway)
Back to top
View user's profile
Andrey
Brekeke Addict


Joined: 21 Apr 2008
Posts: 29

PostPosted: Mon Nov 17, 2008 11:18 am    Post subject: Reply with quote

Try "$registered(To)=false" instead of "$registered=false" in the DialPlan.
Back to top
View user's profile
uhupfeld
Brekeke Talented


Joined: 08 Nov 2008
Posts: 77
Location: Brazil

PostPosted: Wed Nov 19, 2008 4:13 am    Post subject: SIP Server sending incoming calls back to ISDN gateway Reply with quote

Andrey, it didn't work either!
Below is the SIP flow according to the BSS. Please note that nothing shows up in the Active Sessions but after the call is gone there is an entry in the call log, with a Cancel.
xxx.xxx.xxx.xxx is the gateway, yyy.yyy.yyy.yyy is BSS, zzz.zzz.zzz.zzz is the UA (note it never shows up)

|Time | xxx.xxx.xxx.xxx | yyy.yyy.yyy.yyy |
|12,787 | INVITE SDP ( g729 g711A g711U) |SIP From: sip:12345678@yyy.yyy.yyy.yyy To:sip:2222@yyy.yyy.yyy.yyy
| |(5060) ------------------> (5060) |
|12,789 | 100 Trying| |SIP Status
| |(5060) <------------------ (5060) |
|12,799 | INVITE SDP ( g729 g711A g711U) |SIP Request
| |(5060) <------------------ (5060) |
|12,802 | 100 Trying| |SIP Status
| |(5060) ------------------> (5060) |
|12,804 | CANCEL | |SIP Request
| |(5060) ------------------> (5060) |
|12,806 | 406 Not Acceptable |SIP Status
| |(5060) ------------------> (5060) |
|12,806 | 200 OK | |SIP Status
| |(5060) <------------------ (5060) |
|12,806 | CANCEL | |SIP Request
| |(5060) <------------------ (5060) |
|12,807 | 406 Not Acceptable |SIP Status
| |(5060) <------------------ (5060) |
|12,810 | ACK | |SIP Request
| |(5060) ------------------> (5060) |
|12,811 | ACK | |SIP Request
| |(5060) <------------------ (5060) |
|12,815 | 200 Ok | |SIP Status
| |(5060) ------------------> (5060) |
Back to top
View user's profile
Andrey
Brekeke Addict


Joined: 21 Apr 2008
Posts: 29

PostPosted: Thu Nov 20, 2008 12:37 pm    Post subject: Reply with quote

If you dial an unregistered device from a registered device, does the SIP Server forward the call to the ISDN gateway by the DialPlan?
Back to top
View user's profile
uhupfeld
Brekeke Talented


Joined: 08 Nov 2008
Posts: 77
Location: Brazil

PostPosted: Thu Nov 20, 2008 4:34 pm    Post subject: Reply with quote

Yes, a call from a registered user to a non-registered user is directed to the gateway.

This is what I don't understand: most UAs behave normally and make and receive calls to the gateway and to other registered users; a few UAs, though, officially register with the BSS and can make and receive calls to/from other registered UAs, but when the call comes from the gateway it is as if it isn't registered.
Back to top
View user's profile
Andrey
Brekeke Addict


Joined: 21 Apr 2008
Posts: 29

PostPosted: Mon Nov 24, 2008 11:35 am    Post subject: Reply with quote

Can you paste an INVITE packet which the gateway sent?
We need to check what kind of INVITE the gateway sends.
Back to top
View user's profile
uhupfeld
Brekeke Talented


Joined: 08 Nov 2008
Posts: 77
Location: Brazil

PostPosted: Tue Nov 25, 2008 10:29 am    Post subject: SIP Server sending incoming calls back to ISDN gateway Reply with quote

Hi Andrew, below is the INVITE packet, where:
SIP_UA is the called extension (BSS User)
BSS_IP is the IP address of the BSS
ISDN_GW_IP is the IP address of the gateway and
55551212 is the caller number


No. Time Source Destination Protocol Info
78 11.018114 ISDN_GW_IP BSS_IP SIP/SDP Request: INVITE sip:SIP_UA@BSS_IP:5060, with session description

Frame 78 (778 bytes on wire, 778 bytes captured)
Ethernet II, Src: AdlinkTe_02:d5:7e (00:30:64:02:d5:7e), Dst: Draytek_27:51:22 (00:50:7f:27:51:22)
Internet Protocol, Src: ISDN_GW_IP (ISDN_GW_IP), Dst: BSS_IP (BSS_IP)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol
Request-Line: INVITE sip:SIP_UA@BSS_IP:5060 SIP/2.0
Method: INVITE
[Resent Packet: False]
Message Header
From: <sip:55551212@BSS_IP>;tag=q-1021-7b46
SIP from address: sip:55551212@BSS_IP
SIP tag: q-1021-7b46
To: <sip:SIP_UA@BSS_IP>
SIP to address: sip:SIP_UA@BSS_IP
Contact: <sip:55551212@ISDN_GW_IP>
Contact Binding: <sip:55551212@ISDN_GW_IP>
URI: <sip:55551212@ISDN_GW_IP>
Call-ID: 12872106778958032@ISDN_GW_IP
CSeq: 13576 INVITE
Sequence Number: 13576
Method: INVITE
Max-Forwards: 70
Content-Length: 197
Allow: INVITE, BYE, ACK, CANCEL, REGISTER, OPTIONS, REFER, NOTIFY, INFO
Record-Route: <sip:ISDN_GW_IP>
Via: SIP/2.0/UDP ISDN_GW_IP:5060;branch=z9hG4bKynjtkcyC175659738964
Transport: UDP
Sent-by Address: ISDN_GW_IP
Sent-by port: 5060
Branch: z9hG4bKynjtkcyC175659738964
Content-Type: application/sdp
User-Agent: QuesCom SIP Gateway 5.00.019
Message body
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): QuesCom 15682 15682 IN IP4 ISDN_GW_IP
Owner Username: QuesCom
Session ID: 15682
Session Version: 15682
Owner Network Type: IN
Owner Address Type: IP4
Owner Address: ISDN_GW_IP
Session Name (s): NonSIP
Connection Information (c): IN IP4 ISDN_GW_IP
Connection Network Type: IN
Connection Address Type: IP4
Connection Address: ISDN_GW_IP
Time Description, active time (t): 0 0
Session Start Time: 0
Session Stop Time: 0
Media Description, name and address (m): audio 11660 RTP/AVP 18 8 0
Media Type: audio
Media Port: 11660
Media Proto: RTP/AVP
Media Format: ITU-T G.729
Media Format: ITU-T G.711 PCMA
Media Format: ITU-T G.711 PCMU
Media Attribute (a): rtpmap:18 g729/8000/1
Media Attribute Fieldname: rtpmap
Media Format: 18
MIME Type: g729
Media Attribute (a): rtpmap:8 pcma/8000/1
Media Attribute Fieldname: rtpmap
Media Format: 8
MIME Type: pcma
Media Attribute (a): rtpmap:0 pcmu/8000/1
Media Attribute Fieldname: rtpmap
Media Format: 0
MIME Type: pcmu
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Sun Nov 30, 2008 1:20 am    Post subject: Reply with quote

I don't know what's wrong .

Is the gateway in the same LAN?
Do you have any other DialPlan rules?
Are you sure the destination user (SIP_UA) is registered in the server?
Can you try another gateway instead of QuesCom?

I think you need to ask Brekeke to analyze your settings.
Back to top
View user's profile
jaldulaimi
Brekeke Member


Joined: 30 Mar 2008
Posts: 17
Location: Sydney

PostPosted: Tue Apr 27, 2010 6:02 pm    Post subject: Reply with quote

Hi,

Did you fix your problem? It's seems the same as mine, do you mind if you fixed the problem pass the solution to me.

Regard,

Jassem

support@itcplus.com.au
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