HUAWEI SOFTSWITCH SIP TRUNK to Asterisk

Guys,

Im trying to connect my Asterisk PBX to a Huawei SoftSwitch(CSOFTX3000) so that i get inbound/outbound calls from CDMA numbers into my contact center (running on asterisk).

sip show peers shows that the sip trunk is up and reachable. However, when i dial out to the huawei system, i get a busy out signal. PLEASE HELP.

sip_custom.conf setting for huawei csoft

[CSOFT]
type=peer
host=10.12.6.65
insecure=very
disallow=all
allow=alaw
allow=ulaw
dtmfmode=rfc2833
qualify=yes
context=from-trunk

extensions.conf file for outbound calls to huawei csoft

exten => _08644.,1,dial(SIP/CSOFT/${EXTEN}

When i try to call out, i get a busy out signal and the following appears in the logs

elastix*CLI> sip set debug peer CSOFT
SIP Debugging Enabled for IP: 10.12.6.65:5060
– Executing [08644000012@from-internal:1] Macro(“SIP/209-00000ce1”, “user-callerid|SKIPTTL|”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/209-00000ce1”, “AMPUSER=209”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/209-00000ce1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/209-00000ce1”, “1|Set|REALCALLERIDNUM=209”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/209-00000ce1”, “AMPUSER=209”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/209-00000ce1”, “AMPUSERCIDNAME=209”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/209-00000ce1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/209-00000ce1”, “AMPUSERCID=209”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/209-00000ce1”, “CALLERID(all)=“209” <209>”) in new stack
– Executing [s@macro-user-callerid:9] ExecIf(“SIP/209-00000ce1”, “0|Set|CHANNEL(language)=”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“SIP/209-00000ce1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] NoOp(“SIP/209-00000ce1”, “Using CallerID “209” <209>”) in new stack
– Executing [08644000012@from-internal:2] Set(“SIP/209-00000ce1”, “_NODEST=”) in new stack
– Executing [08644000012@from-internal:3] Macro(“SIP/209-00000ce1”, “record-enable|209|OUT|”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/209-00000ce1”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] Set(“SIP/209-00000ce1”, “__RecordingID=1285941294.7313”) in new stack
– Executing [s@macro-record-enable:5] AGI(“SIP/209-00000ce1”, “recordingcheck|20101001-155454|1285941294.7313”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20101001-155454|1285941294.7313: Outbound recording enabled.
recordingcheck|20101001-155454|1285941294.7313: CALLFILENAME=OUT209-20101001-155454-1285941294.7313
– AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:999] Set(“SIP/209-00000ce1”, “MONITOR_FILENAME=/var/www/html/monitor/01102010/OUT209-20101001-155454-1285941294.7313”) in new stack
– Executing [s@macro-record-enable:1000] Monitor(“SIP/209-00000ce1”, “WAV|/var/www/html/monitor/01102010/OUT209-20101001-155454-1285941294.7313|bm”) in new stack
– Executing [08644000012@from-internal:4] Macro(“SIP/209-00000ce1”, “dialout-trunk|5|08644000012||”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/209-00000ce1”, “DIAL_TRUNK=5”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/209-00000ce1”, “0?sub-pincheck|s|1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/209-00000ce1”, “0?disabletrunk|1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/209-00000ce1”, “DIAL_NUMBER=08644000012”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/209-00000ce1”, “DIAL_TRUNK_OPTIONS=tTr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/209-00000ce1”, “OUTBOUND_GROUP=OUT_5”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/209-00000ce1”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/209-00000ce1”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/209-00000ce1”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/209-00000ce1”, “outbound-callerid|5”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/209-00000ce1”, “0|SetCallerPres|”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/209-00000ce1”, “0|Set|REALCALLERIDNUM=209”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/209-00000ce1”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/209-00000ce1”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/209-00000ce1”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/209-00000ce1”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/209-00000ce1”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/209-00000ce1”, “0|Set|CALLERID(all)=”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/209-00000ce1”, “0|Set|CALLERID(all)=”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/209-00000ce1”, “0|SetCallerPres|prohib_passed_screen”) in new stack
– Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/209-00000ce1”, “1|AGI|fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern 08644.
== fixlocalprefix: Dialpattern 08644. matched. 08644000012 -> 08644000012
– AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:13] Set(“SIP/209-00000ce1”, “OUTNUM=08644000012”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/209-00000ce1”, “custom=SIP/CSOFT”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/209-00000ce1”, “0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)T”) in new stack
– Executing [s@macro-dialout-trunk:16] Macro(“SIP/209-00000ce1”, “dialout-trunk-predial-hook|”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] Set(“SIP/209-00000ce1”, “CDR(userfield)=209”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:2] NoOp(“SIP/209-00000ce1”, “CallerID=209”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:3] NoOp(“SIP/209-00000ce1”, “RealcallerID=209”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:4] GotoIf(“SIP/209-00000ce1”, “0?s|10”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:5] Goto(“SIP/209-00000ce1”, “checkpasswd|1”) in new stack
– Goto (macro-dialout-trunk-predial-hook,checkpasswd,1)
– Executing [checkpasswd@macro-dialout-trunk-predial-hook:1] Set(“SIP/209-00000ce1”, “accesslevel=”) in new stack
– Executing [checkpasswd@macro-dialout-trunk-predial-hook:2] Set(“SIP/209-00000ce1”, “passconfirm=”) in new stack
– Executing [checkpasswd@macro-dialout-trunk-predial-hook:3] NoOp(“SIP/209-00000ce1”, “”) in new stack
– Executing [checkpasswd@macro-dialout-trunk-predial-hook:4] GotoIf(“SIP/209-00000ce1”, “?getpasswd|1”) in new stack
– Executing [checkpasswd@macro-dialout-trunk-predial-hook:5] NoOp(“SIP/209-00000ce1”, “Extension not protected”) in new stack
– Executing [checkpasswd@macro-dialout-trunk-predial-hook:6] MacroExit(“SIP/209-00000ce1”, “”) in new stack
– Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/209-00000ce1”, “0?bypass|1”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/209-00000ce1”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/209-00000ce1”, “SIP/CSOFT/08644000012|300|T”) in new stack
Audio is at 10.12.6.70 port 13218
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 10.12.6.65:5060:
INVITE sip:08644000012@10.12.6.65 SIP/2.0
Via: SIP/2.0/UDP 10.12.6.70:5060;branch=z9hG4bK6f641379;rport
From: “209” sip:209@10.12.6.70;tag=as19477f9a
To: sip:08644000012@10.12.6.65
Contact: sip:209@10.12.6.70
Call-ID: 4d5c5e4974d4ff81167a2c9e15d1440c@10.12.6.70
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Fri, 01 Oct 2010 13:54:54 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Type: application/sdp
Content-Length: 233

