Calling from internal endpoint to external

I have internal endpoints can make internal calls using TLS.

I have 2 registration using UDP

I receive calls from external to internal successfully.

But i cannot make calls from internal to external.

I detect this log

INVITE sip:905386366094@voip.erecrm.com;transport=TLS SIP/2.0

I think the error at transport=TLS. Because the outside need udp protocol.

Could you help me to resolve this issue?

You need to provide a complete Asterisk console log and SIP log. Asterisk doesn’t act as a proxy, and each call leg is independent, so if that’s actually the incoming TLS side then that would be expected.

<--- Received SIP request (888 bytes) from TLS:176.43.6.98:53197 --->
INVITE sip:905386366094@voip.erecrm.com;transport=TLS SIP/2.0
Via: SIP/2.0/TLS 192.168.1.4:35219;branch=z9hG4bK-524287-1---dcef34db6ac2d079;rport
Max-Forwards: 70
Contact: <sip:100@176.43.6.98:53197;transport=TLS>
To: <sip:905386366094@voip.erecrm.com>
From: <sip:100@voip.erecrm.com;transport=TLS>;tag=a524e827
Call-ID: g0cHNEhwl5QfLKvuAPjiXA..
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Zoiper v2.10.20.3
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 194

v=0
o=Zoiper 0 678670705 IN IP4 176.43.6.98
s=Zoiper
c=IN IP4 176.43.6.98
t=0 0
m=audio 50618 RTP/AVP 0 101 8 3
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
a=rtcp-mux

<--- Transmitting SIP response (513 bytes) to TLS:176.43.6.98:53197 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/TLS 192.168.1.4:35219;rport=53197;received=176.43.6.98;branch=z9hG4bK-524287-1---dcef34db6ac2d079
Call-ID: g0cHNEhwl5QfLKvuAPjiXA..
From: <sip:100@voip.erecrm.com>;tag=a524e827
To: <sip:905386366094@voip.erecrm.com>;tag=z9hG4bK-524287-1---dcef34db6ac2d079
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1717664239/f8e5193b752e4e2f33550652e1db15b8",opaque="74d909e21c002c32",algorithm=MD5,qop="auth"
Server: Asterisk PBX 18.21.0
Content-Length:  0


<--- Received SIP request (372 bytes) from TLS:176.43.6.98:53197 --->
ACK sip:905386366094@voip.erecrm.com;transport=TLS SIP/2.0
Via: SIP/2.0/TLS 192.168.1.4:35219;branch=z9hG4bK-524287-1---dcef34db6ac2d079;rport
Max-Forwards: 70
To: <sip:905386366094@voip.erecrm.com>;tag=z9hG4bK-524287-1---dcef34db6ac2d079
From: <sip:100@voip.erecrm.com;transport=TLS>;tag=a524e827
Call-ID: g0cHNEhwl5QfLKvuAPjiXA..
CSeq: 1 ACK
Content-Length: 0


<--- Received SIP request (1195 bytes) from TLS:176.43.6.98:53197 --->
INVITE sip:905386366094@voip.erecrm.com;transport=TLS SIP/2.0
Via: SIP/2.0/TLS 192.168.1.4:35219;branch=z9hG4bK-524287-1---824298c0d3fcc720;rport
Max-Forwards: 70
Contact: <sip:100@176.43.6.98:53197;transport=TLS>
To: <sip:905386366094@voip.erecrm.com>
From: <sip:100@voip.erecrm.com;transport=TLS>;tag=a524e827
Call-ID: g0cHNEhwl5QfLKvuAPjiXA..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Zoiper v2.10.20.3
Authorization: Digest username="100",realm="asterisk",nonce="1717664239/f8e5193b752e4e2f33550652e1db15b8",uri="sip:905386366094@voip.erecrm.com;transport=TLS",response="efb706a9d0501f9cb5aa3b6961991192",cnonce="999cac56e55ee1ce85d9427029f4857e",nc=00000001,qop=auth,algorithm=MD5,opaque="74d909e21c002c32"
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 194

