Unable to receive calls from "Huawei" equipments

Dear All,

I’m having some problems with setting up my Asterisk 1.0.9 box with a VoIP SIP provider which apparently uses a equipment called “HuaweiSoft X3000”. I was able to successfully register my asterisk box with them; however, whenever asterisk receives an incoming call and answers it, the call will be dropped immediately, and this happens all the time. If I use X-Lite to connect to this SIP Provider, everything works fine as expected, so I guess it’s either my configuration problem or an incompatibility bug in Asterisk with “Huawei” equipment?

Also please be noted that my Asterisk box is indeed a working one, because i also have an account with BroadVoice, and my box works just fine with BroadVoice, both incoming and outgoing.

Here is my sip.conf:
register => 35011111:123456:35011111@202.0.179.3

[202.0.179.3]
type=peer
user=phone
host=202.0.179.3
fromdomain=202.0.179.3
fromuser=35011111
secret=123456
username=35011111
insecure=very
context=default
authname=35011111
dtmfmode=inband
dtmf=inband
canreinvite=no

And here is my extensions.conf:
exten => 35011111,1,Answer()
exten => 35011111,2,Wait,1
exten => 35011111,3,DigitTimeout,5
exten => 35011111,4,ResponseTimeout,10
exten => 35011111,5,Background(intro-clip)

Here is a SIP Debug dump when I receive a call from the SIP Provider, notice how the call gets dropped unexpectedly with the server sending me a “BYE” message:

Sip read:
INVITE sip:35011111@67.93.49.57:19161;user=phone SIP/2.0
From: sip:OutOfArea@202.0.179.3;user=phone;tag=d5903845
To: sip:35011111@67.93.49.57;user=phone
CSeq: 1 INVITE
Call-ID: dc161cbe2e9b78274b304c37218d82f8@sx3000
Via: SIP/2.0/UDP 202.0.179.3:5060;branch=z9hG4bK4f95d72d6
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REGISTER,PRACK,INFO,UPDATE,SUBSCRIBE,NOTIFY,MESSAGE,REFER
Max-Forwards: 70
Supported: 100rel
Contact: sip:OutOfArea@202.0.179.3:5060;user=phone
Content-Length: 294
Content-Type: application/sdp

