SOLVED bridge Inbound transport=udp to outbound transport=tls

Status
Not open for further replies.
Jul 14, 2020
36
3
8
Singapore
www.zionengage.me
Hello,
thank you for helping.
I have the following scenario (TLS is enabled in SIP profile both Internal & External):
========================
caller incoming (udp 5080) to Server A (udp 5080). Server A should bridge call to Server B (over tls 5081).
========================

I am just testing out but seem not able because I am getting in the Invite showing is UDP and not TLS.

Please share with me how in Dialplan -> Inbound routes, I should set up to achieve it? Doable?

Thanks.

INVITE sip:68176331@sip.server.b.com:5061 SIP/2.0
Via: SIP/2.0/UDP sip.server.a.sg:5081;rport;branch=z9hG4bKFvSceyc2D84aF
Max-Forwards: 67
From: "69507009" <sip:69507009@sip.server.a.sg>;tag=0K0t3a1gN47Fr
To: <sip:68176331@sip.server.b.com:5061>
Call-ID: 07ec8633-73de-123d-9da1-9aac180d09ce
CSeq: 81933363 INVITE
Contact: <sip:mod_sofia@sip.server.a.sg:5081>
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Privacy: none
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 275
X-FS-Support: update_display,send_info
P-Asserted-Identity: "69507009" <sip:69507009@sip.server.a.sg>
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,497
413
83
If I'm understanding your question correctly, bridging outbound using TLS is fairly straight forward. You can pass all the required parameters in the bridge statement:

Code:
<action application="bridge" data="{rtp_secure_media=true}sofia/internal/$1@server.b.com:5061;transport=tls"/>

In the above example, we set a channel variable to enable encrypted RTP, {rtp_secure_media=true}, this is optional depending on your requirements. We are using the internal SIP profile in this example. $1 is holding the number you wish to call. Then we provide the destination server name and port. And finally add the parameter transport=tls
 
Jul 14, 2020
36
3
8
Singapore
www.zionengage.me
If I'm understanding your question correctly, bridging outbound using TLS is fairly straight forward. You can pass all the required parameters in the bridge statement:

Code:
<action application="bridge" data="{rtp_secure_media=true}sofia/internal/$1@server.b.com:5061;transport=tls"/>

In the above example, we set a channel variable to enable encrypted RTP, {rtp_secure_media=true}, this is optional depending on your requirements. We are using the internal SIP profile in this example. $1 is holding the number you wish to call. Then we provide the destination server name and port. And finally add the parameter transport=tls
Thank you. This working. Now I have one more Question:
I now statically {sip_from_uri=sip:+6512345678@test.mydomain.sg<+6512345678@test.mydomain.sg>}. Is there a way to do it with variable for example {sip_from_uri=sip:$1@test.mydomain.sg<$1@test.mydomain.sg>} ?
 
Status
Not open for further replies.