Outgoing call PRI line

Hi all

first time facing PRI line…Sangoma Wanpipe card…Inbound call no problem…Outgoing calls don’t work at all

Telco gave me a temporary number to make some test before bringing all the final numbers on the PRI line

In console if i set : pri set debug on span 1

and then make a call i got this

PRI Span: 1 – Making new call for cref 32772
– Requested transfer capability: 0x00 - SPEECH
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=42
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=9, window is open V(A)=9 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=42
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 > [04 03 80 90 a3]
PRI Span: 1 > Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
PRI Span: 1 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 1 > User information layer 1: A-Law (35)
PRI Span: 1 > [18 03 a1 83 81]
PRI Span: 1 > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
PRI Span: 1 > ChanSel: As indicated in following octets
PRI Span: 1 > Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 > Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 > [6c 0b 00 80 39 35 30 38 36 32 30 30 31]
PRI Span: 1 > Calling Party Number (len=13) [ Ext: 0 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)
PRI Span: 1 > Presentation: Presentation allowed, User-provided, not screened (0) ‘950862001’ ]
PRI Span: 1 > [70 0b 80 33 34 37 34 34 35 31 32 31 32]
PRI Span: 1 > Called Party Number (len=13) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) ‘3474451212’ ]
PRI Span: 1 > [a1]
PRI Span: 1 > Sending Complete (len= 1)
PRI Span: 1 q931.c:6531 q931_setup: Call 32772 enters state 1 (Call Initiated). Hold state: Idle
– Called DAHDI/i1/3474451212
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=10
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent to originator)
PRI Span: 1 < Message Type: CALL PROCEEDING (2)
PRI Span: 1 < [18 03 a9 83 81]
PRI Span: 1 < Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Exclusive Dchan: 0
PRI Span: 1 < ChanSel: As indicated in following octets
PRI Span: 1 < Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 < Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 Received message for call 0x7f7818336e20 on link 0x2d96250 TEI/SAPI 0/0
PRI Span: 1 – Processing IE 24 (cs0, Channel ID)
PRI Span: 1 q931.c:9095 post_handle_q931_message: Call 32772 enters state 3 (Outgoing Call Proceeding). Hold state: Idle
Span 1: Processing event PRI_EVENT_PROCEEDING(13)
– DAHDI/i1/3474451212-4 is proceeding passing it to SIP/6200-00000003
PRI Span: 1 q931.c:7332 q931_hangup: Hangup other cref:32772
PRI Span: 1 q931.c:7089 __q931_hangup: ourstate Outgoing Call Proceeding, peerstate Incoming Call Proceeding, hold-state Idle
PRI Span: 1 q931.c:6275 q931_disconnect: Call 32772 enters state 11 (Disconnect Request). Hold state: Idle
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=9
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent from originator)
PRI Span: 1 > Message Type: DISCONNECT (69)
PRI Span: 1 TEI=0 Transmitting N(S)=10, window is open V(A)=10 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=9
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent from originator)
PRI Span: 1 > Message Type: DISCONNECT (69)
PRI Span: 1 > [08 02 81 90]
PRI Span: 1 > Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
PRI Span: 1 > Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]
– Hungup ‘DAHDI/i1/3474451212-4’
== Spawn extension (local, 3474451212, 3) exited non-zero on ‘SIP/6200-00000003’
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=5
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent to originator)
PRI Span: 1 < Message Type: RELEASE (77)
PRI Span: 1 Received message for call 0x7f7818336e20 on link 0x2d96250 TEI/SAPI 0/0
PRI Span: 1 q931.c:9257 post_handle_q931_message: Call 32772 enters state 0 (Null). Hold state: Idle
Span 1: Processing event PRI_EVENT_HANGUP(6)
PRI Span: 1 q931.c:7332 q931_hangup: Hangup other cref:32772
PRI Span: 1 q931.c:7089 __q931_hangup: ourstate Null, peerstate Release Request, hold-state Idle
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=9
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent from originator)
PRI Span: 1 > Message Type: RELEASE COMPLETE (90)
PRI Span: 1 TEI=0 Transmitting N(S)=11, window is open V(A)=11 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=9
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent from originator)
PRI Span: 1 > Message Type: RELEASE COMPLETE (90)
PRI Span: 1 > [08 02 81 90]
PRI Span: 1 > Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
PRI Span: 1 > Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]
PRI Span: 1 q931.c:7332 q931_hangup: Hangup other cref:32772
PRI Span: 1 q931.c:7089 __q931_hangup: ourstate Null, peerstate Null, hold-state Idle
PRI Span: 1 Destroying call 0x7f7818336e20, ourstate Null, peerstate Null, hold-state Idle

