When I changed the channel drive to chan_sip to chan_pjsip, the SIP response to OPTIONS request was changed, it was used to response to TCP port 5060 in chan_sip, but in chan_pjsip it is responding to original port of the request, is there any way I can force it to respond to TCP port 5060?
Debug log for reference:
CHAN_SIP:
<— SIP read from TCP:x.x.31.40:29778 —>
OPTIONS sip:asterisk SIP/2.0
From: < sip:x.x.31.40 >;tag=809ea16429d9e8179a05bd6969100
To: < sip:asterisk >
Call-ID: 809ea16429d9e8179a05bd6969100
CSeq: 21003 OPTIONS
Max-Forwards: 70
Via: SIP/2.0/TCP x.x.31.40;branch=z9hG4bK809ea16429d9e817aa05bd6969100
User-Agent: Avaya CM/R016x.03.0.124.0
Contact: < sip:invalid x.x.31.40;transport=tcp >
Route: < sip:x.x.34.155;transport=tcp;lr >
Expires: 0
Content-Length: 0
<— Transmitting (no NAT) to x.x.31.40:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/TCP x.x.31.40;branch=z9hG4bK809ea16429d9e817aa05bd6969100;received=x.x.31.40
From: < sip:x.x.31.40 >;tag=809ea16429d9e8179a05bd6969100
To: < sip:asterisk >;tag=as689d17f2
Call-ID: 809ea16429d9e8179a05bd6969100
CSeq: 21003 OPTIONS
Server: Asterisk PBX 16.0.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: < sip:x.x.34.155:5060;transport=tcp >
Accept: application/sdp
Content-Length: 0
CHAN_PJSIP:
<— Received SIP request (439 bytes) from TCP:x.x.31.40:26243 —>
OPTIONS sip:asterisk SIP/2.0
From: < sip:x.x.31.40 >;tag=0fed5a02bd9e8158a65bd6969100
To: < sip:asterisk >
Call-ID: 0fed5a02bd9e8158a65bd6969100
CSeq: 27168 OPTIONS
Max-Forwards: 70
Via: SIP/2.0/TCP x.x.31.40;branch=z9hG4bK0fed5a02bd9e8159a65bd6969100
User-Agent: Avaya CM/R016x.03.0.124.0
Contact: < sip:invalid x.x.31.40;transport=tcp >
Route: < sip:x.x.34.155;transport=tcp;lr >
Expires: 0
Content-Length: 0
<— Transmitting SIP response (522 bytes) to TCP:x.x.31.40:26243 —>
SIP/2.0 200 OK
Via: SIP/2.0/TCP x.x.31.40;received=x.x.31.40;branch=z9hG4bK0fed5a02bd9e8159a65bd6969100
Call-ID: 0fed5a02bd9e8158a65bd6969100
From: < sip:x.x.31.40 >;tag=0fed5a02bd9e8158a65bd6969100
To: < sip:asterisk >;tag=z9hG4bK0fed5a02bd9e8159a65bd6969100
CSeq: 27168 OPTIONS
Accept: application/sdp
Allow: OPTIONS, REGISTER, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE
Supported: 100rel, timer
Accept-Encoding: text/plain
Accept-Language: en
Server: Asterisk PBX 16.0.0
Content-Length: 0