Park and pickup across multiple asterisk servers

Hello everyone,

I am just starting to learn about asterisk. Currently I have installed Asterisk 11 (from the download section of this site) on Cent 6.4 So, now I am running into 2 difficulties and hopefully someone here can help me out and point me into right direction (instead of banging my head to death):

  1. Is it possible to have call pick up across different asterisk server? So what I mean is that if 1 call exist on asterisk server #1 and then it was put into parking slot 701, can another person from another asterisk server pick that call up? Now you probably wondering why the heck I want to do this? I am trying to build a system where I can load balance and have redundancy built into it. Putting all caller on 1 asterisk server (if a lot) my not be feasible and if that server crashes or need a reboot/reload, then everyone on there gets dropped, not good. So what I was planning on doing is to have my SBC (session border controller) round robin several asterisk server so that it will load balance and also if one crashes, only calls on that server gets affected.

  2. Why the heck is inbound call not working on BLF? So here is my SIP.conf:

[general]
context=from-sip ; Default context for incoming calls
;
bindport=5060 ; bindport is the local UDP port that Asterisk will listen on
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
;
disallow=all ; First disallow all codecs
allow=gsm
allow=ulaw ; Allow codecs in order of preference

limitonpeer=yes
notifyringing=yes
notifyhold=yes

subscribecontext=blf
;

[OutBoundCarrier]
disallow=all
allow=ulaw
canreinvite=no
dtmfmode=rfc2833
host=192.168.3.2
insecure=very
port=5060
qualify=yes
type=friend

[SBC1]
disallow=all
allow=ulaw
canreinvite=no
dtmfmode=rfc2833
host=192.168.0.1
insecure=very
port=5060
qualify=yes
type=friend

[Ext101]
type=friend
username=Ext101
secret=Ext101
context=from-sip
host=dynamic
allowsubscribe=yes
call-limit=20
callgroup=1
pickupgroup=1
allowtransfer=yes
busylevel=1

And then the extensions.conf:

[general]
[globals]

[from-sip]
;switch =>Realtime/@
exten => _1XXXXXXXXXX,1,Dial(SIP/OutBoundCarrier/${EXTEN},30,T)
exten => EXT101,1,Dial(SIP/SBC1/${EXTEN},30,T)

include => parkedcalls

[blf]
exten => EXT101,hint,SIP/EXT101

So if I place an outbound call ([EXT101] --> [OutBoundCarrier]), the BLF light lit up correctly (although during ringing, light is not blinking red, it will turn solid red only when far end party pick up the line, not sure if that is correct?). The problem is that when an inbound call from [OutBoundCarrier] --> [EXT101], the BLF light does not change. It stayed green. When I do a “core show hints”, the “state” shows “idle” and when I do “sip show inuse” it shows:

  • Peer name In use Limit
    EXT101 0/0/0 20

So it looks as if asterisk is not counting inbound call to EXT101 as a “call”? Thus not sending the notification to BLF subscriber? Did more search on google, it said that adding “limitonpeer=yes” may help, but as you can see, I did that, still no go.

I did a wireshark on my SBC (which sits between the Voip phone and Asterisk), it seems asterisk only sending out “notify” sip message to the subscriber (of the hints) when call originate from [EXT101], but not when call calling into it.

Any idea why?

Thank you in advance!

Frank

701 is just an ordinary number, from a routing point of view, so you can route a call from one server to the other. Both servers will be in circuit for the resulting call.

You might want to allocate non-overlapping parking lot number ranges on the different machines.

Hello David,

Thx for the reply, so for example, in my extensions.conf I have

exten => 123,1,Pickup(FRANK10002)

Now if FRANK10002 is on another server, what should the line be?

exten => 123,1,Pickup(FRANK10002@192.xxx.xxx.xxx) where 192.xxx.xxx.xxx is the IP address of that remote server? If not, what is the indentifier on the Pickup command that I can isolate a ringing line on a different asterisk server? Also what about a “parked” call. So if is call is parked at slot 701 of remote server, do I do:

exten => 123,1,Pickup(701@192.xxx.xxx.xxx)?

thx in advance

Frank

You pickup parked calls using parkedcall, which must be run on the machine on which the call is parked. The extension is generated automatically when a call is parked.

If you make the parking lot range 710-719 on machine A and 720-729 on machine B, machine A would have:

include => parkedcalls
exten => _72X,1,Dial(//${EXTEN}

On B, the context that handled calls from A would either have:

include => parkedcalls

or to be more restrictive:

exten => _72X,1,Goto(parkedcalls,${EXTEN},1)

Hey David,

Really appreciate the help. Yes I got confused pick up call at parking lot and pickup a “ringing” inbound call. Yes, connecting to parked call is to dial the extension (e.g. 7xx).

But how about (using your example above), if someone ring into a sip phone via server A and then someone try to pickup that call from Server B, then what is the syntax for a “remote” pickup?

So what I mean is that if you only have 1 asterisk server setup, and that if someone calls in and want to reach SIP phone (registration ID in sip.conf, however you have it) FRANK10001 you can put a line in your extension.conf:

exten => 123,1,Pickup(FRANK10002)

So that if during the “ringing” phase, anyone can pick up their phone and punch in 123 and pickup that call.

Now, with 2 asterisk server setup, if the call came in on server B and then what do I put in Server A’s extenstion.conf to be able to pickup that phone up on server B?

exten => 123,1,Pickup(FRANK10002@xxx.xxx.xxx.xxx)? where xxx.xx blah is the IP address of Server B?

Thx