[SOLVED] Outbound calls returning 480 Temporairly unavilable

Hi,
I had registering numbers through zoiper on our asterisk and divert it to our PRI which is working fine.
Then we are trying to do the same thing with our mobile phones and try to route the call to our personal number through PRI again but it shows “480 Temporarily unavailable”

below is our configurations

for Zoiper:

packet traces:
The following the working outbound call trace from zoiper

packet 1:

Session Initiation Protocol (INVITE)
    Request-Line: INVITE sip:9826XXXXX@10.xx.xxx.xx;transport=UDP SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 10.xx.xxx.45:58959;branch=z9hG4bK-524287-1---0ae520b3b2c9b9cd;rport
        Max-Forwards: 70
        Contact: <sip:68XXXX10@10.xx.xxx.45:58959;transport=UDP>
        To: <sip:9826XXXXX@10.xx.xxx.xx;transport=UDP>
        From: <sip:68XXXX10@10.xx.xxx.xx;transport=UDP>;tag=4abace50
        Call-ID: xGj2bgJldPtUQfnBijKmww..
        CSeq: 1 INVITE
        Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
        Content-Type: application/sdp
        User-Agent: Z 5.2.19 rv2.8.99
        Allow-Events: presence, kpml, talk
        Content-Length: 167
    Message Body
        Session Description Protocol
            Session Description Protocol Version (v): 0
            Owner/Creator, Session Id (o): Z 0 0 IN IP4 10.xx.xxx.45
            Session Name (s): Z
            Connection Information (c): IN IP4 10.xx.xxx.45
            Time Description, active time (t): 0 0
            Media Description, name and address (m): audio 8000 RTP/AVP 0 101
            Media Attribute (a): rtpmap:101 telephone-event/8000
            Media Attribute (a): fmtp:101 0-16
            Media Attribute (a): sendrecv

packet 2:
Session Initiation Protocol (100)
    Status-Line: SIP/2.0 100 Trying
    Message Header
        Via: SIP/2.0/UDP 10.xx.xxx.45:58959;branch=z9hG4bK-524287-1---0ae520b3b2c9b9cd;received=10.xx.xxx.2;rport=58959
        Call-ID: xGj2bgJldPtUQfnBijKmww..
        From: <sip:68XXXX10@10.xx.xxx.xx;transport=udp>;tag=4abace50
        To: <sip:9826XXXXX@10.xx.xxx.xx;transport=udp>
        CSeq: 1 INVITE
        Content-Length: 0

packet 3:
Session Initiation Protocol (180)
    Status-Line: SIP/2.0 180 Ringing
    Message Header
        Via: SIP/2.0/UDP 10.xx.xxx.45:58959;branch=z9hG4bK-524287-1---0ae520b3b2c9b9cd;received=10.xx.xxx.2;rport=58959
        Call-ID: xGj2bgJldPtUQfnBijKmww..
        From: <sip:68XXXX10@10.xx.xxx.xx;transport=udp>;tag=4abace50
        To: <sip:9826XXXXX@10.xx.xxx.xx;transport=udp>;tag=aa2cf06-VGtL285f2e6ca7
        CSeq: 1 INVITE
        Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
        Contact: <sip:9826XXXXX@10.xx.xxx.xx:5060;Hpt=8e52_16;CxtId=3;TRC=ffffffff-ffffffff>
        User-Agent: ZTE Softswitch/1.0.0
        P-Early-Media: gated
        Content-Length: 174
        Content-Type: application/sdp
    Message Body
        Session Description Protocol
            Session Description Protocol Version (v): 0
            Owner/Creator, Session Id (o): - 1127 20161 IN IP4 10.xx.xxx.xx
            Session Name (s): SBC call
            Connection Information (c): IN IP4 10.xx.xxx.xx
            Time Description, active time (t): 0 0
            Media Description, name and address (m): audio 40306 RTP/AVP 0 101
            Media Attribute (a): rtpmap:101 telephone-event/8000
            Media Attribute (a): fmtp:101 0-15
            Media Attribute (a): ptime:20

for mobile Phones:

extensions.conf:

[from-tata]
exten => 6xx1xxxx,1,Log(NOTICE, Bhaiyaji call aa raha hai ${CALLERID(all)} se)
        ;same => n,Answer()
        same => n,Playback(hello)
        same => n,Set(CALLERID(num)=xxx1xx02)
        same => n,Dial(PJSIP/444556548@tata)
        same => n,Hangup()

pjsip.conf :

