on 01-25-2014 10:40 AM
OK, I will ask a different question now. I am handling the refers via the attached script outbound_call.tcl.txt, but when I try to transfer to a busy number and then transfer to a valid number, the script fails. I attached the script log debug_transfer.txt from one of the failures with the script debugging turned on. I first call 918473872681, then try to transfer to 918475769434 (there is only one outbound PSTN line, so this fails), and then try to transfer to 234 (a valid and registered SIP extension), and the script fails on the leg setup indicating that the call is already bridged. Any idea what I am doing wrong in the script? Thanks!Yaw-Ming Chen:I am not quote following you. But once you catch the transfer trigger you can transfer to whatever number you like.
That did not seem to make any difference, if I understood what you were saying correctly. I still got the same error in the same place after updating the script (see attached). I use the transferdone ts_007 t0 send a NOTIFY with status 503 back to the phone doing the transfer so that it knows the transfer was unsuccessful.Yaw-Ming Chen:You got that error because there is a connection that you haven't detroyed. any reason you use " leg transferdone $refer_leg_incoming ts_007" ? Anyway, script should look very simple, when you get REFER trigger (in your atc_Refer) once you got all informaton (refer to number...etc) you do "connection destroy con_all" (at this movement I would change state don't using CALLACTIVE,but REFRING,TRANSFERING...etc) after getting ev_destroy_done then you do the leg setup to your transfer to number then wait for en_setup_done. Then you check the status, if it's not ls_000 then you make sure there is no connection then do the leg setup again to NEW destionation. Also I didn't see you change to new distination after transfer to distination is not reachable.
Keith Haugen:Maybe to make it a little more clear, the flow I am trying to make work is: Setup call (SIP phone to PSTN 918473872681) Transfer call request (REFER) to PSTN 918475769434 -- this includes the SIP phone putting the call on hold Since there is only one phone line,when you use connection destroy you can separate legs and you can play prompt/MOH to SIP phone (SIP phoen on hold)
I send a NOTIFY 503 back to the SIP phone since the transfer can not be completed(Don't know why you need to do that)
. SIP phone takes call off hold SIP phone retries transfer (again, we son't need to do anything unless we want to promt caller SIP phone that transfer is in progress. now after leg setup to 918475769434 we should receive stup status other than ls_000 (maybe ls_003 <setup failed because of a lack of resource> or other ls_xxx) as soons as we receive that we then check if there is any connection after makinf sure this is none then leg setup again to new SIP phone
to a second SIP phone (including putting the call on hold again)-- this is where the script fails with the "Call is already bridged" error in act_Resetup, even though I do a connection destroy con_all in the act_Refer (with the ev_destroy_done being handled by act_Resetup).
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: