How to dial OSTN address (ostel.co), how to redirect incoming calls (302)

Support zone
Post Reply
tempuser
Posts: 2
Joined: Wed Sep 16, 2015 8:21 pm

How to dial OSTN address (ostel.co), how to redirect incoming calls (302)

Post by tempuser » Wed Sep 16, 2015 8:59 pm

How do I dial an OSTN address? The following dial plan doesn't work.

sys.Dial("xxxx@ostel.co:5061;transport=tls")
DialPlan 20:52:00:458 sip1(4532): Commencing Dial with: xxxx@ostel.co:5061;transport=tls.
DialPlan 20:52:00:490 sip1(4532): Attempting to locate a provider for call leg: sip:xxxx@ostel.co:5061;transport=tls.
DialPlan 20:52:00:505 sip1(4532): ForkCall commencing call leg to sip:xxxx@ostel.co:5061;transport=tls.
DialPlan 20:52:00:552 sip1(4532): Switching to sip:xxxx@ostel.co:5061 via udp:67.222.131.147:5060.
DialPlan 20:52:00:552 sip1(4532): SDP on UAC call had public IP not mangled, RTP socket 212.79.111.155:17674.
DialPlan 20:52:32:876 sip1(4532): Dialplan cleanup for xxxxxx.
DialPlan 20:52:33:157 sip1(4532): Dial plan execution completed without answering and a last failure status of TemporarilyUnavailable Timeout, no response from server.
DialPlan 20:52:33:157 sip1(4532): Call failed with a failure status of TemporarilyUnavailable and Timeout, no response from server.
DialPlan 20:52:33:157 sip1(4532): UAS call failed with a response status of 480 and Timeout, no response from server.
How do I redirect incoming calls to another sip address? 302 response doesn't work, although sys.Dial works fine.

sys.Respond(302, nil, "echo@iptel.org")
DialPlan 20:15:55:589 sip1(4632): Call failed with a failure status of MovedTemporarily and .
sys.Dial("echo@iptel.org")
DialPlan 20:38:04:875 sip1(2944): Commencing Dial with: echo@iptel.org.
DialPlan 20:38:04:875 sip1(2944): Attempting to locate a provider for call leg: sip:echo@iptel.org.
DialPlan 20:38:04:875 sip1(2944): ForkCall commencing call leg to sip:echo@iptel.org.
DialPlan 20:38:04:875 sip1(2944): Switching to sip:echo@iptel.org:5060 via udp:67.222.131.147:5060.
DialPlan 20:38:04:875 sip1(2944): SDP on UAC call had public IP not mangled, RTP socket 85.17.186.7:55770.
DialPlan 20:38:05:577 sip1(2944): Information response 100 Trying for sip:echo@iptel.org.
DialPlan 20:38:05:593 sip1(2944): Response 200 OK for sip:echo@iptel.org.
DialPlan 20:38:05:593 sip1(2944): SDP on UAC response had public IP not mangled, RTP socket 212.79.111.155:17544.
DialPlan 20:38:05:593 sip1(2944): Cancelling all call legs for ForkCall app.
DialPlan 20:38:05:593 sip1(2944): Answering client call with a response status of 200.
DialPlan 20:38:05:655 sip1(2944): Dial command was successfully answered in 0.78s.
Does sipsorcery still support TLS? I used to be able to use it with ports 5061 and 9712, but they don't work any more.

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: How to dial OSTN address (ostel.co), how to redirect incoming calls (302)

Post by Aaron » Sun Sep 20, 2015 11:08 am

tempuser wrote:How do I dial an OSTN address? The following dial plan doesn't work.

sys.Dial("xxxx@ostel.co:5061;transport=tls")
DialPlan 20:52:33:157 sip1(4532): Dial plan execution completed without answering and a last failure status of TemporarilyUnavailable Timeout, no response from server.
DialPlan 20:52:33:157 sip1(4532): Call failed with a failure status of TemporarilyUnavailable and Timeout, no response from server.
DialPlan 20:52:33:157 sip1(4532): UAS call failed with a response status of 480 and Timeout, no response from server.
By OSTN do you mean PSTN as in Public Switched Telephone Network, i.e. a traditional telephone line, or something else?