v=0
o=Zoiper 0 678670705 IN IP4 176.43.6.98
s=Zoiper
c=IN IP4 176.43.6.98
t=0 0
m=audio 50618 RTP/AVP 0 101 8 3
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
a=rtcp-mux

<--- Transmitting SIP response (321 bytes) to TLS:176.43.6.98:53197 --->
SIP/2.0 100 Trying
Via: SIP/2.0/TLS 192.168.1.4:35219;rport=53197;received=176.43.6.98;branch=z9hG4bK-524287-1---824298c0d3fcc720
Call-ID: g0cHNEhwl5QfLKvuAPjiXA..
From: <sip:100@voip.erecrm.com>;tag=a524e827
To: <sip:905386366094@voip.erecrm.com>
CSeq: 2 INVITE
Server: Asterisk PBX 18.21.0
Content-Length:  0


    -- Executing [905386366094@internals:1] Goto("PJSIP/100-00000004", "to-sip,_[9]XXXXXXXXXXX,1") in new stack
    -- Goto (to-sip,_[9]XXXXXXXXXXX,1)
    -- Executing [_[9]XXXXXXXXXXX@to-sip:1] Log("PJSIP/100-00000004", "Notice,Extrnal call from 100 to _[9]XXXXXXXXXXX") in new stack
[Jun  6 11:57:19] NOTICE[104595][C-00000003]: Ext. _[9]XXXXXXXXXXX:1 @ to-sip: Extrnal call from 100 to _[9]XXXXXXXXXXX
    -- Executing [_[9]XXXXXXXXXXX@to-sip:2] Dial("PJSIP/100-00000004", "PJSIP/[9]XXXXXXXXXXX@ext_6440434,25") in new stack
    -- Called PJSIP/[9]XXXXXXXXXXX@ext_6440434
<--- Transmitting SIP request (901 bytes) to UDP:91.93.35.171:5060 --->
INVITE sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr SIP/2.0
Via: SIP/2.0/UDP 192.168.1.170:21300;rport;branch=z9hG4bKPjc7e02180-23e2-11ef-9fdc-00155d016406
From: "Waled" <sip:100@192.168.1.170>;tag=c7dffa35-23e2-11ef-9fdc-00155d016406
To: <sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr>
Contact: <sip:asterisk@192.168.1.170:21300>
Call-ID: c7dffa76-23e2-11ef-9fdc-00155d016406
CSeq: 23437 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, INFO, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.21.0
Content-Type: application/sdp
Content-Length:   191

v=0
o=- 449198725 449198725 IN IP4 (null)
s=Asterisk
c=IN IP4 (null)
t=0 0
m=audio 19580 RTP/AVP 0 8
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=ptime:20
a=maxptime:140
a=sendrecv

<--- Received SIP response (415 bytes) from UDP:91.93.35.171:5060 --->
SIP/2.0 100 Giving it a try
Via: SIP/2.0/UDP 192.168.1.170:21300;received=176.43.6.98;rport=21300;branch=z9hG4bKPjc7e02180-23e2-11ef-9fdc-00155d016406
To: <sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr>
From: "Waled" <sip:100@192.168.1.170>;tag=c7dffa35-23e2-11ef-9fdc-00155d016406
Call-ID: c7dffa76-23e2-11ef-9fdc-00155d016406
CSeq: 23437 INVITE
Server: Sippy Softswitch v2021-PRODUCTION.413
Content-Length: 0


