I have a fairly specific requirement, which I hope Asterisk (with or without the help of SER) can solve.
I have a media server which runs IVR and voice recog applications. Those applications can and do transfer inbound calls to outbound calls.
As the ports on this media server are licensed per port it get’s expense when a lot of ports are in use.
I want Asterisk and/or SER to take the load off by fronting the media server and when an inbound call is to be transfered out to an outbound trunk Asterisk and not the media server has the 2 calls, freeing the ports on the media server.
After much blood sweat, tears and strong coffee I managed to get Asterisk to bridge the calls during transfer.
However, the only method of transfer I can get to work is “Blind”. As soon as Asterisk accepts the “SIP REFER” it disconnects the media server from the call. Attempting to set the transfer method to “Consultation” or forcing “Answer when connected only” are ignored Asterisk has already torn down the calls and bridged the user to the new ringing number.
For some applications this is fine. However many applications require the calls stay within the media server until answered, allowing the application to pick up control of failed calls, busy calls etc (standard 3 way PBX calling), or even allow the application to wait on the call completing entirely.
The media platform supports these transfers as “Blind”; what I have working, “Consultation”; bridge only when answered and “Bridge”, where the bridging happens in the media server and it remains in control.
The problem is when I attempt “Bridge” in the media server it issues an INVITE, like:
INVITE sip:email@example.com:5060 SIP/2.0 Via: SIP/2.0/UDP 10.0.2.136:5060;branch=z9hG4bKb575f8a029f9a1 From: sip:firstname.lastname@example.org;tag=C1431100-8D08-8469-16BD-D1FEF9F65EF8 To: <sip:email@example.com:5060>[/code] 10.0.4.147 = Asterisk server 10.0.2.136 = Media server 103 = Asterisk extension (Intended target of transfer) paul = Asterisk SIP 'friend' (Origin of call) vgp = Asterisk SIP 'friend' (Media Server call transfer'er) (All are registered) Name/username Host Dyn Nat ACL Port Status vgp/vgp 10.0.2.136 D A 5060 Unmonitored test/test 10.0.6.44 D 5062 Unmonitored paul/paul 10.0.6.44 D 1668 Unmonitored 103 (Unspecified) 5060 Unmonitored 102 (Unspecified) 5060 Unmonitored 101 (Unspecified) 5060 Unmonitored Asterisk simply throws back a 407, as so: [code] SIP/2.0 407 Proxy Authentication Required Via: SIP/2.0/UDP 10.0.2.136:5060;branch=z9hG4bKb575f8a029f9a1;received=10.0.2.136 From: sip:firstname.lastname@example.org;tag=C1431100-8D08-8469-16BD-D1FEF9F65EF8 To: <sip:email@example.com:5060>;tag=as06a8f8cd [/code] sip.conf [code][general] context=internal srvlookup=yes [paul] type=friend secret=xxx qualify=no nat=no host=dynamic canreinvite=yes context=internal [test] type=friend secret=xxx qualify=no nat=no host=dynamic canreinvite=yes context=internal [vgp] type=friend secret=xxx qualify=no nat=no host=dynamic permit=10.0.2.136/8 canreinvite=no context=internal insecure=very
exten => s,1,Answer( )
exten => s,2,Background(vm-extension)
exten => 101,1,Dial(SIP/paul,10)
exten => 101,2,Playback(vm-nobodyavail)
exten => 102,1,Dial(SIP/stu,10)
exten => 102,2,Playback(vm-nobodyavail)
exten => i,1,Playback(pbx-invalid)
exten => i,2,Goto(incoming,s,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup()
exten => 101,1,Dial(SIP/paul,20,rtT)
exten => 101,n,VoiceMail(u101@internal)
exten => 101,102,VoiceMail(b101@internal)
exten => 103,1,Dial(SIP/test,10,r)
exten => 201,1,Dial(SIP/rik@middlesborough)
exten => 202,1,Dial(SIP/paulxfertest@middlesborough)
exten => 203,1,Dial(SIP/pauljointest@middlesborough)
The only thing I suspect is that while the Media Server is registering with Asterisk as vgp, it is a different setting on the box to select it’s “Local SIP user”, which I also set to vgp. The two may not be connected, which is why I added the:
Any ideas, hints, tips?