Help, how to get device to register as chan_sip on non standard port while pjsip is also active, works for softphone but both ATA try to use PJSIP despite being configured to use chan_sip port
I tried searching, but came up empty, part of the problem is not being sure of what search terms I should be using, I seemed to get the most hits with “chan_sip pjsip port” but did not return anything relevant.
So I have been using gvsip for a while now, and it has been working great! However I am wanting to try chan_sip instead of pjsip for my extensions, that way the only thing using pjsip will be the google voice trunk.
On my Softphone CSipSimple, I was able to create a basic account with username and password and direct it to my asterisk IPaddress:port using the chan_sip port of 5160: 192.168.5.240:5160
This allows it to register as CHAN_SIP on the softphone, and the softphone is able to make and receive calls.
If I do the same thing with either of my two ATA devices (HT802 and PAP2T) by making sure their port is set to 5160 instead of 5060, and create the extension as chan_sip in FreePBX, then they will NOT register. If I pickup and try to place a call, I can see in the asterisk CLI that they are trying to be forced to using PJsip instead of chan_sip despite being configured to the correct port for chan_sip:
I found a way to get the HT802 and PAP2T to register and work, although I think I just found a round about back assward way of making them work that is probably not even the intended way of using them.
So if I create a PJSIP extension for HT802 and PAP2T , BUT have those two devices configured to use the chan_sip port, then they will register and function, this is the only way I have managed to get those two ATA devices to work. I am thinking I must be doing something wrong, but I am not so sure because the softphone CSipSimple seems to be working correctly unlike the HT802 and PAP2T
here is a log of me trying to place a call from extension 5001 (HT802 chan_sip port 5160)
<--- Received SIP request (1121 bytes) from UDP:192.168.5.154:5160 --->
INVITE sip:13604276226@192.168.5.240 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.154:5160;branch=z9hG4bK506859590;rport
From: "5001" <sip:5001@192.168.5.240>;tag=732649100
To: <sip:13604276226@192.168.5.240>
Call-ID: 479303005-5160-5@BJC.BGI.B.BFE
CSeq: 30 INVITE
Contact: "5001" <sip:5001@192.168.5.154:5160>
Max-Forwards: 70
User-Agent: Grandstream HT802 1.0.3.2
Privacy: none
P-Preferred-Identity: "5001" <sip:5001@192.168.5.240>
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 454
v=0
o=5001 8000 8000 IN IP4 192.168.5.154
s=SIP Call
c=IN IP4 192.168.5.154
t=0 0
m=audio 5004 RTP/AVP 0 123 8 4 18 2 97 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:123 opus/48000/2
a=fmtp:123 maxplaybackrate=16000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:2 G726-32/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32-36,54
[2018-07-29 11:07:26] ERROR[6877]: res_pjsip.c:3438 ast_sip_set_tpselector_from_transport_name: Unable to retrieve PJSIP transport 'udp,tcp,ws,wss'
<--- Transmitting SIP response (348 bytes) to UDP:192.168.5.154:5160 --->
SIP/2.0 500 Internal Server Error
Via: SIP/2.0/UDP 192.168.5.154:5160;rport=5160;received=192.168.5.154;branch=z9hG4bK506859590
Call-ID: 479303005-5160-5@BJC.BGI.B.BFE
From: "5001" <sip:5001@192.168.5.240>;tag=732649100
To: <sip:13604276226@192.168.5.240>;tag=z9hG4bK506859590
CSeq: 30 INVITE
Server: FPBX-14.0.3.6(15)
Content-Length: 0
<--- Received SIP request (297 bytes) from UDP:192.168.5.154:5160 --->
ACK sip:13604276226@192.168.5.240 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.154:5160;branch=z9hG4bK506859590;rport
From: "5001" <sip:5001@192.168.5.240>;tag=732649100
To: <sip:13604276226@192.168.5.240>;tag=z9hG4bK506859590
Call-ID: 479303005-5160-5@BJC.BGI.B.BFE
CSeq: 30 ACK
Content-Length: 0
<--- Received SIP request (553 bytes) from UDP:192.168.5.154:5160 --->
REGISTER sip:192.168.5.240 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.154:5160;branch=z9hG4bK621769056;rport
From: "5001" <sip:5001@192.168.5.240>;tag=1413644956
To: <sip:5001@192.168.5.240>
Call-ID: 49576363-5160-2@BJC.BGI.B.BFE
CSeq: 2001 REGISTER
Contact: <sip:5001@192.168.5.154:5160>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B82A69986>"
Max-Forwards: 70
User-Agent: Grandstream HT802 1.0.3.2
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE
Content-Length: 0
<--- Transmitting SIP response (333 bytes) to UDP:192.168.5.154:5160 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.5.154:5160;rport=5160;received=192.168.5.154;branch=z9hG4bK621769056
Call-ID: 49576363-5160-2@BJC.BGI.B.BFE
From: "5001" <sip:5001@192.168.5.240>;tag=1413644956
To: <sip:5001@192.168.5.240>;tag=z9hG4bK621769056
CSeq: 2001 REGISTER
Server: FPBX-14.0.3.6(15)
Content-Length: 0
notice these two lines:
Unable to retrieve PJSIP transport ‘udp,tcp,ws,wss’ (it should be trying chan_sip not pjsip I think)
SIP/2.0 403 Forbidden (and then 403 forbidden, although i will register just fine if i disable pjsip or make the extension pjsip but use the chan_sip port)