Project

General

Profile

Changing port for kamailio and asterisk

Added by Shivam Agrawal 21 days ago

Hi,

I have been using GOautodial for around a month and things were great. Until my sip provider blocked requests from all port except 5060.
Since currently asterisk runs on 5070 requests from that. I am able to change asterisk port to 5060 but I am unable to change kamailio port which is running at 5060 currently.
Due to which I am unable to hear voice on my softphone after changing asterisk port and calling.
I have attached logs of asterisk while I login to dialer.
Someone please help me with this and Thanks in advance.

[[Audio is at 17024
Adding codec opus to SDP
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 127.0.0.1:5060:
INVITE sip: SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK40fc3226;rport
Max-Forwards: 70
From: "S2006221530408600051" <sip:>;tag=as2b79611e
To: <sip:>
Contact: <sip::5060>
Call-ID: :5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 13.17.2-vici
Date: Mon, 22 Jun 2020 10:00:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Remote-Party-ID: "S2006221530408600051" <sip:>;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 308

v=0
o=root 1014497388 1014497388 IN IP4 127.0.0.1
s=Asterisk PBX 13.17.2-vici
c=IN IP4 127.0.0.1
t=0 0
m=audio 17024 RTP/AVP 107 0 101
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv


<--- SIP read from UDP:127.0.0.1:5060 --->
INVITE sip: SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK40fc3226;rport
Max-Forwards: 70
From: "S2006221530408600051" <sip:>;tag=as2b79611e
To: <sip:>
Contact: <sip::5060>
Call-ID: :5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 13.17.2-vici
Date: Mon, 22 Jun 2020 10:00:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Remote-Party-ID: "S2006221530408600051" <sip:>;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 308

v=0
o=root 1014497388 1014497388 IN IP4 127.0.0.1
s=Asterisk PBX 13.17.2-vici
c=IN IP4 127.0.0.1
t=0 0
m=audio 17024 RTP/AVP 107 0 101
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv
<------------->
--- (15 headers 14 lines) ---
Sending to 127.0.0.1:5060 (NAT)
Sending to 127.0.0.1:5060 (NAT)
Using INVITE request as basis request - :5060
Found peer 'kamailio' for '5164536886' from 127.0.0.1:5060
Found RTP audio format 107
Found RTP audio format 0
Found RTP audio format 101
Found audio description format opus for ID 107
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (opus|ulaw), peer - audio=(ulaw|opus)/video=(nothing)/text=(nothing), combined - (opus|ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 127.0.0.1:17024
Looking for 7495393220 in default (domain vaglxc01.goautodial.com)

<--- Reliably Transmitting (NAT) to 127.0.0.1:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK40fc3226;received=127.0.0.1;rport=5060
From: "S2006221530408600051" <sip:>;tag=as2b79611e
To: <sip:>;tag=as11d93721
Call-ID: :5060
CSeq: 102 INVITE
Server: Asterisk PBX 13.17.2-vici
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ':5060' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:127.0.0.1:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK40fc3226;received=127.0.0.1;rport=5060
From: "S2006221530408600051" <sip:>;tag=as2b79611e
To: <sip:>;tag=as11d93721
Call-ID: :5060
CSeq: 102 INVITE
Server: Asterisk PBX 13.17.2-vici
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
Transmitting (NAT) to 127.0.0.1:5060:
ACK sip: SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK40fc3226;rport
Max-Forwards: 70
From: "S2006221530408600051" <sip:>;tag=as2b79611e
To: <sip:>;tag=as11d93721
Contact: <sip::5060>
Call-ID: :5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 13.17.2-vici
Content-Length: 0


<--- SIP read from UDP:127.0.0.1:5060 --->
ACK sip: SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK40fc3226;rport
Max-Forwards: 70
From: "S2006221530408600051" <sip:>;tag=as2b79611e
To: <sip:>;tag=as11d93721
Contact: <sip::5060>
Call-ID: :5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 13.17.2-vici
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
Really destroying SIP dialog ':5060' Method: ACK
Scheduling destruction of SIP dialog ':5060' in 6400 ms (Method: INVITE)
Really destroying SIP dialog ':5060' Method: INVITE
Really destroying SIP dialog ':5060' Method: OPTIONS]]

Thanks and Regards,
Shivam A.


Replies (1)

RE: Changing port for kamailio and asterisk - Added by Demian Lizandro Biscocho 14 days ago

Asterisk port 5070 only applies to incoming calls to Asterisk. All outgoing SIP calls uses standard 5060. It's possible to interchange Kamailio 5060 to 5070 and Asterisk's 5070 to 5060 or have Asterisk and Kamailio on separate boxes so both can use 5060.

    (1-1/1)
    Go to top