Thanks Fred!
The dialog module is really helpful.
Got rid of that ugly "BYE" construction.
Also no need to write a special ht entry for blind transfer.
For now I'm saving to htable on event_route(dialog:start), and removing on 'end' or 'failure' event.
Much cleaner :-D Thanks a lot for the tip.
For "Htable key identify" problem:
I've managed to find corresponding keys with 'sht_iterator' in while loop. Matches found with ($(shtitkey(i1){s.select,-1,:} == $rU || $fU). Key values = $shtitval(i1).
Not the most elegant solution, imo, but best I can do for now :-D
Haven't got hands on the problem with attended transfer yet. But it's already clear that I've got a huge lack of SIP knowledge.
Can't get how custom headers with original call-id and from/to tags can help me with this.
Would be very grateful for clarify, if it's possible :-D
For now my best idea is to catch indialog 'REFER' with 'Replaces' in 'Refer-to' and write to htable according to its contents (eg, set $fU from RURI and $rU from 'Refer-to').
Anyway, Thanks a lot for your help!
Regards, Tim