I registered two extensions in different asterisk servers and trying to call from linphone1 to linphone2. Created a Pjsip trunk in asterisk1 which will register with asterisk2. Im able to place the call using TLS. However, the crypto key exchange is not happening between the asterisk systems. Linpnone1 is sending the keys but asterisk1 discarding the keys and sending the invite to asterisk2. I have enabled 256 flag on both asterisks. Can someone help me how I can acheive 256 encryption between two servers.
I also tried adding media_encryption parameter in trunk config but at that time I got negotiation error. Not sure how to acheive this. Does asterisk to asterisk support 256 encryption?
You would need to provide the actual configuration. Additionally, Asterisk is a B2BUA and not a proxy, each call leg is completely separate which includes encryption.
[transport-tls]
type=transport
protocol=tls
bind=0.0.0.0:5162
external_media_address=XX XX XX XX
external_signaling_address=XX XX XX XX
ca_list_file=/etc/asterisk/keys_velapro/ca.crt
cert_file=/etc/asterisk/keys_velapro/velaprosip-fullchain.crt
priv_key_file=/etc/asterisk/keys_velapro/velaprosip.key
method=tlsv1_2
[to-serverB]
; route extensions starting with 6XXX to Server B
exten => _5XXX,1,set(CALLERID(num)=12345)
same => n,Dial(PJSIP/${EXTEN}@12345)
same => n,Hangup()
Im calling from 6005 to 5005. the traffic between softphone and asterisk is encrypting with 256 aes at both ends as we can see the key exchange but between asterisk to asterisk there is no key exchange its a plain invite