TIPS PJSIP URI dialing with no chan_sip

Halea

Well-Known Member
Joined
Aug 12, 2016
Messages
1,130
Reaction score
874
My latest IncrediblePBX-2025 install's LENNY configuration didn't work, apparently because the "sip/[email protected]" in the "sip" field of the custom extension LENNY was specific to chan_sip.

Replacing sip/ with pjsip/ didn't work either because apparently pjsip expects a trunk name rather than a domain name.

So eventually I made it work by creating a pjsip trunk to "lenny.from-nv.com" called "lenny", and using "pjsip/53669@lenny" in the "dial" field of the LENNY custom extension.

Not sure if this is the simplest way, so I thought I should run this by the community which may suggest something simpler.

I got all the cues from chatgpt although I am not sure that was the most brilliant idea either.

TIA for your input.
 
I got all the cues from chatgpt although I am not sure that was the most brilliant idea either.
I find that chatgpt is ok if you have a some subject knowledge that allows you sort the good information form the rubbish.
 
I find that chatgpt is ok if you have a some subject knowledge that allows you sort the good information form the rubbish.
You're absolutely right, and I hate to admit that I am a chatgpt freeloader at this point. The free tier allows for limited access to the 5.3 engine and switches back to version 3.something after a certain number of exchanges (10 messages every so many hours). If you don't pay attention to the engine regression then you may end up chasing your tail round and round, it's that bad - actually even worse!
The 5.3 engine is fine and I came pretty close to taking the $20/month subscription before I discovered about the pro version with the engine version 5.4 - which is really good.
During evaluation sessions I ran code reviews with 5.4, 5.3 and 3.x.
5.4 is stellar !
5.3 is fine, but once you're exposed to 5.4 you want better ...
3.x is experimental garbage with probably 1/4 to 1/3 of its output wrong.
To get 5.4 one needs to have a Pro subscription for $200/month or be in the academic circles.
No longer in academia and frankly $200/month is out of my reach for occasional use.
The 5.3 for $20/month still an option but much less attractive once you played with 5.4.
 
My wife uses the $20 5.3 version of ChatGPT which writes 90% of the text in her documents, letters, and speeches for her national organization. She spent about a month training it and feeding it everything about the organization. And now she literally can do the work of a half dozen people and still have time to party with me. :party:
 
Replacing sip/ with pjsip/ didn't work either because apparently pjsip expects a trunk name rather than a domain name.
It didn't work because chan_pjsip doesn't have a default anonymous or outbound trunk like chan_sip did. You always need to send calls over an existing endpoint. Meaning if you want an anonymous or global outbound trunk you need to create the endpoints. To do SIP URI calling via chan_pjsip you need to do PJSIP/endpoint/sip:[email protected]:5060

PJSIP/endpoint = Dial first listed contact, ignore any other listed contacts
PJSIP/${EXTEN}@endpoint = Dial first listed contact but replace user portion of contact with ${EXTEN} value, ignore any other listed contacts
PJSIP/endpoint/sip uri = Dial out endpoint using this SIP URI, ignore any AOR contacts.

Then there is ${PJSIP_DIAL_CONTACTS(${EXTEN})} which will build a dial string of all AOR contacts for that endpoint.
 
@Samot : Thanks for the info. I tried to make such an endpoint in /etc/asterisk/pjsip.conf like this (the construct below is from chatgpt 5.3):

[anonymous-out]
type=endpoint
transport=transport-udp
context=from-internal
disallow=all
allow=ulaw
aors=anonymous-out

[anonymous-out]
type=aor
contact=sip:0.0.0.0

Then I used the following in the Lenny extension (in the dial field):

PJSIP/anonymous-out/sip:[email protected]:5060

After fconsole reload tried to dial 53669 but to no avail.

Do you see any obvious mistake?
 
Well there is no need for an AOR section since SIP URI ignores that. And without actually seeing some output from logs or a sip capture, I really can't say what happened.
 
So eventually I made it work by creating a pjsip trunk to "lenny.from-nv.com" called "lenny", and using "pjsip/53669@lenny" in the "dial" field of the LENNY custom extension.

Not sure if this is the simplest way, so I thought I should run this by the community which may suggest something simpler.

I got all the cues from chatgpt although I am not sure that was the most brilliant idea either.
AI was very creative - just having to search this forum. I came to the same solution here:

 

Members online

Forum statistics

Threads
26,712
Messages
174,573
Members
20,281
Latest member
RP1SP
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top