HELP: Dialplan to hear UK ringing on US server! Will pay $$$

Hello everyone, I’m new to the forum here!

Just had a quick question about something Im having a very difficult time figuring out myself.

I run an asterisk server for a customer who is in the US with many US DID’s currently. Now they have asked for a UK DID for one of their employees in the UK. I got everything working, except when the UK DID is dialed, the callee hears a US ringing tone instead of the UK. Without switching my indications file to country = uk or without using another server, how can I get UK tones to play on this single DID? I have looked over tons of documentation on indications.conf and the playtones function but I cannot get it to work! I can hear the UK ring for testing, but when I set the UK ring using playtones, it reverts back to the US ring as soon as I actually dial the SIP user.

Does anyone have any idea what I can do about this?

Thanks in advance!

Aaron

Not sure if this is allowed, but due to the importance of this I will pay $50US if someone can give me a working solution.

Thanks.

In Most cases the ringing is developed from the handset or gateway not inband from the server. All the phone gets is a message to play ringing tone. Its the same if I call a US number from a UK cellphone I will get US ringing.

you could try adding the r option to the dial command but I think you will still get the problem.

Ian

So what is the solution? Let me clarify a little.

In my indications.conf file I have country=us to give the person calling the DID a US ring no matter if they call a US or UK DID.

I want to make it so that if anyone calls the UK DID, the person calling will hear the sound of calling a regular UK telephone number, not the sound of calling a US number.

The server is dialing with SIP to a Linksys ATA. In my test I have used playtones to hear a UK tone if I put the wait function after, but as soon as I use the dial command the US ring takes over and I can’t hear the UK tone.

Hope that helps someone come up with a solution! I am running the latest version of asterisk 1.4

Ok lets get this right

[code]Caller-----------DID Supplier----------your Asterisk--------Linksys_ata

using playtones

Caller<--------------------------------------|

normal call

Caller<-----------------|

[/code]

So you can see its the DID supplier in this case that will be generating ringtone

If you could diagram your scenario it would help, also have a read of a few sip tutorials you can then see how the call progresses

Ian

Everything works fine untill I use the dial command in my dialplan.

For example, when I do the following it is fine:

exten => xxxx,1,Answer()
exten => xxxx,n,Playtones(400+450/400,0/200,400+450/400,0/2000)
exten => xxxx,n,Wait(15)

As soon as I put dial in the dialplan is when it converts to the US ringing

exten => xxxx,n,Dial(SIP/1000)

at this point I hear the wrong ringing. So I figure it can’t be the DID supplier because I answer the call right away and can play anything that I want, the problem is when I call the actual SIP Peer, I don’t hear it anymore.

This explanation at www.voip-info.org seems to be trying to accomplish the same thing however it does not work. I have the same problem with this technique:

[dialout]
exten => _X.,1,Answer()
; play tones to give the caller some feedback
exten => _X.,n,Playtones(425/50,0/50)
; no-op here so that tones continue until we’ve actually reached the SIP peer
exten => _X.,n,Dial(SIP/${EXTEN}@sip.example.com&Local/s@no-op)

[no-op]
; just hang up
exten => s,1,Hangup(21)

Hi

[quote]Everything works fine untill I use the dial command in my dialplan.

For example, when I do the following it is fine:

exten => xxxx,1,Answer()
exten => xxxx,n,Playtones(400+450/400,0/200,400+450/400,0/2000)
exten => xxxx,n,Wait(15)[/quote]

Of course it will all you are doing is playing a tone. you are NOT ringing anything

[quote]As soon as I put dial in the dialplan is when it converts to the US ringing

exten => xxxx,n,Dial(SIP/1000)

at this point I hear the wrong ringing. So I figure it can’t be the DID supplier because I answer the call right away and can play anything that I want, the problem is when I call the actual SIP Peer, I don’t hear it anymore.[/quote]

Yep now you are having ringing generated.

Look at my diagram and you will see why.

[quote]This explanation at www.voip-info.org seems to be trying to accomplish the same thing however it does not work. I have the same problem with this technique:

[dialout]
exten => _X.,1,Answer()
; play tones to give the caller some feedback
exten => _X.,n,Playtones(425/50,0/50)
; no-op here so that tones continue until we’ve actually reached the SIP peer
exten => _X.,n,Dial(SIP/${EXTEN}@sip.example.com&Local/s@no-op)

[no-op]
; just hang up
exten => s,1,Hangup(21)[/quote]

This will only give “feedback” till the peer starts to ring.

You need to get down and dirty, draw up diagrams and do some traces with wireshark.

Ian

Ian

I just want to pay someone for a solution. It is pretty straightforward what I am looking for so if someone can give me a working solution I will pay what it takes.

If anyone is interested let me know

Well goodluck

as its not as you say [quote]pretty straightforward [/quote]

Just dont expect that you can answer calls and use playtones to them. a caller will only expect to be billed for an answered call.

As I said good luck, You need to speak to your DID supplier as its them that produces the ringtone and not you as I have tried to explain.

Ian

One of the first things in the wiki on indications.conf…

Your ATA is producing your tones not Asterisk. When you use Playtones() then Asterisk is generating the tones so it sounds correct. When you use Dial() then your ATA is generating the tones.

You may be able to get around this by using DISA() or look to see if your can change ATA settings.

Ok I think I got the solution here:

scribd.com/doc/2283242/Links … gional-Tab

I’m going to try this and I’ll post the results

If you’ve used Answer, won’t OK have been sent, so it will be too late to send Ring, so Asterisk will have to source the ringback tone.

Of course, faking a ringback tone is generally considered anti-social, as you will normally cause the originating network to start charging, without giving the caller a clear indication that they are being charged.

In the original question, “callee” should have been “caller”.

[quote=“david55”]If you’ve used Answer, won’t OK have been sent, so it will be too late to send Ring, so Asterisk will have to source the ringback tone.

Of course, faking a ringback tone is generally considered anti-social, as you will normally cause the originating network to start charging, without giving the caller a clear indication that they are being charged.

In the original question, “callee” should have been “caller”.[/quote]

Thanks for the response David. You are right, I meant caller not callee in my original question.

If faking a ringback tone is the only way to get the job done, that is what I will have to do unless there is another solution to make the real ringback a UK type instead of US. Any ideas?

When I tried what was in the link I posted in my last response it just changed the way the phone rang to the callee, but the caller heard the same US ringback.

Thanks again

You can’t force the source network to generate a different ringback tone, so you have to fake in the sense that I meant it.

I’m not saying that, with current Asterisk, you can change the ringback tone, for just one caller, either.

I would strongly advise against faking for any number that is directly dialable by the general public. You will get found out, eventually.

So people in the UK are just expected to live with hearing a US ringback when they are called? What are the other options? There must be another way. If I switched indications.conf to use country=uk would that change it?

People who are called don’t hear ringback. As already noted, what they hear is a function of the phones they are using, although some allow it to be modified with custom SIP headers.

If you run the whole Asterisk instance with UK indications, and you pre-answer the call, a caller should hear a UK ringback tone.

If there is another way, it is such a rare requirement that you’d be lucky to catch someone who knew the answer.

I’m talking about people who call into the UK. They should hear the UK ringback.

This is getting too complex, let me explain it very simply.

When I call a UK number, I can hear a UK ringback.

When I call my UK DID, I hear a US ringback, I want to hear a UK ringback, how can I accomplish this?

You could try: take out the Answer() & Playtones() completely so that you go straight to a Dial() as the 1st (real) command that way the call will get native tones from the DID provider (UK) until the called sip exten ACTUALLY answers.

Or have I missed the point here?

You have a SIP trunk to a PSTN/SIP gateway in the UK and when you call that gateway, over the PSTN, using a 0… number, from the UK, you hear US ringback?

If that describes the situation, then getting US ringback indicates that the call is being answered prematurely, which is the case which will annoy callers, and the fix is to make sure that you don’t do anything that will answer the call before the Dial or Queue application succeeds.

If you are testing this from the US, it is possible that your US PSTN provider is not faking UK tone, or that the UK network, hosting the gateway, isn’t providing inband progress.

The situation I thought you were describing was that you had an outgoing SIP trunk to a satellite in the UK, or the UK phones were directly registeredon your US switch.