<--- Received SIP response (626 bytes) from UDP:91.93.35.171:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.170:21300;received=176.43.6.98;rport=21300;branch=z9hG4bKPjc7e02180-23e2-11ef-9fdc-00155d016406
Record-Route: <sip:91.93.35.171;ftag=c7dffa35-23e2-11ef-9fdc-00155d016406;lr>
From: Waled <sip:100@192.168.1.170>;tag=c7dffa35-23e2-11ef-9fdc-00155d016406
To: <sip:%5B9%5DXXXXXXXXXXX@sip1.voip.com.tr>;tag=6bdded3f9206131d82cf9ce77d20e70b
Call-ID: c7dffa76-23e2-11ef-9fdc-00155d016406
CSeq: 23437 INVITE
Server: Sippy Softswitch v2021-PRODUCTION.413
WWW-Authenticate: Digest realm="sippysoft.com",nonce="YxDCc4P3rjGv3fYjH6h3nC32PqoZrr0eX7abLAxI2CE"
Content-Length: 0


<--- Transmitting SIP request (452 bytes) to UDP:91.93.35.171:5060 --->
ACK sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr SIP/2.0
Via: SIP/2.0/UDP 192.168.1.170:21300;rport;branch=z9hG4bKPjc7e02180-23e2-11ef-9fdc-00155d016406
From: "Waled" <sip:100@192.168.1.170>;tag=c7dffa35-23e2-11ef-9fdc-00155d016406
To: <sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr>;tag=6bdded3f9206131d82cf9ce77d20e70b
Call-ID: c7dffa76-23e2-11ef-9fdc-00155d016406
CSeq: 23437 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.21.0
Content-Length:  0


<--- Transmitting SIP request (1116 bytes) to UDP:91.93.35.171:5060 --->
INVITE sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr SIP/2.0
Via: SIP/2.0/UDP 192.168.1.170:21300;rport;branch=z9hG4bKPjc7e2a811-23e2-11ef-9fdc-00155d016406
From: "Waled" <sip:100@192.168.1.170>;tag=c7dffa35-23e2-11ef-9fdc-00155d016406
To: <sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr>
Contact: <sip:asterisk@192.168.1.170:21300>
Call-ID: c7dffa76-23e2-11ef-9fdc-00155d016406
CSeq: 23438 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, INFO, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.21.0
Authorization: Digest username="908506440434", realm="sippysoft.com", nonce="YxDCc4P3rjGv3fYjH6h3nC32PqoZrr0eX7abLAxI2CE", uri="sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr", response="19bb038f9995ae014c70e976bbb8c2cb"
Content-Type: application/sdp
Content-Length:   191

v=0
o=- 449198725 449198725 IN IP4 (null)
s=Asterisk
c=IN IP4 (null)
t=0 0
m=audio 19580 RTP/AVP 0 8
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=ptime:20
a=maxptime:140
a=sendrecv

<--- Received SIP response (415 bytes) from UDP:91.93.35.171:5060 --->
SIP/2.0 100 Giving it a try
Via: SIP/2.0/UDP 192.168.1.170:21300;received=176.43.6.98;rport=21300;branch=z9hG4bKPjc7e2a811-23e2-11ef-9fdc-00155d016406
To: <sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr>
From: "Waled" <sip:100@192.168.1.170>;tag=c7dffa35-23e2-11ef-9fdc-00155d016406
Call-ID: c7dffa76-23e2-11ef-9fdc-00155d016406
CSeq: 23438 INVITE
Server: Sippy Softswitch v2021-PRODUCTION.413
Content-Length: 0


<--- Received SIP response (576 bytes) from UDP:91.93.35.171:5060 --->
SIP/2.0 403 Auth Failed (1)
Via: SIP/2.0/UDP 192.168.1.170:21300;received=176.43.6.98;rport=21300;branch=z9hG4bKPjc7e2a811-23e2-11ef-9fdc-00155d016406
Record-Route: <sip:91.93.35.171;ftag=c7dffa35-23e2-11ef-9fdc-00155d016406;lr>
From: Waled <sip:100@192.168.1.170>;tag=c7dffa35-23e2-11ef-9fdc-00155d016406
To: <sip:%5B9%5DXXXXXXXXXXX@sip1.voip.com.tr>;tag=25094af15e29aaef4031e3238dccd4a1
Call-ID: c7dffa76-23e2-11ef-9fdc-00155d016406
CSeq: 23438 INVITE
Server: Sippy Softswitch v2021-PRODUCTION.413
Reason: Q.850; cause=21; text="Call rejected"
Content-Length: 0