v=0
o=HuaweiSoftX3000 2102168 2102168 IN IP4 10.0.1.36
s=Sip Call
c=IN IP4 202.0.179.3
t=0 0
m=audio 19134 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
Using latest request as basis request
Sending to 202.0.179.3 : 5060 (non-NAT)
Found peer '202.0.179.3’
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 202.0.179.3:19134
Found description format PCMA
Found description format PCMU
Found description format G729
Found description format G723
Found description format telephone-event
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x10d (g723|ulaw|alaw|g729)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities: us - 0x1 (g723), peer - 0x1 (g723), combined - 0x1 (g723)
Looking for 35011111 in default
list_route: hop: sip:OutOfArea@202.0.179.3:5060;user=phone
Transmitting (no NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 202.0.179.3:5060;branch=z9hG4bK4f95d72d6
From: sip:OutOfArea@202.0.179.3;user=phone;tag=d5903845
To: sip:35011111@67.93.49.57;user=phone
Call-ID: dc161cbe2e9b78274b304c37218d82f8@sx3000
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: sip:35011111@192.168.0.110
Content-Length: 0

to 202.0.179.3:5060
– Executing Answer(“SIP/35011111-05a8”, “”) in new stack
We’re at 192.168.0.110 port 13622
Answering with capability 0x2 (gsm)
Answering with capability 0x4 (ulaw)
Answering with capability 0x8 (alaw)
Answering with non-codec capability 0x1 (telephone-event)
Reliably Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 202.0.179.3:5060;branch=z9hG4bK4f95d72d6
From: sip:OutOfArea@202.0.179.3;user=phone;tag=d5903845
To: sip:35011111@67.93.49.57;user=phone;tag=as5c6e715b
Call-ID: dc161cbe2e9b78274b304c37218d82f8@sx3000
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: sip:35011111@192.168.0.110
Content-Type: application/sdp
Content-Length: 260

v=0
o=root 8538 8538 IN IP4 192.168.0.110
s=session
c=IN IP4 192.168.0.110
t=0 0
m=audio 13622 RTP/AVP 3 0 8 97
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-16
a=silenceSupp:off - - - -

to 202.0.179.3:5060
– Executing Wait(“SIP/35011111-05a8”, “1”) in new stack

Sip read:
ACK sip:35011111@67.93.49.57:19161;user=phone SIP/2.0
From: sip:OutOfArea@202.0.179.3;user=phone;tag=d5903845
To: sip:35011111@67.93.49.57;user=phone;tag=as5c6e715b
CSeq: 1 ACK
Call-ID: dc161cbe2e9b78274b304c37218d82f8@sx3000
Via: SIP/2.0/UDP 202.0.179.3:5060;branch=z9hG4bKdc7345f2a
Max-Forwards: 70
Content-Length: 0

8 headers, 0 lines

Sip read:
BYE sip:35011111@67.93.49.57:19161;user=phone SIP/2.0
From: sip:OutOfArea@202.0.179.3;user=phone;tag=d5903845
To: sip:35011111@67.93.49.57;user=phone;tag=as5c6e715b
CSeq: 2 BYE
Call-ID: dc161cbe2e9b78274b304c37218d82f8@sx3000
Via: SIP/2.0/UDP 202.0.179.3:5060;branch=z9hG4bKca96826cb
Reason: Q.850;cause=“100”;text="unknown"
Max-Forwards: 70
Content-Length: 0

9 headers, 0 lines
Sending to 202.0.179.3 : 5060 (non-NAT)
Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 202.0.179.3:5060;branch=z9hG4bKca96826cb
From: sip:OutOfArea@202.0.179.3;user=phone;tag=d5903845
To: sip:35011111@67.93.49.57;user=phone;tag=as5c6e715b
Call-ID: dc161cbe2e9b78274b304c37218d82f8@sx3000
CSeq: 2 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: sip:35011111@192.168.0.110
Content-Length: 0

to 202.0.179.3:5060
== Spawn extension (default, 35011111, 2) exited non-zero on 'SIP/35011111-05a8’
Destroying call ‘dc161cbe2e9b78274b304c37218d82f8@sx3000’

Sorry for the long message… but any help will be greatly appreciated. Thanks!!

I can’t work out what’s going on there, personally. What are the IP addresses in that output? Which one(s) are the asterisk server? There are a couple of different ones there that look like they are, but one is a 192.168… subnet address, which i don’t understand.

The SIP debug output is pretty horrible to have to dredge through to work out what’s going on here - it would probably be better if you started with just the asterisk console output with verbose set to 4. That should give enough information to work out what’s going on to start with.

I’m sorry for the lack of clarifications in my first post.

The external IP Address of my NAT’ed network is 67.93.49.57.
The LAN IP Address of my asterisk box is 192.168.0.110.
The IP Address of the SIP Provider’s server is 202.0.179.3.

I just tried to run asterisk console output with verbose==4, and this is what it shows when I call my SIP line (i.e., 35011111):

– Executing Answer(“SIP/35011111-81d6”, “”) in new stack
– Executing Wait(“SIP/35011111-81d6”, “1”) in new stack
== Spawn extension (default, 35011111, 2) exited non-zero on ‘SIP/35011111-81d6’

As you can see, the call terminates immediately after asterisk picks it up.

Any help will be greatly appreciated. Thanks!

Ah, ok. Now i understand!

It looks to me like you haven’t got NAT configured in sip.conf. You haven’t posted your whole sip.conf file, so i can’t say for sure (and you don’t need to post it, either!) but in the debug output it says:

Transmitting (no NAT):

in a few places, which makes me think you haven’t got nat=yes in the relevant place(s) in sip.conf - along with the externip=67.93.49.57 statement. I think you need nat=yes in both the general section and in the individual stanza relating to that particular service. I might be wrong about that, but that’s the first thing to check as it would certainly explain the symptoms.

Thanks for your suggestion. I’ve fixed sip.conf by putting these few lines in my [202.0.179.3] section:

nat=yes
externip = 67.93.49.57
localnet=192.168.0.0/255.255.255.0

However, the result is more or less the same - the call gets dropped immediately after asterisk picks it up. Setting verbose==4 shows exactly the same messages. As for SIP Debug, the ‘no nat’ thingy is gone, but the sequence is more or less the same, with server sending an unexpected “BYE” after my asterisk picks it up.

Again, the modified configuration works with my other BroadVoice account though. I still think that maybe it’s an asterisk compatibility issue?

You don’t need the externip statement in the [202.0.179.3] section. That has to be in the [general] section.

It’s not very likely to be compatibility - SIP is SIP and asterisk talks SIP. It will be a configuration issue.

I had a very similar problem a few months back - i had a SIP connection working perfectly with one service provider, but couldn’t get outgoing calls to work with another one (Sipgate.co.uk). It took me weeks (months, i think!) to sort that one out. It was a simple - although not obvious - configuration matter in the end.

Cmacneil and Remco eventually helped me sort it out on this forum, after the problem dragging on for quite a few months. It was solved in this thread, if you’re interested:
forums.digium.com/viewtopic.php?t=289&highlight=

It won’t help you much, but it may give you hope! :wink:

Fortunately, sipgate.co.uk has a help page on asterisk configuration for their service on their website.

Who is your service provider?

Hi WillKemp,

Over the past few days i’ve spent at least 10 hours trying to tweak all settings you’ve suggested, such as nat=yes/no/route, username, pedantic, etc… i believe i’ve really tried a lottttt of combinations, and i’ve also tried to compare line-by-line on the sample config file of the other post you referred to me. Unfortunately, the problem still remains unresolved, and the “sip debug” output seems to be pretty much the same.

This is quite frustrating because I was able to setup X-Lite within 30 seconds without a need to do any tweakings at all… so maybe my VOIP Provider or Asterisk is somewhat not in full conformance of the SIP protocol, which X-Lite could handle it gracefully? I’m also a programmer and I wish I’d know more about the SIP protocol in order to help debug this problem. Perhaps i’ll try to look into the SIP protocol more and see if I can fix the code myself… the VOIP Provider that i’m using is called CMPhone (cmphone.com).

hi pigeonman,

i’m wondering how you can register with

Here is my sip.conf:
register => 35011111:123456:35011111@202.0.179.3

as they are using MD5 authentication . . . .

I got the same Problem currently.

I can display in CLI that I have registered the Server

However when I make a call from outside world. I can forward to internal extension. However when pickup call… It Drop. Has the same problem.

When make outgoing call, it reply with 503 Services Unavailable. But it was funny that there is no problem if I use Linksys RTP300. Can make call sucessfully.

My provider calls CMPHONE Hong Kong. I am using Asterisk 1.4.11

Config as follows:

register => 85235015001:secretpwd@202.0.179.3

[35015001-cm]
type=peer
host=202.0.179.3
fromdomain=202.0.179.3
fromuser=85235015001
secret=secretpwd
username=85235015001
insecure=very
context=from-pstn
authname=85235015001
dtmfmode=auto
canreinvite=no

Is there anyone could provide me some hints or workable config for this?