v=0
o=root 27308 27308 IN IP4 10.12.6.70
s=session
c=IN IP4 10.12.6.70
t=0 0
m=audio 13218 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


-- Called CSOFT/08644000012

<— SIP read from 10.12.6.65:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.12.6.70:5060;branch=z9hG4bK6f641379;rport=5060
Call-ID: 4d5c5e4974d4ff81167a2c9e15d1440c@10.12.6.70
From: "209"sip:209@10.12.6.70;tag=as19477f9a
To: sip:08644000012@10.12.6.65
CSeq: 102 INVITE
Content-Length: 0

<------------->
— (7 headers 0 lines) —

<— SIP read from 10.12.6.65:5060 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.12.6.70:5060;branch=z9hG4bK6f641379;rport=5060
Call-ID: 4d5c5e4974d4ff81167a2c9e15d1440c@10.12.6.70
From: "209"sip:209@10.12.6.70;tag=as19477f9a
To: sip:08644000012@10.12.6.65;tag=9ee1af9a
CSeq: 102 INVITE
Reason: Q.850;cause=1;text="Unallocated (unassigned) number"
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Transmitting (no NAT) to 10.12.6.65:5060:
ACK sip:08644000012@10.12.6.65 SIP/2.0
Via: SIP/2.0/UDP 10.12.6.70:5060;branch=z9hG4bK6f641379;rport
From: “209” sip:209@10.12.6.70;tag=as19477f9a
To: sip:08644000012@10.12.6.65;tag=9ee1af9a
Contact: sip:209@10.12.6.70
Call-ID: 4d5c5e4974d4ff81167a2c9e15d1440c@10.12.6.70
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