My chan_dahdi.conf is like this (I’ve already made several changes without getting anything)

[trunkgroups]

[channels]
context=default
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
relaxdtmf=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no

inbanddisconnect=yes

pridialplan=unknown
prilocaldialplan=unknown
priindication=inband

nationalprefix=0
internationalprefix=00

facilityenable = no

;Sangoma A101 port 1 [slot:4 bus:2 span:1]
switchtype=euroisdn
context=from-pstn
group=0
echocancel=yes
faxdetect=incoming
signalling=pri_cpe
channel =>1-15,17-31

in extensions.conf i have also set

exten => _X.,1,Set(CALLERID(num)=950862001)

but it’s all the same…

Signalling seems to be reaching the other end, but the other end disconnected the call with reason: Normal Clearing, which basically tells you nothing. You will need to ask the network operator why they disconnected.

From the PRI log you provided, the Asterisk side is initiating the hangup. This could be your dialplan (extensions.conf) because of the flags you gave to the Dial application in dialplan or the chan_sip call is canceling the call.

Looks like I got confused about the direction, but I wonder if the human on the SIP side was confused by call progress being done as early media, rather than an ALERTING message (maybe the test number was a free recorded announcement). If you don’t call Progress() on the SIP side, you are likely to find that you don’t hear the early media.

Maybe the hangup you see in the log is when I close the test call. When after a few seconds I don’t see it arriving on my cell phone.

I’d definitely enable Progress(). There may be a voice messages explaining the failure.

Hi David…thanks…but no voice messages…nothing at all…

When i call in number is associated
Called Party Number (len=12) [ Ext: 1 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) ‘950862001’ ]

when i call out having set (CALLERID(num)=950862001) it sems is not recognized as a PRI number…

Calling Party Number (len=13) [ Ext: 0 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)
PRI Span: 1 > Presentation: Presentation allowed, User-provided, not screened (0) ‘950862001’ ]

None of the numbers are recognized as being in a particular format by Asterisk, TON and NPI have to be configured although they may have defaults.

However, you are getting a back a making progress indication, so the network hasn’t rejected the call, or it has rejected it with in band announcements or tones.

