One provider for incoming calls and another for outgoingHELP

Getting started with the SIP Sorcery
k_naydenov
Posts: 27
Joined: Thu Oct 01, 2009 7:59 am

Post by k_naydenov » Sat Oct 03, 2009 5:31 pm

Hi Mike,

I did what you reccommended to do. I installed the silverlight. The outgoingcalls work perfect, but the incoming :( - no. When somebody call me, my IP phone does not ring and the operator says that the no body can connect to this number at the moment.

So may be it is the problem with the SIPbroker. How can I overcome it? I look in the article you suggested but I am a liitle bit confused what to do. Some suggestions :( Thanks

Kiril

k_naydenov
Posts: 27
Joined: Thu Oct 01, 2009 7:59 am

Post by k_naydenov » Sat Oct 03, 2009 5:42 pm

And something extra.

I have installed the zoiper. It works perfect with the incoming (provider1) and ougoing (provider2) calls. No problem. Can I use zoiper somehow with my IP phone?

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Post by MikeTelis » Sat Oct 03, 2009 6:42 pm

Hi Kiril,

let's make sure we're talking about the same thing:

1. You followed my recommendations and Zoiper registered to Sipsorcery works fine, both incoming and outgoing calls.

2. Your hardware IP telephone is also registered to Sipsorcery, outgoing calls work but incoming calls do not make your phone ring.

Is everything so?

Mike

funxlab
Posts: 84
Joined: Thu May 14, 2009 11:59 pm

Post by funxlab » Sat Oct 03, 2009 9:07 pm

for thread starter, u cant get incoming call on 12voip as betamax doesnt allow it.

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Post by MikeTelis » Sun Oct 04, 2009 2:32 am

funxlab wrote:for thread starter, u cant get incoming call on 12voip as betamax doesnt allow it.
Apparently Kiril wanted to say the opposite, receiving calls from bgopen and making it thru 12voip (take a look at dialplan he posted, sys.Dial("12voip")).

k_naydenov
Posts: 27
Joined: Thu Oct 01, 2009 7:59 am

Post by k_naydenov » Sun Oct 04, 2009 6:10 am

Hi Mike,

Thanks for your wish to help me.

1. It is right, I want to make calls through 12voip and receive calls on bgopen.
2. I followed your reccommendation, made account at sipsorcery, made new dialing plan, wrote sys.Dial("12voip"). It works perfect for MAKING CALLS both from my hardware IP phone and when I use zoiper.
3. However it DOES NOT WORK neither on my hardware IP phone and zoiper for receiving calls.
4. BGopen has option to forward the phone call if you are not connected or not at home, etc. So when I select the forward option, bgopen however transfer the phone call to my mobile. But nothing rings on my hardware IP or zoiper. You know that it is much more expensive to receive calls through mobile phone, that is why I do not want to use the forwardoption.
5. Before, I tried to register ONLY BGopen, NOT using Sipsorcery or Mysipswitch on my IP hardware phone as well as on Zoiper. It WORKS perfect. I can receive calls to my IP hardware phone as well as on zoiper. However, bgopen is expensive to make calls that is why I do not want to keep only one provider. That is why I am trying now to use sipsorcery or my sipswitch as a switch between 12vop (to make calls) and bgopen (to receive calls). Still I hope I can manage. Otherwise I have to buy two hardware IP phones, but I do not want to do that...:(

Kiril

k_naydenov
Posts: 27
Joined: Thu Oct 01, 2009 7:59 am

Post by k_naydenov » Sun Oct 04, 2009 6:16 am

And one more clarification to point 5:
I use the sipsorcery without the forward option on BGopen. So in this way I am sure that not the forward option make the problem. I tried also with the forward option activated, but the same result: my hardware IP phone does not ring, however after 90 sec (specified by BGopen) the call was transfered to my mobile. In this way forward option is not making the problem with receiving the calls on my IP hardware phone.

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Post by MikeTelis » Sun Oct 04, 2009 7:00 am

Okay, it's time to add some debug lines and check what's going on. Just in case, we'll also use my SIPBroker workaround, it might help.

So, replace your dialplan with this:

Code: Select all

begin
  sys.Log("** Call from #{req.Header.From.ToString()} to #{req.URI.User} **")

  if sys.In               # If incoming call...
    name = req.Header.From.FromName.to_s     # create a copy of FromName

    # if FromName isn't empty and isn't all digits (caller's phone #)
    # replace it with username from caller's URI

    name = req.Header.from.FromURI.User.to_s if name =~ /^$|\D/

    # Prefix 10-digit numbers with "1" (US country code).
    # Some DID send Caller ID without country code

    name = ('1' + name) if name =~ /^[2-9]\d\d[2-9]\d{6}$/

    sys.Log("FromName: '#{name}'")
    req.Header.From.FromName = name    # Set FromName for sys.Dial
    # Change FromURI.User, too - or else Bria won't find contact in its phonebook!
    req.Header.from.FromURI.User = name

    sys.Dial("#{sys.Username}@local")

  else   #outbound call
    sys.Dial('12voip')
  end
rescue
  # Gives a lot more details at what went wrong (borrowed from Myatus' dialplan)
  sys.Log("** Error: " + $!)
end
Now, go to SIP accounts and set this dialplan not only as "Out", but also as "In".

Try receiving a call. If your IP phone rings, you're all set. However, if it doesn't, go to Console, login with your credentials and "event *" as filter and try receiving yet another call. Show me what you get in the console log.

k_naydenov
Posts: 27
Joined: Thu Oct 01, 2009 7:59 am

Post by k_naydenov » Sun Oct 04, 2009 12:13 pm

Hi Mike,

I hope we are one step ahead :), but still we can not break the hardware IP phone :(. After I set the new dialing plan, I CAN receive calls on Zoiper, however still NOT on my IP hardware phone. There is a voice message that no connection is possible at the moment. However if I make forwarding to my mobile, the call is forwarded.

About the Console, when I enter the "event*" the following comes out

filter=> event*
filter was invalid, please try again, or q quit.

So I could not get the consol log.

Kiril

k_naydenov
Posts: 27
Joined: Thu Oct 01, 2009 7:59 am

Post by k_naydenov » Sun Oct 04, 2009 12:16 pm

The BGopen is situated in Bulgaria and the country code is 00359. should this stay somehow in the dialing plan

Post Reply