New user: Help to set up SS

Catalog of dial plans
fabiopy
Posts: 28
Joined: Fri Jul 23, 2010 11:45 pm

Re: New user: Help to set up SS

Post by fabiopy » Sun Aug 22, 2010 9:37 pm

Mike,

Thanks a lot. I was following the direct logic of a callback (where you need a hung up device to receive the call) and I missed the fact that I would get connected on the same device.

I got everything running to call us and non-us numbers and I am in the trial stage, to see if everything is solid.

I would have the following questions:

1-I left my nimbuzz connected all night long. The next day I tried to make a call, but it was not working. On the nimbuzz interface, the sip connection showed as active, but in SS interface I saw there was no connection. I logged out and in again (from nimbuzz) and the sip binding in SS became active and everything worked fine. The doubt is: was this only a random event or the connection to SS is lost after some time? I saw there is a "keep alive" option on the sip accounts, so it occurred to me that when it is not marked (none of my accounts are marked) you eventually get disconnected. Do you know anything about this issue?

2-For the GV callback, is there any way to define the forwarding number to be used, based on the device that is making the request? In my case, every device that I make the originating call from, uses a separate SS sip account, so I figured it would be possible to introduce variables in the GV part of the dialplan, to indicate which forwarding to use, based on the originating Sip account in SS (thus not using the random option). Is this possible? If it is, I would need your direction of what to erase and what to include in the dialplan.

Some tim along the thread I thought that it was getting near impossible to configure SS. Can't believe we are here...

Best rgds,

F

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

Re: New user: Help to set up SS

Post by MikeTelis » Mon Aug 23, 2010 3:50 am

1. Keep-alive from server side is your last resort. I'm not sure about Nimbuzz, but some SIP clients allow to change registration period (default value is typically 3600 sec or 1 hour) and send keep-alive packets from the client. Why don't you keep watching to see if the problem persists?

2. You don't need any additional variables for that. Create 3 different dialplans which are almost identical; the only difference would be the order of forwarding numbers in:

Code: Select all

GVaccount = [
  Credentials + { :cb => '(206) xxx-xxxx' },  # Your IPKall-1 DID number
  Credentials + { :cb => '(253) xxx-xxxx' },  # Your IPKall-2 DID number
  Credentials + { :cb => '(425) xxx-xxxx' },  # Your IPKall-3 DID number
]
and remove :rand => true from the descriptor:

Code: Select all

GVoice     = GV.new  '#1', nil, 'Google Voice', 
                     :account => GVaccount,  :repeat => 3
The dialplan will try forwarding numbers in the order they appear in GVaccount array. If first number fails, it will try the 2nd and finally, the 3rd.

fabiopy
Posts: 28
Joined: Fri Jul 23, 2010 11:45 pm

Re: New user: Help to set up SS

Post by fabiopy » Tue Aug 24, 2010 10:36 pm

Mike,
Nimbuzz does not have the option to change or choose the registration period. I expected it to keep registered while my account was logged in. I Left the client connected and I am checking if it occurs again. If I notice it happens in a regular basis and I choose keepalive, will it have any other impact (other than trying to keep the connection alive?)

With the GV, I suspected that is the solution, but I didn't know if I could assign a different dial plan to each sip account, using the same sip provider for non US calls (as in my case).

I think I would prefer to only use one GV forward in each account (using the one associated with the originating point). How would that be reflected on the code?

And I think that will be it!!! Thank you very much for the help and patience.

Best rgds,

F

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

Re: New user: Help to set up SS

Post by MikeTelis » Wed Aug 25, 2010 4:19 am

Registration expires sooner or later, typically expiration period is 1 hour. SIP client will automatically renew your registration as long as you're logged in. If you renew registrations too often or you use keep-alive you create extra traffic and extra load on both your device and the server. I wouldn't do it unless I had a good reason.

Each SIP account has "In" and "Out" dialplans associated with it. You have a plenty of options: you can use the same dialplan for both In and Out, one dialplan for "In" and the other - for "Out", or leave the "In" dialplan field empty. If you leave it empty, Sipsorcery will send incoming calls to the bindings (device(s) registered to this SIP account). "Dialplan" settings are individual for each SIP account.

Frankly, I don't see any practical reason for using different "first callback" number, depending on which device you're calling from. As far as I know, Google Voice limits calls to one per account. That is, if you called from your home ATA and the call is still in progress, you won't be able to call from your computer or from the office ATA until the call is completed (even if the forwarding number you use for callback is different).

fabiopy
Posts: 28
Joined: Fri Jul 23, 2010 11:45 pm

Re: New user: Help to set up SS

Post by fabiopy » Tue Aug 31, 2010 2:17 am

Mike,

Thanks for your explanation. I understand on GV cannot process 2 calls at the same time. My thinking was on the side that each attempt of forwarding takes some time, so if you are calling from the last nr you can get a delay of up to 60 seconds (if you have the 6 numbers on GV), so having them separately, triggers the correct forwarding number right away.

When you have just one forwarding number in the dialplan you still use the following with the repeat 1 or are there other changes required?

Code: Select all

GVoice     = GV.new  '#1', nil, 'Google Voice',
                     :account => GVaccount,  :repeat => 1
Finally a thought I had concerning 2 simultaneous calls: If I am calling from my cel and my wife is at home and calls from my home sip device (with the premise that it is not both on GV and I know for a fact actionvoip handles 2 simultaneous from the same account), will SS process simultaneous calls (from 2 different sip accounts, but under my main account)?

