Asterisk as SIP client (register) over TCP

Hello. I need to use Asterisk as a SIP client to a provider. This provider is only able to open up a SIP server over TCP. UDP is not possible. Normally I use “register => user:pass@server.com/exten” in my sip.conf and it works, but only over UDP. I tried adding tcpenable and tcpbindaddr to [general] in sip.conf and also create a peer with “transport=tcp” in the same file. But it doesn’t help. When I’m looking at packets via tcpdump/wireshark, Asterisk is still sending the SIP Register packet over UDP.

Is there any way to make Asterisk send SIP REGISTER packet over TCP as a SIP client (like a softphone)?

Thank you for your help!

According to the chan_sip documentation[1] the transport has to be specified in the register line.

[1] https://github.com/asterisk/asterisk/blob/master/configs/samples/sip.conf.sample#L779

1 Like

Thank you @jcolp this was exactly what I needed!

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