For TON = national, you would expect the number without the long distance code (strip the initial 0 in the UK, or the 1 (default carrier case) in the USA.

Sorry all…
for the sake of clarity i I let the call go this is asterisk debug from the beginning to the end

P.S. http://lists.digium.com/pipermail/asterisk-users/2012-December/276361.html (person with same problem and unfortunately no solution to the thread)

Using SIP RTP CoS mark 5
> 0x7f832c009060 – Strict RTP learning after remote address set to: 192.168.200.75:52754
– Executing [3474451212@local:1] Set(“SIP/6200-00000002”, “CALLERID(num)=950862001”) in new stack
– Executing [3474451212@local:2] Set(“SIP/6200-00000002”, “CALLERID(name)=950862001”) in new stack
– Executing [3474451212@local:3] Progress(“SIP/6200-00000002”, “”) in new stack
– Executing [3474451212@local:4] Dial(“SIP/6200-00000002”, “DAHDI/i1/3474451212”) in new stack
PRI Span: 1 – Making new call for cref 32771
– Requested transfer capability: 0x00 - SPEECH
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=42
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 3/0x3) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=4, window is open V(A)=4 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=42
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 3/0x3) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 > [04 03 80 90 a3]
PRI Span: 1 > Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
PRI Span: 1 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 1 > User information layer 1: A-Law (35)
PRI Span: 1 > [18 03 a1 83 81]
PRI Span: 1 > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
PRI Span: 1 > ChanSel: As indicated in following octets
PRI Span: 1 > Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 > Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 > [6c 0b 21 80 39 35 30 38 36 32 30 30 31]
PRI Span: 1 > Calling Party Number (len=13) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 > Presentation: Presentation allowed, User-provided, not screened (0) ‘950862001’ ]
PRI Span: 1 > [70 0b 80 33 34 37 34 34 35 31 32 31 32]
PRI Span: 1 > Called Party Number (len=13) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) ‘3474451212’ ]
PRI Span: 1 > [a1]
PRI Span: 1 > Sending Complete (len= 1)
PRI Span: 1 q931.c:6531 q931_setup: Call 32771 enters state 1 (Call Initiated). Hold state: Idle
– Called DAHDI/i1/3474451212
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=10
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 3/0x3) (Sent to originator)
PRI Span: 1 < Message Type: CALL PROCEEDING (2)
PRI Span: 1 < [18 03 a9 83 81]
PRI Span: 1 < Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Exclusive Dchan: 0
PRI Span: 1 < ChanSel: As indicated in following octets
PRI Span: 1 < Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 < Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 Received message for call 0x2ac1ca0 on link 0x283a500 TEI/SAPI 0/0
PRI Span: 1 – Processing IE 24 (cs0, Channel ID)
PRI Span: 1 q931.c:9095 post_handle_q931_message: Call 32771 enters state 3 (Outgoing Call Proceeding). Hold state: Idle
Span 1: Processing event PRI_EVENT_PROCEEDING(13)
– DAHDI/i1/3474451212-3 is proceeding passing it to SIP/6200-00000002
> 0x7f832c009060 – Strict RTP switching to RTP target address 192.168.200.75:52754 as source
> 0x7f832c009060 – Strict RTP learning complete - Locking on source address 192.168.200.75:52754
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=5
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 3/0x3) (Sent to originator)
PRI Span: 1 < Message Type: RELEASE COMPLETE (90)
PRI Span: 1 Received message for call 0x2ac1ca0 on link 0x283a500 TEI/SAPI 0/0
PRI Span: 1 q931.c:9204 post_handle_q931_message: Call 32771 enters state 0 (Null). Hold state: Idle
Span 1: Processing event PRI_EVENT_HANGUP(6)
– Span 1: Channel 0/1 got hangup, cause -1
PRI Span: 1 q931.c:7332 q931_hangup: Hangup other cref:32771
PRI Span: 1 q931.c:7089 __q931_hangup: ourstate Null, peerstate Null, hold-state Idle
PRI Span: 1 Destroying call 0x2ac1ca0, ourstate Null, peerstate Null, hold-state Idle
– Hungup ‘DAHDI/i1/3474451212-3’
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [3474451212@local:5] Progress(“SIP/6200-00000002”, “”) in new stack
– Executing [3474451212@local:6] Hangup(“SIP/6200-00000002”, “”) in new stack
== Spawn extension (local, 3474451212, 6) exited non-zero on ‘SIP/6200-00000002’

Your carrier appears to be releasing your call. You might want to confirm with your carrier that they are allowing outbound calls, and what dialed number format they are expecting and what type eg. local, long distance, “free” area codes, etc. They may even provide a test phone number that they have internally (so it never leaves their network.) It very well could be that this is a billing/accounting limitation and you have everything working technically.

Thanks…
In fact we are waiting for a technician from the telco to come on site to do some tests.
Anyway, thanks for analyzing the log.

Telco issue.
I do nothing and after their checks all is working fine.
Thanks