HuaweiSoftX3000

Skip to end of metadata
Go to start of metadata

Interconnecting Asterisk with HuaweiSoftX3000

Problem description

The call flow is the following:

HuaweiSoftX3000 -> Asterisk        : INVITE
Asterisk -> HuaweiSoftX3000        : Trying
Asterisk -> HuaweiSoftX3000        : OK
HuaweiSoftX3000 -> Asterisk        : ACK
HuaweiSoftX3000 -> Asterisk        : BYE
Asterisk -> HuaweiSoftX3000        : OK

As you can see the connection is established but HuaweiSoftX3000 immediately breaks it with BYE. See Appendix A for SIP debug. You can see that huawei sent BYE with Reason Q.850;cause=100;text="unknown".
>Cause No. 100
- Invalid information element contents [Q.850]
>This cause indicates that the equipment sending this cause has received and information element which it has implemented; however, one or more Gelds in the I.E. are coded in such a way which has not been implemented by the equipment sending this cause.

The problem is that some softswitches (Huawei SoftX 3000 for example) fails with silenceSupp:off in SDP headers:

...
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-16
a=silenceSupp:off - - - - ; <---- HERE IS IT!!
a=ptime:20
...
<------------>

Solutions

I found 2 solutions.

  • Use patch from Eugene Prokopiev for asterisk to make silenceSupp header optional. See also Callweaver ticket 58 and asterisk bug 6669.
  • use internal_timing. See asterisk internal timing for details. With internal_timing enabled Asterisk does not add a=silenceSupp:off to SIP headers. In chan_sip.c we can see:
    if (\!p->owner \| \!ast_internal_timing_enabled(p->owner))
    ast_build_string(&a_audio_next, &a_audio_left, "a=silenceSupp:off
    \\
    \-
    \\
    \-
    \\
    \- \-\r\n");
    

    After you change asterisk.conf restart Asterisk because CLI> reload is not enough.

    Conclusion

    We decided to give a try to internal_timing. We got it working with the following settings.

asterisk.conf

 [options]
 internal_timing = yes

sip.conf

[soft-x-ngn]
host=10.200.201.2
type=friend
insecure=port; it uses 5061 source port by default
disallow=all
allow=ulaw
context=ivr-1-in
canreinvite=no

I will update this page if we get more issues.

Appendix A

SIP debug output

<--- SIP read from 10.200.201.2:5061 --->
INVITE sip:6000089@10.156.1.242;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.200.201.2:5061;branch=z9hG4bKcaa910527
Call-ID: 041211fafa2400157c9938aee9fed74f@10.200.201.2
From: <sip:918860666@10.200.201.2;user=phone>;tag=4cdaed20
To: <sip:6000089@10.156.1.242;user=phone>
CSeq: 1 INVITE
Contact: <sip:918860666@10.200.201.2:5061;user=phone>
Supported: 100rel
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REGISTER,PRACK,INFO,UPDATE,SUBSCRIBE,NOTIFY,MESSAGE,REFER
Content-Length: 296
Content-Type: application/sdp

v=0
o=HuaweiSoftX3000 138014 138014 IN IP4 10.200.201.2
s=Sip Call
c=IN IP4 10.200.201.3
t=0 0
m=audio 59864 RTP/AVP 8 0 18 4 97
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-15
a=fmtp:18 annexb=yes

<------------->
--- (12 headers 13 lines) ---
Sending to 10.200.201.2 : 5061 (no NAT)
Using INVITE request as basis request - 041211fafa2400157c9938aee9fed74f@10.200.201.2
Found peer 'soft-x-ngn'
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 18
Found RTP audio format 4
Found RTP audio format 97
Peer audio RTP is at port 10.200.201.3:59864
Found description format PCMA for ID 8
Found description format PCMU for ID 0
Found description format G729 for ID 18
Found description format G723 for ID 4
Found description format telephone-event for ID 97
Capabilities: us - 0x4 (ulaw), peer - audio=0x10d (g723|ulaw|alaw|g729)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 10.200.201.3:59864
Looking for 6000089 in ivr-1-in (domain 10.156.1.242)
list_route: hop: <sip:918860666@10.200.201.2:5061;user=phone>

<--- Transmitting (no NAT) to 10.200.201.2:5061 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.200.201.2:5061;branch=z9hG4bKcaa910527;received=10.200.201.2
From: <sip:918860666@10.200.201.2;user=phone>;tag=4cdaed20
To: <sip:6000089@10.156.1.242;user=phone>
Call-ID: 041211fafa2400157c9938aee9fed74f@10.200.201.2
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:6000089@10.156.1.242>
Content-Length: 0


<------------>
Audio is at 10.156.1.242 port 11810
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 10.200.201.2:5061 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.200.201.2:5061;branch=z9hG4bKcaa910527;received=10.200.201.2
From: <sip:918860666@10.200.201.2;user=phone>;tag=4cdaed20
To: <sip:6000089@10.156.1.242;user=phone>;tag=as7693e88e
Call-ID: 041211fafa2400157c9938aee9fed74f@10.200.201.2
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:6000089@10.156.1.242>
Content-Type: application/sdp
Content-Length: 237

v=0
o=root 13496 13496 IN IP4 10.156.1.242
s=session
c=IN IP4 10.156.1.242
t=0 0
m=audio 11810 RTP/AVP 0 97
a=rtpmap:0 PCMU/8000
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>

<--- SIP read from 10.200.201.2:5061 --->
ACK sip:6000089@10.156.1.242 SIP/2.0
Via: SIP/2.0/UDP 10.200.201.2:5061;branch=z9hG4bKb975c3769
Call-ID: 041211fafa2400157c9938aee9fed74f@10.200.201.2
From: <sip:918860666@10.200.201.2;user=phone>;tag=4cdaed20
To: <sip:6000089@10.156.1.242;user=phone>;tag=as7693e88e
CSeq: 1 ACK
Max-Forwards: 70
Content-Length: 0


<------------->
--- (8 headers 0 lines) ---

<--- SIP read from 10.200.201.2:5061 --->
BYE sip:6000089@10.156.1.242 SIP/2.0
Via: SIP/2.0/UDP 10.200.201.2:5061;branch=z9hG4bK99c066288
Call-ID: 041211fafa2400157c9938aee9fed74f@10.200.201.2
From: <sip:918860666@10.200.201.2;user=phone>;tag=4cdaed20
To: <sip:6000089@10.156.1.242;user=phone>;tag=as7693e88e
CSeq: 2 BYE
Reason: Q.850;cause=100;text="unknown"
Content-Length: 0


<------------->
--- (8 headers 0 lines) ---
Sending to 10.200.201.2 : 5061 (no NAT)

<--- Transmitting (no NAT) to 10.200.201.2:5061 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.200.201.2:5061;branch=z9hG4bK99c066288;received=10.200.201.2
From: <sip:918860666@10.200.201.2;user=phone>;tag=4cdaed20
To: <sip:6000089@10.156.1.242;user=phone>;tag=as7693e88e
Call-ID: 041211fafa2400157c9938aee9fed74f@10.200.201.2
CSeq: 2 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:6000089@10.156.1.242>
Content-Length: 0


<------------>
  == Spawn extension (ivr-1-in, 6000089, 2) exited non-zero on 'SIP/10.200.201.2-007e7400'
Really destroying SIP dialog '041211fafa2400157c9938aee9fed74f@10.200.201.2' Method: BYE
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.