Project

General

Profile

Actions

Bug #6429

closed

DIVF talks IAX to itself on certain calls, dropping Bearer Capability

Added by cquirin 30 days ago. Updated 29 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
services
Target version:
-
Start date:
04/03/2024
Due date:
% Done:

100%


Description

Hairpin call cquirin to cquirin 493013285587

cquirin asterisk sends:

[2024-04-02 19:13:39] PRI Span: 1 > DL-DATA request
[2024-04-02 19:13:39] PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=43
[2024-04-02 19:13:39] PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 7/0x7) (Sent from originator)
[2024-04-02 19:13:39] PRI Span: 1 > Message Type: SETUP (5)
[2024-04-02 19:13:39] PRI Span: 1 TEI=0 Transmitting N(S)=0, window is open V(A)=0 K=7
[2024-04-02 19:13:39] PRI Span: 1
[2024-04-02 19:13:39] PRI Span: 1 > TEI: 0 State 7(Multi-frame established)
[2024-04-02 19:13:39] PRI Span: 1 > V(A)=0, V(S)=0, V(R)=0
[2024-04-02 19:13:39] PRI Span: 1 > K=7, RC=1, l3_initiated=0, reject_except=0, ack_pend=0
[2024-04-02 19:13:39] PRI Span: 1 > T200_id=0, N200=3, T203_id=8192
[2024-04-02 19:13:39] PRI Span: 1 > [ 00 01 00 00 08 02 00 07 05 04 02 88 90 18 03 a1 83 81 6c 0b 11 81 34 39 39 36 32 31 37 33 31 70 0d 91 34 39 33 30 31 33 32 38 35 35 38 37 a1 ]
[2024-04-02 19:13:39] PRI Span: 1 > Informational frame:
[2024-04-02 19:13:39] PRI Span: 1 > SAPI: 00 C/R: 0 EA: 0
[2024-04-02 19:13:39] PRI Span: 1 > TEI: 000 EA: 1
[2024-04-02 19:13:39] PRI Span: 1 > N(S): 000 0: 0
[2024-04-02 19:13:39] PRI Span: 1 > N(R): 000 P: 0
[2024-04-02 19:13:39] PRI Span: 1 > 43 bytes of data
[2024-04-02 19:13:39] PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=43
[2024-04-02 19:13:39] PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 7/0x7) (Sent from originator)
[2024-04-02 19:13:39] PRI Span: 1 > Message Type: SETUP (5)
[2024-04-02 19:13:39] PRI Span: 1 > [04 02 88 90]
[2024-04-02 19:13:39] PRI Span: 1 > Bearer Capability (len= 4) [ Ext: 1 Coding-Std: 0 Info transfer capability: Unrestricted digital information (8)
[2024-04-02 19:13:39] PRI Span: 1 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
[2024-04-02 19:13:39] PRI Span: 1 > [18 03 a1 83 81]
[2024-04-02 19:13:39] PRI Span: 1 > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
[2024-04-02 19:13:39] PRI Span: 1 > ChanSel: As indicated in following octets
[2024-04-02 19:13:39] PRI Span: 1 > Ext: 1 Coding: 0 Number Specified Channel Type: 3
[2024-04-02 19:13:39] PRI Span: 1 > Ext: 1 Channel: 1 Type: CPE]
[2024-04-02 19:13:39] PRI Span: 1 > [6c 0b 11 81 34 39 39 36 32 31 37 33 31]
[2024-04-02 19:13:39] PRI Span: 1 > Calling Party Number (len=13) [ Ext: 0 TON: International Number (1) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
[2024-04-02 19:13:39] PRI Span: 1 > Presentation: Presentation allowed, User-provided, verified and passed (1) '499621731' ]
[2024-04-02 19:13:39] PRI Span: 1 > [70 0d 91 34 39 33 30 31 33 32 38 35 35 38 37]
[2024-04-02 19:13:39] PRI Span: 1 > Called Party Number (len=15) [ Ext: 1 TON: International Number (1) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) '493013285587' ]
[2024-04-02 19:13:39] PRI Span: 1 > [a1]
[2024-04-02 19:13:39] PRI Span: 1 > Sending Complete (len= 1)

Note that the bearer capability is "Unrestricted Digital"

The call comes back as follows:

[2024-04-02 19:13:40] PRI Span: 1 < TEI: 0 State 7(Multi-frame established)
[2024-04-02 19:13:40] PRI Span: 1 < V(A)=1, V(S)=1, V(R)=1
[2024-04-02 19:13:40] PRI Span: 1 < K=7, RC=1, l3_initiated=0, reject_except=0, ack_pend=0
[2024-04-02 19:13:40] PRI Span: 1 < T200_id=0, N200=3, T203_id=8192
[2024-04-02 19:13:40] PRI Span: 1 < [ 02 01 02 02 08 02 00 01 05 a1 04 03 80 90 a3 18 03 a1 83 82 28 0f 4f 43 54 4f 49 2d 34 39 39 36 32 31 37 33 31 6c 0b 10 81 34 39 39 36 32 31 37 33 31 70 0c 80 30 33 30 31 33 32 38 35 35 38 37 ]
[2024-04-02 19:13:40] PRI Span: 1 < Informational frame:
[2024-04-02 19:13:40] PRI Span: 1 < SAPI: 00 C/R: 1 EA: 0
[2024-04-02 19:13:40] PRI Span: 1 < TEI: 000 EA: 1
[2024-04-02 19:13:40] PRI Span: 1 < N(S): 001 0: 0
[2024-04-02 19:13:40] PRI Span: 1 < N(R): 001 P: 0
[2024-04-02 19:13:40] PRI Span: 1 < 60 bytes of data
[2024-04-02 19:13:40] PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=60
[2024-04-02 19:13:40] PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 1/0x1) (Sent from originator)
[2024-04-02 19:13:40] PRI Span: 1 < Message Type: SETUP (5)
[2024-04-02 19:13:40] PRI Span: 1 < [a1]
[2024-04-02 19:13:40] PRI Span: 1 < Sending Complete (len= 1)
[2024-04-02 19:13:40] PRI Span: 1 < [04 03 80 90 a3]
[2024-04-02 19:13:40] PRI Span: 1 < Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
[2024-04-02 19:13:40] PRI Span: 1 < Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
[2024-04-02 19:13:40] PRI Span: 1 < User information layer 1: A-Law (35)
[2024-04-02 19:13:40] PRI Span: 1 < [18 03 a1 83 82]
[2024-04-02 19:13:40] PRI Span: 1 < Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
[2024-04-02 19:13:40] PRI Span: 1 < ChanSel: As indicated in following octets
[2024-04-02 19:13:40] PRI Span: 1 < Ext: 1 Coding: 0 Number Specified Channel Type: 3
[2024-04-02 19:13:40] PRI Span: 1 < Ext: 1 Channel: 2 Type: CPE]
[2024-04-02 19:13:40] PRI Span: 1 < [28 0f 4f 43 54 4f 49 2d 34 39 39 36 32 31 37 33 31]
[2024-04-02 19:13:40] PRI Span: 1 < Display (len=15) [ OCTOI-499621731 ]
[2024-04-02 19:13:40] PRI Span: 1 < [6c 0b 10 81 34 39 39 36 32 31 37 33 31]
[2024-04-02 19:13:40] PRI Span: 1 < Calling Party Number (len=13) [ Ext: 0 TON: International Number (1) NPI: Unknown Number Plan (0)
[2024-04-02 19:13:40] PRI Span: 1 < Presentation: Presentation allowed, User-provided, verified and passed (1) '499621731' ]
[2024-04-02 19:13:40] PRI Span: 1 < [70 0c 80 30 33 30 31 33 32 38 35 35 38 37]
[2024-04-02 19:13:40] PRI Span: 1 < Called Party Number (len=14) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '03013285587' ]

Note that the bearer capability has changed to "Speech, alaw"

A look on tailon explains what is going on:

1. DIVF receives the call

2024-04-03_03:13:39.833767 <cquirin/Q931:INFO> Received message (0x7f3e2c001470)-----
SETUP
[From initiator=true CallRef=7] 08 02 00 07 05
Bearer capability (codeset=0 type=4) 04 02 88 90
transfer-cap=udi
transfer-mode=circuit
transfer-rate=64kbit
Channel identification (codeset=0 type=24) 18 03 a1 83 81
interface-bri=false
channel-exclusive=false
d-channel=false
channel-select=present
channel-by-number=true
type=B
channels=1
Calling number (codeset=0 type=108) 6c 0b 11 81 34 39 39 36 32 31 37 33 31
type=international
plan=isdn
presentation=allowed
screening=user-provided-passed
number=499621731
Called number (codeset=0 type=112) 70 0d 91 34 39 33 30 31 33 32 38 35 35 38 37
type=international
plan=isdn
number=493013285587
Sending complete (codeset=0 type=161) a1
-----

The bearer capability of course is "unrestricted digital".

2. Now DIVF does something amazing: it chooses IAX as an outgoing route and looks up
49 30 1328 5587

It finds its own IP address and

3. DIVF talks IAX to itself