There is nothing wrong with the dialplan snippet you've provided and the reason it failed is no response was received from your provider. Perhaps they don't support TLS for SIP calls?

Does the call work if you place the call without specifying TLS, e.g. sys.Dial("xxxx@ostel.co")
tempuser wrote: How do I redirect incoming calls to another sip address? 302 response doesn't work, although sys.Dial works fine.

sys.Respond(302, nil, "echo@iptel.org")
DialPlan 20:15:55:589 sip1(4632): Call failed with a failure status of MovedTemporarily and .
That should have worked. I'll have a look into it.
tempuser wrote: Does sipsorcery still support TLS? I used to be able to use it with ports 5061 and 9712, but they don't work any more.
They are still available but there is an ongoing issue that means the TLS channel stops responding and requires me to restart the sipsorcery SIP Proxy.

tempuser
Posts: 2
Joined: Wed Sep 16, 2015 8:21 pm

Re: How to dial OSTN address (ostel.co), how to redirect incoming calls (302)

Post by tempuser » Mon Sep 21, 2015 8:48 am

Hi Aaron, thank you for your reply and looking into sys.Respond(302) problem.

By OSTN I mean Open Secure Telephony Network, an OSTN account (e.g. ostel.co) only supports SIP over TLS.

I have tried different combinations of "xxxx@ostel.co", ":5061", ";transport=tls" and "sips:", none of them work.

I can call that address without any problem from my SIP client using TLS, my SIP client is CSipSimple.

https://ostel.co/faq
Does this work with other SIP providers?

Yes. Any SIP server that uses secure signaling (sip-tls) over port 5061 can call ostel.co
I remeber some time ago, I was able to use it with Sipsorcery, perhaps I was using TLS with sipsorcery and OSTN possibly requires end-to-end TLS?

Maybe if you have time you can debug it yourself, you can register an account with ostel.co which would only take a few seconds literally, you can use a random email address to register as there's no validation last time I registered.

Regarding Sipsorcery TLS problem, do you know when it's likely to be fixed or can you put a notice somewhere to let users know once it's fixed?

Thanks.

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: How to dial OSTN address (ostel.co), how to redirect incoming calls (302)

Post by Aaron » Sat Sep 26, 2015 12:35 am

ostel don't permit anonymous calls so you'll need to set up a SIP provider entry.

Username: ostel username
Password: ostel password
Server: sips:ostel.co (note the "sips")
Contact: sips:sipsorcery_username@sipsorcery.com (only required if you want to receive calls from ostel on your sipsorcery account)

I created two ostel accounts and was able to successfully have one registered with sipsorcery and call it from the other account registered with a jitsi softphone.

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: How to dial OSTN address (ostel.co), how to redirect incoming calls (302)

Post by Aaron » Sat Sep 26, 2015 12:47 am

tempuser wrote:How do I redirect incoming calls to another sip address? 302 response doesn't work, although sys.Dial works fine.

sys.Respond(302, nil, "echo@iptel.org")
DialPlan 20:15:55:589 sip1(4632): Call failed with a failure status of MovedTemporarily and .
The most likely problem here is that your SIP user agent is processing the redirect by sending the call back to sipsorcery rather than directly to the SIP URI. Most SIP devices assume that a redirect is meant to go back to the same SIP server that redirected the call. This is probably fair enough as it could be a security issue to redirect calls to arbitrary SIP servers.

So to get a redirect to work you will need to have another dialplan rule to handle the redirect destination. In the example snippet below any call will always be redirected to music@iptel.org.

Code: Select all

case req.URI.User
  when "music" then sys.Dial("music@iptel.org")
  else sys.Respond(302, nil, "music@iptel.org")
end

Post Reply