[transport-udp]
type=transport
protocol=udp    ;udp,tpcp,tls,ws,wss
bind=0.0.0.0

[6xx1xxxx]
type=registration
transport=transport-udp
outbound_auth=6xx1xxxx
server_uri=sip:10.xx.xxx.xx
client_uri=sip:6xx1xxxx@10.xx.xxx.xx
contact_user=6xx1xxxx
retry_interval=60
forbidden_retry_interval=600
expiration=3600
line=yes
endpoint=6xx1xxxx

[6xx1xxxx]
type=auth
auth_type=userpass
password=1234
username=6xx1xxxx
;realm=10.xx.xxx.xx

[6xx1xxxx]
type=endpoint
transport=transport-udp
context=from-tata
disallow=all
allow=ulaw
outbound_auth=6xx1xxxx
aors=mytrunk
force_rport=no
direct_media=no
;rtp_symmetric=yes

[mytrunk]
type=aor
contact=sip:10.xx.xxx.xx:5060

[tata]
type=endpoint
transport=transport-udp
context=from-tata
disallow=all
allow=ulaw
outbound_auth=tata_auth
aors=tata
force_rport=yes
direct_media=no
ice_support=yes
;rtp_symmetric=yes

[tata_auth]
type=auth
auth_type=userpass
password=xxx1xx02
username=xxx1xx02
;realm=10.xx.xxx.xx

[tata]
type=aor
;max_contacts=10
contact=sip:10.xx.xxx.xx

[xxx1xx02]
type=registration
transport=transport-udp
outbound_auth=xxx1xx02
server_uri=sip:10.xx.xxx.xx
client_uri=sip:xxx1xx02@10.xx.xxx.xx
contact_user=xxx1xx02
retry_interval=60
forbidden_retry_interval=600
expiration=3600
line=yes
endpoint=xxx1xx02

[xxx1xx02]
type = endpoint
transport = transport-udp
context = from-tata
direct_media = no
outbound_auth=xxx1xx02
disallow = all
allow = ulaw
aors = mytrunk
force_rport=yes
;rtp_symmetric=yes

[xxx1xx02]
type = auth
auth_type = userpass
password = 1234
username = xxx1xx02
;realm=10.xx.xxx.xx

packet traces

the following is our asterisk configuration that fails


packet 1:
Session Initiation Protocol (INVITE)
    Request-Line: INVITE sip:8894XXXXX@10.xx.xxx.xx:5060 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 10.xx.xxx.2:5060;rport;branch=z9hG4bKPj3d4025fb-1216-44bd-95a0-716c5abb2844
        From: "9999XXXXX" <sip:68XXXX02@10.xx.xxx.45>;tag=f7b307b3-6029-4413-8a65-ccf71d1608d4
        To: <sip:8894XXXXX@10.xx.xxx.xx>
        Contact: <sip:asterisk@10.xx.xxx.2:5060>
        Call-ID: b47586bc-0909-45f2-b3f4-2019096f9980
        CSeq: 27981 INVITE
        Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
        Supported: 100rel, timer, replaces, norefersub
        Session-Expires: 1800
        Min-SE: 90
        Max-Forwards: 70
        User-Agent: Asterisk PBX 16.0.0
        Content-Type: application/sdp
        Content-Length:   239
    Message Body
        Session Description Protocol
            Session Description Protocol Version (v): 0
            Owner/Creator, Session Id (o): - 1377969778 1377969778 IN IP4 10.xx.xxx.2
            Session Name (s): Asterisk
            Connection Information (c): IN IP4 10.xx.xxx.2
            Time Description, active time (t): 0 0
            Media Description, name and address (m): audio 13876 RTP/AVP 0 101
            Media Attribute (a): rtpmap:0 PCMU/8000
            Media Attribute (a): rtpmap:101 telephone-event/8000
            Media Attribute (a): fmtp:101 0-16
            Media Attribute (a): ptime:20
            Media Attribute (a): maxptime:150
            Media Attribute (a): sendrecv

packet 2:
Session Initiation Protocol (100)
    Status-Line: SIP/2.0 100 Trying
    Message Header
        Via: SIP/2.0/UDP 10.xx.xxx.2:5060;branch=z9hG4bKPj3d4025fb-1216-44bd-95a0-716c5abb2844;rport=5060
        Call-ID: b47586bc-0909-45f2-b3f4-2019096f9980
        From: "9999XXXXX"<sip:68XXXX02@10.xx.xxx.45>;tag=f7b307b3-6029-4413-8a65-ccf71d1608d4
        To: <sip:8894XXXXX@10.xx.xxx.xx>
        CSeq: 27981 INVITE
        Content-Length: 0