-- SIP/CSOFT-00000ce2 is circuit-busy

== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dialout-trunk:20] Goto(“SIP/209-00000ce1”, “s-CONGESTION|1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-dialout-trunk:1] GotoIf(“SIP/209-00000ce1”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,3)
– Executing [s-CONGESTION@macro-dialout-trunk:3] NoOp(“SIP/209-00000ce1”, “TRUNK Dial failed due to CONGESTION - failing through to other trunks”) in new stack
– Executing [08644000012@from-internal:5] Macro(“SIP/209-00000ce1”, “outisbusy|”) in new stack
– Executing [s@macro-outisbusy:1] Busy(“SIP/209-00000ce1”, “2”) in new stack
== Spawn extension (macro-outisbusy, s, 1) exited non-zero on ‘SIP/209-00000ce1’ in macro ‘outisbusy’
== Spawn extension (from-internal, 08644000012, 5) exited non-zero on ‘SIP/209-00000ce1’
– Executing [h@from-internal:1] Macro(“SIP/209-00000ce1”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] NoOp(“SIP/209-00000ce1”, “HANGUPCAUSE is 1”) in new stack
– Executing [s@macro-hangupcall:2] GotoIf(“SIP/209-00000ce1”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,5)
– Executing [s@macro-hangupcall:5] GotoIf(“SIP/209-00000ce1”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,8)
– Executing [s@macro-hangupcall:8] GotoIf(“SIP/209-00000ce1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,10)
– Executing [s@macro-hangupcall:10] Hangup(“SIP/209-00000ce1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 10) exited non-zero on ‘SIP/209-00000ce1’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/209-00000ce1’
Really destroying SIP dialog ‘4d5c5e4974d4ff81167a2c9e15d1440c@10.12.6.70’ Method: INVITE
elastix*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
[root@elastix ~]#

it appears that the hosts are dialoguing, and one (the huawei switch) is replying:

SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.12.6.70:5060;branch=z9hG4bK6f641379;rport=5060
Call-ID: 4d5c5e4974d4ff81167a2c9e15d1440c@10.12.6.70
From: "209"sip:209@10.12.6.70;tag=as19477f9a
To: sip:08644000012@10.12.6.65;tag=9ee1af9a
CSeq: 102 INVITE
Reason: Q.850;cause=1;text="Unallocated (unassigned) number"
Content-Length: 0

That would make me think that your switch doesnt know how to route this number coming from the sip trunk.

Thanx mate,

the funny thing is, the huwaei softswitch has two seperate ip addresses : one for signaling and one for RTP.

i’ve given my asterisk two logical ip addresses to suite the two vlans from huawei and they can ping each other fine.

for the sip.conf, i used the signalling ip to reference the huawei host.

after changing type=friend to type=user, the huawei can now call asterisk, BUT only the signalling is successfull then silence follows. In asterisk it says call connected and its now playing the IVR menu, but at the calling party its just silent.

my audio is getting lost and imk stuck now. Find the new trace below

