I'm trying to configure a yate server using a sip trunk but it seems to fail at an very early stage when a call is made.
Auth is per IP (no username/password needed) and sRTP + TLS must be used.
20160229170153.746701 <sip:ALL> Transport(tls:18-[sip trunk ip]:5061) attempt to connect to '[sip trunk ip]:5061' [0x7f519c067420]
20160229170153.763959 <sip:ALL> Transport(tls:18-[sip trunk ip]:5061) connected local=[local server ip]:50943 remote=[sip trunk ip]:5061 [0x7f519c067420]
20160229170153.769137 <sip:INFO> 'tls:[local server ip]:50943-[sip trunk ip]:5061' sending 'INVITE sip:[called number]@[sip trunk ip]:5061' 0x7f519c026390 [0x7f519c067420]
------
INVITE sip:[called number]@[sip trunk ip]:5061 SIP/2.0
Max-Forwards: 19
Via: SIP/2.0/TLS [local server ip]:5061;alias;rport;branch=z9hG4bK137996875
From: <sip:+[caller number]@[local server ip]>;tag=391086973
To: <sip:[called number]@[sip trunk ip]:5061>
Call-ID: 2017592690@[local server ip]
CSeq: 201 INVITE
User-Agent: YATE/5.0.0
Contact: <sip:+[caller number]@[local server ip]:5061>
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Type: application/sdp
Content-Length: 318
v=0
o=yate 1456765312 1456765312 IN IP4 [local public ip]
s=SIP Call
c=IN IP4 [local public ip]
t=0 0
m=audio 23590 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:yezuQ6YLQ1ZVv6mQU3ugNCCHpac/3jzTLBDhhGsg
a=encryption:optional
------
20160229170153.815592 <openssl:MILD> Failed SSLv3 read finished A [0x7f51a4021100]
20160229170153.815704 <sip:WARN> Transport(tls:18-[sip trunk ip]:5061) Socket send error: Invalid argument (22) [0x7f519c067420]
------
in regexroute i have this:
^0.\(.*\)$=sip/sip:${called}@[sip trunk ip]:5061;\
caller=+[local prefix number]${caller};\
oip_transport=tls;\
why do i get "Socket send error: Invalid argument (22)"? openssl.conf is configured / the local tls listening port (tcp/5061) seems to basicly work.
(i've replaced ip / number with [ip] [number])