Hi,

o Jayesh Nambiar on 08/19/2011 04:10 PM:
Hi Stefan,
Thanks for all the suggestions you provided earlier, it really helped
and I was able to properly deploy a complete B2B solution with media
playing on the first leg of the call. It was fun. Now there is a
specific requirement that I need to handle. Here is the scenario:

1) A calls B.
2) As soon as B answers the call, Caller A blind transfers that call
to C and disconnects.
3) While the call is being transferred, and until it gets connected; a
specific announcement sound file is to be played to number B.
4) Once C answers the call, B should be connected to C.

Doubts and Questions:
1) If I need to take this call through SEMS, it is logically 3
different calls for SEMS right? Or rather 3 legs that are to be handled.
yes.

(an alternative would be the signaling only B2BUA - if you don't want to have media anchoring/transcoding and re-INVITE make the RTP going from B to C directly. In that case, in leg B instead of using dlg.dialout() and then conference.join(), you use B2B.connectCallee() function and check on the B2B events. Still it is 3 legs, but the C leg will be handled automagically, and you don't have the possibility to control in detail what happens on the C leg.)

2) I don't want to relay the REFER ahead as the proxy ahead does not
allow me to send REFER requests.
2) To handle transfer(REFER), I need to write
set($enable_request_events="true");. Can I write this line in the
RUN_INVITE state? RUN_INVITE is where the call enters as soon as the
call comes in.
yes, you can set that variable anywhere. by this mechanism you can also enable and later disable again the request events.

3) When I transfer the call, I wait for REFER method in a state and
parse the Referred-To and Referred-By header. Like below:
transition "refer recvd" wait_refer - sipRequest(#method=="REFER") / {
     uri.getHeader(Refer-To, refer_to);
     uri.getHeader(Referred-By, referred_by);

     uri.parse($refer_to, transfer_);
     uri.parse($referred_by, caller_);

     set(b_leg_caller=$caller_user);
     set(b_leg_callee=$transfer_user);
     set(b_leg_domain=1.2.3.4);
     set(b_leg_app=aas_callee);

     set(b_leg_var.a_ltag=@local_tag);
     dlg.dialout(b_leg);
}
what you'd probably rather want to do is to send an event from leg A into leg B and create leg C there:

 transition "refer recvd" wait_refer - sipRequest(#method=="REFER") / {
      uri.getHeader(Refer-To, refer_to);
      uri.getHeader(Referred-By, referred_by);

      uri.parse($refer_to, transfer_);
      uri.parse($referred_by, caller_);
      set($event="REFER");

      postEvent($b_ltag, event;caller_user;transfer_user);
}


and in leg B:
transition "refer event received" wait_refer - event(#event=="REFER") / {
      set(c_leg_caller=#caller_user);
      set(c_leg_callee=#transfer_user);
      set(c_leg_domain=1.2.3.4);
      set(c_leg_app=aas_callee);

      set(c_leg_var.a_ltag=@local_tag);
      dlg.dialout(c_leg);
}

this way, you can also avoid race conditions where leg b is already ended when you create leg c from leg a etc.


4) The above step only initiates a second call, but when I disconnect
the first leg, this second leg should be already patched to the third
leg, since the call is now transferred. Can this be done by using
postEvent??
yes, see above.

5) How can I play some file in 183 Session Progress of third leg which
will be audible by the second leg??
if you want a file to be played, just use playFile
c_leg.dsm:
transition "early in callee leg" START - early / {
  set($b_status=EARLY);
  postEvent($b_leg_var.a_ltag, b_status);
} -> START;

b_leg.dsm:

transition "early in c leg" WAITING_CONNECT - event(#b_status=="EARLY") {
 playFile("progress.wav");
} -> WAITING_CONNECT;

if you want to connect the audio from C's early media to B, you do join the audio already when you receive the EARLY event with
  conference.join(@local_tag);
and on the C leg when processing 183 reply:
  conference.join($b_leg_var.a_ltag);
  connectMedia()

hth
Stefan


Any and all help in this regards will be really appreciated !!

Thanks in advance.

--- Jayesh



_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems


--
frafos.com
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to