Chan_sip to pjsip => no route to destination

Hey,
with chan_sip i could to this:

exten => xxxx,1,Dial(SIP/xxxx@sip.linphone.org,30)

And i had a linphone registered on the sip.linphone.com service, and it started ringing, no issues
Now, switched over to pjsip…

exten => xxxx,1,Dial(PJSIP/xxxx@sip.linphone.org,30)

and i get:

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

Why is that? what am i missing?

Dial strings are specific to the channel driver. PJSIP is different[1]. This would be dialing a SIP URI case.

[1] Dialing PJSIP Channels - Asterisk Project - Asterisk Project Wiki

hmm, do i need to take this example then?
exten => _9NXXNXXXXXX,1,Dial(PJSIP/mytrunk/sip:${EXTEN:1}@203.0.113.1:5060)

But i dont have a trunk? on chan_sip it was not needed?

And chan_pjsip isn’t chan_sip. You must specify an endpoint, as it is what defines the configuration to use for the call (codecs for example).

hmm, still dont understand? this is my endpoint “xxxx@sip.linphone.org

that endpoint i was able to call directly when i used chan_sip , still dont know why it cant be called when using pjsip ?

That’s a SIP URI. An endpoint in this case is a named entity from pjsip.conf of type endpoint. It defines the configuration to use for the call. You could have a generic “outgoing” one that defines your default configuration to use for outgoing calls to SIP URIs.

In chan_sip you could throw most things into the “general” section instead and have it use that configuration. Not the case with chan_pjsip.

its it much asked to provide me an example config? sorry a bit new to me

[outgoing]
type=endpoint
allow=!all,ulaw

Then to use:

PJSIP/outgoing/sip:${EXTEN}@sip.linphone.org

1 Like

aha, lets try that

thnx, much appreciated!!