Being PJSIP the next preferred choice, no particular problems are met in registering SIP phones
When an ISP provides you a SIP trunk, instead, no immediate registration is possible as with standard SIP protocol.
Is there any “SIPtoPJSIP trunk howto” available somewhere ?
Are you asking if you have setup X for a working CHAN trunk, how do you take that CHAN configuration and make it work on a PJSIP configuration? If yes, we are having the same trouble translating our Avaya SM Chan trunk to a an PJSIP trunk. We are still trying to figure that out.
I think this is the wrong approach since the stacks work a little differently and there’s not a one-for-one configuration option translation. Better to understand the specifications of the trunk and set it up in PJSIP afresh.
I mean when I try to register a new ISP SIP trunk in a fresh Freepbx (PJSIP on port 5060) I can’t get it work (no matching endpoint found) due to port 5061 instead of 5060 an vice-versa.
I suppose is a very common scenario : ISP asks only for a SIP protocol on port 5060
For now (because of hurry) I switched all back to SIP(5060)
PJSIP on 5060 is not the problem. The problem is that you are confused because there are two SIP stacks and you don’t understand port assignments. So I am recommending you disable one of the stacks–chan_sip, since you are asking here about pjsip–and then set PJSIP to the standard ports and proceed with configuration.
In general:
register => user[:secret[:authuser]]@host[:port][/extension]
becomes
Username: user
Auth username: authuser
Secret: secret
SIP Server: host
SIP Server Port: port
Contact User: extension
If you are saying that registration is apparently ok but incoming calls fail with (no matching endpoint found), this most likely has nothing to do with ports. Set Match (Permit) to the list of IP addresses from which the provider can send calls.
I would start with a pjsip trunk and see what errors I get. They are usually easy to resolve. If you have a lot of trouble and this forum doesn’t help, switching to chan_sip makes sense.
BTW, if you have a static IP address and the provider doesn’t require registration, don’t use it. IP auth is simpler and more robust.
Ok, somewhat clearer now…
I got my new test distro with default PJSIP on 5060
I set up a PJSIP trunk against ISP “SIP trunk” , I got it registered and working for incoming calls.
For outgoing calls i get an error:
Called PJSIP/067345364@PJSIPtrunk
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:35] NoOp(“PJSIP/501-0000000a”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21”) in new stack
Post the working chan_sip settings and we’ll try to translate into pjsip. Make it clear what each parameter is, for example
username=uuuu
secret=pppp
fromuser=uuuu host=sip.provider.com