Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)

Can anyone help to resolve this issue

 Executing [1002@local-office-extension:1] Dial("SIP/1001-00000002", "PJSIP/jashmin") in new stack
[Dec  3 16:54:08] ERROR[102184]: chan_pjsip.c:2669 request: Unable to create PJSIP channel - endpoint 'jashmin' was not found
[Dec  3 16:54:08] NOTICE[102181][C-00000003]: app_dial.c:2719 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Auto fallthrough, channel 'SIP/1001-00000002' status is 'CHANUNAVAIL'

/etc/asterisk/extensions.conf
[local-office-extension]
exten => 1001,1,Dial(PJSIP/Bob)
exten => 1002,1,Dial(PJSIP/Marley)

Sip.conf
[1001]
username=1001
secret=1001
nat=yes
host=dynamic
type=friend
qualify=yes
context=local-office-extension

[1002]
username=1002
secret=1002
host=dynamic
nat=yes
type=friend
qualify=yes
context=local-office-extension

Above are my configuration

I’m trying to connect within in local network I’m getting this when dialling to a extension
Extension getting register properly within local network.

Thank you

You are missing pjsip.conf

Thank you for your reply. Can you guide me what configuration do i need to do as I’m trying asterisk first time so not able understand via short hint

Thank you

IT’s trying to call the PJSIP endpoint named “jashmin”, which does not exist.

IT then tried to use SIP/1001 as a fallback. This also failed.

So you need to check your PJSIP configuration.

Here is an example PJSIP configuration:

[shak]
type=endpoint
context=shak
disallow=all
allow=ulaw
allow=alaw
auth=shak
aors=shak

[shak]
type=auth
auth_type=userpass
password=p@$$w0rD
username=shak

[shak]
type=aor
max_contacts=3

Similar to sip.conf except you need AOR and AUTH stanzas. My dialplan looks like this:

exten = 6969,1,Playback(pls-hold-while-try)
same = n,Dial(PJSIP/shak)
same = n,Hangup()

This is from an IVR so it plays a message then tries to call the shack phone. Here’s what it looks like from console:

 -- Executing [6000@inbound-ivr:1] Playback("PJSIP/6423-0000002e", "pls-hold-while-try") in new stack
    -- <PJSIP/6423-0000002e> Playing 'pls-hold-while-try.ulaw' (language 'en')
    -- Executing [6000@inbound-ivr:2] Dial("PJSIP/shak2-0000002e", "PJSIP/shak,20") in new stack
    -- Called PJSIP/shak
    -- PJSIP/shak-0000002f is ringing

Thank you @dewdude I tried your steps but still no luck now I’m getting these errors

 == Using SIP RTP CoS mark 5
    -- Executing [1002@local-office-extension:1] Dial("SIP/1001-00000001", "PJSIP/jashmin") in new stack
[Dec  3 22:27:30] ERROR[21084]: res_pjsip.c:903 ast_sip_set_tpselector_from_transport_name: Unable to retrieve PJSIP transport 'transport-udp'
    -- Called PJSIP/jashmin
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/1001-00000001' status is 'CONGESTION'

Here are my pjsip configuration

[atiqure]
type=endpoint
transport=transport-udp
context=local-office-extension
disallow=all
allow=ulaw
allow=gsm
auth=1001
aors=1001

[jashmin]
type=endpoint
transport=transport-udp
context=local-office-extension
disallow=all
allow=ulaw
allow=gsm
auth=1002
aors=1002

;
; A few more transports to pick from, and some related options below them.
;
;transport=transport-tls
;media_encryption=sdes
;transport=transport-udp-ipv6
;transport=transport-udp-nat
;direct_media=no
;
; MWI related options

;aggregate_mwi=yes
;mailboxes=6001@default,7001@default
;mwi_from_user=6001
;
; Extension and Device state options
;
;device_state_busy_at=1
;allow_subscribe=yes
;sub_min_expiry=30
;
; STIR/SHAKEN support.
;
;stir_shaken=no
;stir_shaken_profile=my_profile

[1001]
type=auth
auth_type=userpass
password=1001
username=1001

[1002]
type=auth
auth_type=userpass
password=1002
username=1002

[1001]
type=aor
max_contacts=1
contact=sip:1001@192.168.1.126:5060

[1002]
type=aor
max_contacts=1
contact=sip:1002@192.168.1.126:5060


I commented Transport line after that this error is coming

 Using SIP RTP CoS mark 5
    -- Executing [1002@local-office-extension:1] Dial("SIP/1001-00000003", "PJSIP/jashmin") in new stack
    -- Called PJSIP/jashmin
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/1001-00000003' status is 'CONGESTION'

You appear to have a conflict for port 5060, although to be really sure of the problem, you need to turn up logging until the primary error is logged and/or enable protocol logging, using “pjsip set logger on”. The everyone is message is a secondary report.

@david551 I check ports are working fine and 5060 is assigned to asterisk only.
Now I’m getting this error actually while dialing call

== Using SIP RTP CoS mark 5
    -- Executing [1002@local-office-extension:1] Dial("SIP/1001-00000005", "PJSIP/jashmin") in new stack
    -- Called PJSIP/jashmin
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/1001-00000005' status is 'CONGESTION'

Is there anything I’m missing in sip.conf file as I haven’t touch anything in that file.

Thank you

It needs to bind to a different port number from that to which chan_pjsip binds. Or better, it should be removed and every endpoint moved to chan_pjsip.

(username doesn’t do anything in that configuration. You should have explained why you had “nat=yes”, as any configuration that needs it is sufficiently special that it needs explanation. You should also explain why you are using type=friend, rather than type=peer, as when not needed, it reduces security and can cause other problems.)

@atiqure_rahman, Are you configuring Chan_sip? Or Chan_pjsip?

Share your pjsip.conf and extention.conf file?

Did you mean extensions.conf?

Yes

Sorry actually I don’t know whether I’m configuring Chan_sip or Chan_pjsip. Can you guide me how to check or what I have to do if I want to configure in chan_sip or Chan_pjsip

Here is my extensions.conf configuration
/etc/asterisk/extensions.conf
[local-office-extension]
exten => 1001,1,Dial(PJSIP/atiqure)
exten => 1002,1,Dial(PJSIP/jashmin)

Thank you

Are you using SIP trunk from Provider? Or you are testing just VM workstation?

No I’m not using any sip trunk I’m just testing it in local network. I Zoiper phone is also registered properly but only at the time of calling I’m getting this error now.

== Using SIP RTP CoS mark 5
    -- Executing [1002@local-office-extension:1] Dial("SIP/1001-00000006", "PJSIP/jashmin") in new stack
    -- Called PJSIP/jashmin
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/1001-00000006' status is 'CONGESTION'

Contact me via message, I will try to help you if I understand your issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.