PJSIP calls not working

I don’t know if this has been answered before but I am new to the community and I need some guidance.

I do have my trunks setup in pjsip as below:

`; Trunks

[cloud]
type=endpoint
aors=cloud
disallow=all
allow=ulaw,alaw
context=from-cloud
direct_media=no
rewrite_contact=yes
rtp_symmetric=yes
transport=transport-udp
force_rport=yes

[cloud]
type=aor
qualify_frequency=60
contact=sip:x.x.x.x:5060

[cloud]
type=identify
endpoint=cloud
match=x.x.x.x

[cloud]
server_uri=sip:x.x.x.x:5060
client_uri=sip:x.x.x.x
retry_interval=60
transport=transport-udp

; Trunk to GSM Gateway
[gsm_endpoint]
type=endpoint
aors=gsm_aor
disallow=all
allow=ulaw,alaw
context=from-trunk
direct_media=no
transport=transport-udp
force_rport=no

[gsm_aor]
type=aor
qualify_frequency=60
contact=sip:192.168.90.3:5060

[gsm_identify]
type=identify
endpoint=gsm_endpoint
match=192.168.90.3

[gsm]
server_uri=sip:192.168.90.3:5060
client_uri=sip:192.168.90.3
retry_interval=60
transport=transport-udp`

But when i make calls, I get this response:

-- Executing [256778256xxx@from-cloud:1] NoOp("PJSIP/cloud-00000000", "Incoming call from cloud to 256778256xxx") in new stack
    -- Executing [256778256xxx@from-cloud:2] Dial("PJSIP/cloud-00000000", "PJSIP/gsm_endpoint/256778256xxx") in new stack
[2024-11-28 14:15:55] ERROR[18521]: res_pjsip.c:817 ast_sip_create_dialog_uac: Endpoint 'gsm_endpoint': Could not create dialog to invalid URI '256778256xxx'.  Is endpoint registered and reachable?
[2024-11-28 14:15:55] ERROR[18521]: chan_pjsip.c:2644 request: Failed to create outgoing session to endpoint 'gsm_endpoint'
[2024-11-28 14:15:55] NOTICE[18678][C-00000001]: app_dial.c:2687 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)
    -- Executing [256778256xxx@from-cloud:3] Hangup("PJSIP/cloud-00000000", "") in new stack
  == Spawn extension (from-cloud, 256778256xxx, 3) exited non-zero on 'PJSIP/cloud-00000000'

The call isn’t successful.

Anyone to look into this

This is not a valid Dial string for PJSIP. The correct format is:

PJSIP/256778256863@gsm_endpoint

Thanks for the prompt response. @jcolp

After modifying the Dial string, this is what i get.

    -- Executing [256778256863@from-cloud:1] NoOp("PJSIP/cloud-00000000", "Incoming call from cloud to 256778256863") in new stack
    -- Executing [256778256863@from-cloud:2] Dial("PJSIP/cloud-00000000", "PJSIP/gsm_endpoint@256778256863") in new stack
[2024-11-28 14:46:08] ERROR[19094]: chan_pjsip.c:2633 request: Unable to create PJSIP channel - endpoint '256778256863' was not found
[2024-11-28 14:46:08] NOTICE[19159][C-00000001]: app_dial.c:2687 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)
    -- Executing [256778256863@from-cloud:3] Hangup("PJSIP/cloud-00000000", "") in new stack
  == Spawn extension (from-cloud, 256778256863, 3) exited non-zero on 'PJSIP/cloud-00000000'

That’s not the Dial string I gave.

You’re right, I’ve made the modification and now the call can go through.

Objects found: 3

    -- Executing [256778256863@from-cloud:1] NoOp("PJSIP/cloud-00000000", "Incoming call from cloud to 256778256863") in new stack
    -- Executing [256778256863@from-cloud:2] Dial("PJSIP/cloud-00000000", "PJSIP/256778256863@gsm_endpoint") in new stack
    -- Called PJSIP/256778256863@gsm_endpoint
       > 0x7f12dc0885d0 -- Strict RTP learning after remote address set to: 192.168.90.3:10002
    -- PJSIP/gsm_endpoint-00000001 is making progress passing it to PJSIP/cloud-00000000
       > 0x7f12dc059800 -- Strict RTP learning after remote address set to: 3.9.15.5:14462
       > 0x7f12dc0885d0 -- Strict RTP switching to RTP target address 192.168.90.3:10002 as source
       > 0x7f12dc0885d0 -- Strict RTP learning complete - Locking on source address 192.168.90.3:10002
    -- PJSIP/gsm_endpoint-00000001 answered PJSIP/cloud-00000000
    -- Channel PJSIP/gsm_endpoint-00000001 joined 'simple_bridge' basic-bridge <ba0a4584-39c7-411d-8e64-eac090bf81d6>
    -- Channel PJSIP/cloud-00000000 joined 'simple_bridge' basic-bridge <ba0a4584-39c7-411d-8e64-eac090bf81d6>
       > 0x7f12dc059800 -- Strict RTP switching to RTP target address 3.9.15.5:14462 as source
       > 0x7f12dc059800 -- Strict RTP learning complete - Locking on source address 3.9.15.5:14462
    -- Channel PJSIP/cloud-00000000 left 'simple_bridge' basic-bridge <ba0a4584-39c7-411d-8e64-eac090bf81d6>
  == Spawn extension (from-cloud, 256778256863, 2) exited non-zero on 'PJSIP/cloud-00000000'
    -- Channel PJSIP/gsm_endpoint-00000001 left 'simple_bridge' basic-bridge <ba0a4584-39c7-411d-8e64-eac090bf81d6>