packet 3:
Real-Time Transport Protocol
    [Stream setup by SDP (frame 1)]
    10.. .... = Version: RFC 1889 Version (2)
    ..0. .... = Padding: False
    ...0 .... = Extension: False
    .... 0000 = Contributing source identifiers count: 0
    0... .... = Marker: False
    Payload type: ITU-T G.711 PCMU (0)
    Sequence number: 21927
    [Extended sequence number: 87463]
    Timestamp: 3013121570
    Synchronization Source identifier: 0x1d1e7633 (488535603)
    Payload: 7f7f7f7e7f7e7e7e7f7f7fff7f7f7e7e7e7e7e7f7f7f7f7f...


packet 4:
Session Initiation Protocol (480)
    Status-Line: SIP/2.0 480 Temporarily Unavailable
    Message Header
        Via: SIP/2.0/UDP 10.xx.xxx.2:5060;branch=z9hG4bKPj3d4025fb-1216-44bd-95a0-716c5abb2844;rport=5060
        Call-ID: b47586bc-0909-45f2-b3f4-2019096f9980
        From: "9999XXXXX"<sip:68XXXX02@10.xx.xxx.45>;tag=f7b307b3-6029-4413-8a65-ccf71d1608d4
        To: <sip:8894XXXXX@10.xx.xxx.xx>;tag=aa2cf06-iftM285f0311a7
        CSeq: 27981 INVITE
        User-Agent: ZTE Softswitch/1.0.0
        Content-Length: 0

packet 5:
Session Initiation Protocol (ACK)
    Request-Line: ACK sip:8894XXXXX@10.xx.xxx.xx:5060 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 10.xx.xxx.2:5060;rport;branch=z9hG4bKPj3d4025fb-1216-44bd-95a0-716c5abb2844
        From: "9999XXXXX" <sip:68XXXX02@10.xx.xxx.45>;tag=f7b307b3-6029-4413-8a65-ccf71d1608d4
        To: <sip:8894XXXXX@10.xx.xxx.xx>;tag=aa2cf06-iftM285f0311a7
        Call-ID: b47586bc-0909-45f2-b3f4-2019096f9980
        CSeq: 27981 ACK
        Max-Forwards: 70
        User-Agent: Asterisk PBX 16.0.0
        Content-Length:  0

packet 6:
Session Initiation Protocol (BYE)
    Request-Line: BYE sip:9999XXXXX@10.xx.xxx.xx:5060;Hpt=8e62_16;CxtId=4;TRC=ffffffff-ffffffff SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 10.xx.xxx.2:5060;rport;branch=z9hG4bKPj6458e8df-2c18-4197-b358-0af80327e717
        From: "226xx1xxxx" <sip:226xx1xxxx@10.xx.xxx.xx>;tag=45a2abc1-60b2-4287-bd3b-7a5463667965
        To: "9999XXXXX" <sip:9999XXXXX@10.xx.xxx.xx>;tag=aa2cf06-WxNz285f02eea7
        Call-ID: asbc46f4285f02ef-0167-0191@10.xx.xxx.6
        CSeq: 24406 BYE
        Reason: Q.850;cause=19
        Max-Forwards: 70
        User-Agent: Asterisk PBX 16.0.0
        Content-Length:  0


packet 7:
Session Initiation Protocol (200)
    Status-Line: SIP/2.0 200 OK
    Message Header
        Via: SIP/2.0/UDP 10.xx.xxx.2:5060;branch=z9hG4bKPj6458e8df-2c18-4197-b358-0af80327e717;rport=5060
        Call-ID: asbc46f4285f02ef-0167-0191@
        From: "226xx1xxxx"<sip:226xx1xxxx@10.xx.xxx.xx>;tag=45a2abc1-60b2-4287-bd3b-7a5463667965
        To: "9999XXXXX"<sip:9999XXXXX@10.xx.xxx.xx>;tag=aa2cf06-WxNz285f02eea7
        CSeq: 24406 BYE
        User-Agent: ZTE Softswitch/1.0.0
        Content-Length: 0

As the response is from “ZTE Softswitch/1.0.0” you would need to investigate there, as that is what is sending it.

Hey jclop
thanks for your quick reply and sorry for our late response since we were indulge as per your suggestion. after investigating it our “FROM” header in request body which is not as per SOFTSWITCH requirement so,
we just add in pjsip.conf

from_user=XXXX100

and it fix the things.

Thanks again :grinning:!!!