Kind rgds,

F

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

Re: New user: Help to set up SS

Post by MikeTelis » Tue Aug 31, 2010 5:16 am

fabiopy wrote:My thinking was on the side that each attempt of forwarding takes some time, so if you are calling from the last nr you can get a delay of up to 60 seconds (if you have the 6 numbers on GV), so having them separately, triggers the correct forwarding number right away.
Your assumption is incorrect. If your callback numbers work, you'll get callback right away, no matter which number you specified for callback.

Why would one need several callback numbers? The only reason is to ensure you still can make calls if something happens to, for example, IPKall or Sipgate you got your callback number from.

Selecting callback numbers at random is a good idea when you have callback number(s) from IPKall. IPKall numbers expire after 30 days of inactivity. If you call out often enough, callback numbers are selected at random and one of them is IPKall, there is a good chance of using it (IPKall) as callback once a month, so it won't expire. Besides, if you select callback numbers in sequence and the first callback number is inoperative, you'll always have to wait; if callback number is picked randomly, you'll only have to wait when a "bad" number's picked. Say, if you have 3 callback numbers and one of them is not working at the moment, you'll be experiencing extra delay in 1 out of 3 calls, on average.
fabiopy wrote:When you have just one forwarding number in the dialplan you still use the following with the repeat 1 or are there other changes required?
:repeat => 1 is default value; you can merely omit this parameter.

fabiopy
Posts: 28
Joined: Fri Jul 23, 2010 11:45 pm

Re: New user: Help to set up SS

Post by fabiopy » Tue Aug 31, 2010 12:47 pm

Mike,

I have one GV number and 3 forwarding numbers (callbacks). Let's call them A, B and C. A will ring on my sip device at home, B will ring at my cel and C will ring at my nimbuzz.

So if I initiate a GV session via SS calling from my cel (associated with my B forwarding number) and the session chooses the first number A, I should not get the incoming connection to my cel, until the a session expires and the session with B is initiated. Is this correct or no matter what forwarding number is picked, as long as it is working, it will connect the call? (even if A is not supposed to ring on my cel). If it is the second case, then my assumption was incorrect as you stated, and of course there would be no need to have separated dialplans for each device.

Just for the sake of experience, I went ahead and created a separate dialplan, based on the default that was proven and working. I modified only the GV numbers, leaving only the forwarding number associated with my nimbuzz and erased the random and repeat. I place a call to a US number, it rings once and then connects but I do not hear the callback sound and I just get silence (while there is an apparent call connected, but it is just silence). Ipkall number is working, so my only guess is that there might be something on the code that I may have erased or something like that. Can you see any indicator from the below info:

Monitor 12:40:02:243: basetype=console, ipaddress=*, user=fabio***, event=*, request=*, serveripaddress=*, server=*, regex=.*.
DialPlan 12:40:09:821 sip1: New call from udp:194.178.110.156:16817 successfully authenticated by digest.
DialPlan 12:40:09:852 sip1: Using dialplan ofi y pcbuzz for Out call to sip:+1305735****@sipsorcery.com.
NewCall 12:40:09:852 sip1: Executing script dial plan for call to +1305735****.
DialPlan 12:40:09:946 sip1: ** Call from "ofi**@sipsorcery.com" <sip:ofi**@sipsorcery.com>;tag=ofi**sip1283257249184 to +1305735**** **
DialPlan 12:40:09:946 sip1: Local time: 08/31/2010 05:40
DialPlan 12:40:09:962 sip1: Number in ENUM format: 1305735****
DialPlan 12:40:16:024 sip1: Calling +1 (305) 735-**** (North America) with Google Voice
DialPlan 12:40:16:040 sip1: SDP on GoogleVoiceCall call had public IP not mangled, RTP socket 190.186.5.151:3726.
DialPlan 12:40:16:040 sip1: UAS call progressing with Ringing.
DialPlan 12:40:16:040 sip1: Logging into google.com for fabiogggg.
DialPlan 12:40:16:071 sip1: Google Voice pre-login page loaded successfully.
DialPlan 12:40:16:087 sip1: GALX key M46n9VGIeO4 successfully retrieved.
DialPlan 12:40:19:086 sip1: Google Voice home page loaded successfully.
DialPlan 12:40:19:368 sip1: Call key cX+djfZ/S8hTgDbdKocWtrN+N0Y= successfully retrieved for fabiogggg, proceeding with callback.
DialPlan 12:40:19:383 sip1: SIP Proxy setting application server for next call to user fabio*** as udp:69.59.142.213:5071.
DialPlan 12:40:19:461 sip1: Google Voice Call to +1305735**** forwarding to 425406**** successfully initiated, callback timeout=10s.
DialPlan 12:40:21:243 sip1: Google Voice Call callback received.
DialPlan 12:40:21:243 sip1: Answering client call with a response status of 200.
DialPlan 12:40:21:415 sip1: Google Voice Call was successfully answered in 5.37s.
DialPlan 12:40:21:415 sip1: Dialplan cleanup for fabio***.
DialPlan 12:40:21:665 sip1: Dial plan execution completed with normal clearing.

When the call gets to the last line in the console, my nimbuzz shows me a connected call (seconds are running as in a normal call) but it is mute and I never receive the callback tone.

Post Reply