<--- Transmitting SIP request (452 bytes) to UDP:91.93.35.171:5060 --->
ACK sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr SIP/2.0
Via: SIP/2.0/UDP 192.168.1.170:21300;rport;branch=z9hG4bKPjc7e2a811-23e2-11ef-9fdc-00155d016406
From: "Waled" <sip:100@192.168.1.170>;tag=c7dffa35-23e2-11ef-9fdc-00155d016406
To: <sip:%5b9%5dXXXXXXXXXXX@sip1.voip.com.tr>;tag=25094af15e29aaef4031e3238dccd4a1
Call-ID: c7dffa76-23e2-11ef-9fdc-00155d016406
CSeq: 23438 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.21.0
Content-Length:  0


  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [_[9]XXXXXXXXXXX@to-sip:3] Hangup("PJSIP/100-00000004", "") in new stack
  == Spawn extension (to-sip, _[9]XXXXXXXXXXX, 3) exited non-zero on 'PJSIP/100-00000004'
<--- Transmitting SIP response (389 bytes) to TLS:176.43.6.98:53197 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/TLS 192.168.1.4:35219;rport=53197;received=176.43.6.98;branch=z9hG4bK-524287-1---824298c0d3fcc720
Call-ID: g0cHNEhwl5QfLKvuAPjiXA..
From: <sip:100@voip.erecrm.com>;tag=a524e827
To: <sip:905386366094@voip.erecrm.com>;tag=c7dfaa9c-23e2-11ef-9fdc-00155d016406
CSeq: 2 INVITE
Server: Asterisk PBX 18.21.0
Reason: Q.850;cause=21
Content-Length:  0


<--- Received SIP request (373 bytes) from TLS:176.43.6.98:53197 --->
ACK sip:905386366094@voip.erecrm.com;transport=TLS SIP/2.0
Via: SIP/2.0/TLS 192.168.1.4:35219;branch=z9hG4bK-524287-1---824298c0d3fcc720;rport
Max-Forwards: 70
To: <sip:905386366094@voip.erecrm.com>;tag=c7dfaa9c-23e2-11ef-9fdc-00155d016406
From: <sip:100@voip.erecrm.com;transport=TLS>;tag=a524e827
Call-ID: g0cHNEhwl5QfLKvuAPjiXA..
CSeq: 2 ACK
Content-Length: 0

I think the error here

From: “Waled” sip:100@192.168.1.170;tag=c7dffa35-23e2-11ef-9fdc-00155d016406
To: sip:[9]XXXXXXXXXXX@sip1.voip.com.tr;tag=25094af15e29aaef4031e3238dccd4a1

he did not use the registration information but it used the internal information

According to the output the dialplan has been written to send the call to “ext_6440434” which rejected the call due to “SIP/2.0 403 Auth Failed (1)”. The extension called at it is also prefixed with “[9]” which may or may not be correct. The SDP from Asterisk also contains “(null)” which is a problem, and could be configuration related or the hostname of the system isn’t in /etc/hosts or DNS.

When you are the registrant, only incoming calls use information from the registration. Outgoing calls will use the information in your type=aor section and from the dialplan, neither of which have been provided. Registration is about telling the registrar how to send calls to you.

Also, when providing logs, set the verbosity to, at least three, and take them from /var/log/full, which you may have to enable, not from a screen scrape.

The problem was finished.

I have added the following lines to the endpoint settings

from_user = 908506440434
from_domain = sip1.voip.com.tr

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.