2024-04-03_03:13:40.091175 <iaxengine:INFO> Sending frame [0x5607f43768d0]-----
IAX (0x06) - NEW (0x00000001)
Outgoing to 213.95.46.30:4569 (Local address: 213.95.46.30:4569)
Call (Local:Remote): 11788:0. Timestamp: 2. Retrans: false. Sequence numbers: Out: 0 In: 0
VERSION: 0x0002
USERNAME: cnetguest
CALLING_NUMBER: 499621731
CALLINGTON: 0x10 (international)
CALLINGPRES: 0x01 (allowed,user-provided-passed)
CALLINGTNS: 0x0000
CALLING_NAME: OCTOI-499621731
CALLED_NUMBER: 493013285587
FORMAT: 0x00000008 (G.711 a-law)
CAPABILITY: 0x0000000c (G.711 mu-law,G.711 a-law)
CODEC_PREFS:
CALLTOKEN:
-----

and incoming:

2024-04-03_03:13:40.092991 <iaxengine:INFO> Received frame [0x5607f43768d0]-----
IAX (0x06) - NEW (0x00000001)
Incoming from 213.95.46.30:4569 (Local address: 213.95.46.30:4569)
Call (Local:Remote): 0:11788. Timestamp: 2. Retrans: false. Sequence numbers: Out: 0 In: 0
VERSION: 0x0002
USERNAME: cnetguest
CALLING_NUMBER: 499621731
CALLINGTON: 0x10 (international)
CALLINGPRES: 0x01 (allowed,user-provided-passed)
CALLINGTNS: 0x0000
CALLING_NAME: OCTOI-499621731
CALLED_NUMBER: 493013285587
FORMAT: 0x00000008 (G.711 a-law)
CAPABILITY: 0x0000000c (G.711 mu-law,G.711 a-law)
CODEC_PREFS:
CALLTOKEN:
-----

4. DIVF retranslates the IAX call to ISDN and sends this SETUP back to cquirin

2024-04-03_03:13:40.100123 <cquirin/Q931:INFO> Sending message (0x7f3e0c004660)-----
SETUP
[From initiator=true CallRef=1] 08 02 00 01 05
Sending complete (codeset=0 type=161) a1
Bearer capability (codeset=0 type=4) 04 03 80 90 a3
transfer-cap=speech
transfer-mode=circuit
transfer-rate=64kbit
layer1-protocol=alaw
Channel identification (codeset=0 type=24) 18 03 a1 83 82
interface-bri=false
channel-exclusive=false
channel-select=present
type=B
channel-by-number=true
channels=2
Display (codeset=0 type=40) 28 0f 4f 43 54 4f 49 2d 34 39 39 36 32 31 37 33 31
display=OCTOI-499621731
Calling number (codeset=0 type=108) 6c 0b 10 81 34 39 39 36 32 31 37 33 31
number=499621731
type=international
plan=unknown
presentation=allowed
screening=user-provided-passed
Called number (codeset=0 type=112) 70 0c 80 30 33 30 31 33 32 38 35 35 38 37
number=03013285587
-----

As a matter of course, the bearer capability is now "Speech, alaw", as IAX does not know about bearer capabilities.

Amazingly, the same issue occurs when cquirin calls for example 49 30 1234 3042 :

2024-04-03_03:37:20.030982 <iaxengine:INFO> Sending frame [0x5607f43768d0]
-----
IAX (0x06) - NEW (0x00000001)
Outgoing to 213.95.46.30:4569 (Local address: 213.95.46.30:4569)
Call (Local:Remote): 11790:0. Timestamp: 1. Retrans: false. Sequence numbers: Out: 0 In: 0
VERSION: 0x0002
USERNAME: cnetguest
CALLING_NUMBER: 499621731
CALLINGTON: 0x10 (international)
CALLINGPRES: 0x01 (allowed,user-provided-passed)
CALLINGTNS: 0x0000
CALLING_NAME: OCTOI-499621731
CALLED_NUMBER: 49303012343042
FORMAT: 0x00000008 (G.711 a-law)
CAPABILITY: 0x0000000c (G.711 mu-law,G.711 a-law)
CODEC_PREFS:
CALLTOKEN:
-----

It might be the case that I (cquirin) send a wrongly formatted SETUP message over ISDN.
However, I would expect DIVF's dialplan to be able to work for about any type of number formatting.

Actions #1

Updated by laforge 29 days ago

  • Category set to services
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

This has been addressed during todays RetroNetCall.

The problem was that we did not recognize an international CalledParty when it had German 49 prefix. It was treated as a non-German international call and hence routed to C*NET / IAX2

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)