– Executing [400@from-sip-external:1] NoOp(“SIP/5063-000000a7”, “Received incoming SIP connection from unknown peer to 400”) in new stack
– Executing [400@from-sip-external:2] Set(“SIP/5063-000000a7”, “DID=400”) in new stack
– Executing [400@from-sip-external:3] Goto(“SIP/5063-000000a7”, “s|1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“SIP/5063-000000a7”, “1?from-trunk|400|1”) in new stack
– Goto (from-trunk,400,1)
– Executing [400@from-trunk:1] Set(“SIP/5063-000000a7”, “__FROM_DID=400”) in new stack
– Executing [400@from-trunk:2] Gosub(“SIP/5063-000000a7”, “app-blacklist-check|s|1”) in new stack
– Executing [s@app-blacklist-check:1] LookupBlacklist(“SIP/5063-000000a7”, “”) in new stack
– Executing [s@app-blacklist-check:2] GotoIf(“SIP/5063-000000a7”, “0?blacklisted”) in new stack
– Executing [s@app-blacklist-check:3] Return(“SIP/5063-000000a7”, “”) in new stack
– Executing [400@from-trunk:3] ExecIf(“SIP/5063-000000a7”, “1 |Set|CALLERID(name)=+002638644000099”) in new stack
– Executing [400@from-trunk:4] Set(“SIP/5063-000000a7”, “FAX_RX=disabled”) in new stack
– Executing [400@from-trunk:5] Set(“SIP/5063-000000a7”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [400@from-trunk:6] SetCallerPres(“SIP/5063-000000a7”, “allowed_not_screened”) in new stack
– Executing [400@from-trunk:7] Goto(“SIP/5063-000000a7”, “app-announcement-1|s|1”) in new stack
– Goto (app-announcement-1,s,1)
– Executing [s@app-announcement-1:1] GotoIf(“SIP/5063-000000a7”, “0?begin”) in new stack
– Executing [s@app-announcement-1:2] Answer(“SIP/5063-000000a7”, “”) in new stack
– Executing [s@app-announcement-1:3] Wait(“SIP/5063-000000a7”, “1”) in new stack
– Executing [s@app-announcement-1:4] NoOp(“SIP/5063-000000a7”, “Playing announcement Welcome-Eng”) in new stack
– Executing [s@app-announcement-1:5] Playback(“SIP/5063-000000a7”, “custom/welcome|noanswer”) in new stack
– <SIP/5063-000000a7> Playing ‘custom/welcome’ (language ‘en’)
– Executing [s@app-announcement-1:6] Goto(“SIP/5063-000000a7”, “ivr-6|s|1”) in new stack
– Goto (ivr-6,s,1)
– Executing [s@ivr-6:1] Set(“SIP/5063-000000a7”, “MSG=custom/corporate-ivr-eng”) in new stack
– Executing [s@ivr-6:2] Set(“SIP/5063-000000a7”, “LOOPCOUNT=0”) in new stack
– Executing [s@ivr-6:3] Set(“SIP/5063-000000a7”, “__DIR-CONTEXT=”) in new stack
– Executing [s@ivr-6:4] Set(“SIP/5063-000000a7”, “_IVR_CONTEXT_ivr-6=”) in new stack
– Executing [s@ivr-6:5] Set(“SIP/5063-000000a7”, “_IVR_CONTEXT=ivr-6”) in new stack
– Executing [s@ivr-6:6] GotoIf(“SIP/5063-000000a7”, “1?begin”) in new stack
– Goto (ivr-6,s,9)
– Executing [s@ivr-6:9] Set(“SIP/5063-000000a7”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing [s@ivr-6:10] Set(“SIP/5063-000000a7”, “TIMEOUT(response)=5”) in new stack
– Response timeout set to 5
– Executing [s@ivr-6:11] Set(“SIP/5063-000000a7”, “__IVR_RETVM=”) in new stack
– Executing [s@ivr-6:12] ExecIf(“SIP/5063-000000a7”, “1|Background|custom/corporate-ivr-eng”) in new stack
– <SIP/5063-000000a7> Playing ‘custom/corporate-ivr-eng’ (language ‘en’)

The IVR can not be heard :frowning: