This is a type of call control that you most likely need to go through
SEMS to do (which is a B2BUA).
You might be able to do in it SER as well, with some trouble. I believe
it should be possible to use the uac function of tm to inject a message
in an existing transaction, but I'm not sure.
I suggest you try the semsdev list. You can do quick prototyping there
in ex. python to understand how to do it and if you really need it
inside SER, you know how it should work. Use serdev for questions like
the one below.
g-)
Stefano Blasco wrote:
Dear all,
i'm trying to have call pickup with SER (i use ser 0.9.6), i mean i'd
like to have the capability to pick up a call that is directed to
another user while the other user telephone is ringing.
Is there someone that suceeded in this features?
If it is not possible to get this feature by configuriation of ser (i
mean using already present ser functions), is there someone that can
suggest how to implemente such features? (for istance with external
scripts,or with avpops, or using fifo, or writing a new ser module).
Maybe the use of fifo could help, in particular i saw the ctd.sh example
that is able to iniziate a call for two users using t_uac_dlg fifo
function. I tryed to use t_uac_dlg to send a CANCEL to a transaction in
progress (in the 180 ringing status) (taking by hand parameters like
Call-ID, tag, branch etc.), but it seems that t_uac_dlg is not able to
interact with the transaction in progress because it creates one
different transaction. Is it real, or am i wrong?
This is some log for this attempt:
################################################################
1(17187) INFO: fifo_server: command empty
1(17187) fifo_get_method: method: 'CANCEL'
1(17187) DEBUG: fifo_get_ruri: 'sip:801@x.x.x'
1(17187) DEBUG: fifo_get_nexthop: next hop empty
1(17187) fifo_get_headers: headers: To: <sip:801@x.x.x>
From: Stefano<sip:803@x.x.x>;tag=237abc61
Call-ID: 262a660822777d26
CSeq: 2 CANCEL
1(17187) parse_headers: flags=-1
1(17187) end of header reached, state=9
1(17187) DEBUG: get_hdr_field: <To> [28]; uri=[sip:801@x.x.x]
1(17187) DEBUG: to body [<sip:801@x.x.x>
]
1(17187) get_hdr_field: cseq <CSeq>: <2> <CANCEL>
1(17187) DEBUG: fifo_uac: parse_headers succeeded
1(17187) fifo_get_body: body:
1(17187) DEBUG: add_param: tag=237abc61
1(17187) end of header reached, state=29
1(17187) DEBUG: fifo_uac: EoL -- proceeding to transaction creation
1(17187) DEBUG:tm:t_uac: next_hop=<sip:801@x.x.x>
1(17187) DEBUG: mk_proxy: doing DNS lookup...
1(17187) get_record: lookup(_sip._udp.x.x.x, 33) failed
1(17187) sip_resolvehost: no SRV record found for x.x.x, trying
'normal' lookup...
1(17187) DEBUG:destroy_avp_list: destroying list (nil)
1(17187) DEBUG: dlg2hash: 55633
1(17187) DEBUG: add_to_tail_of_timer[4]: 0xb5ba0ac0
1(17187) DEBUG: add_to_tail_of_timer[0]: 0xb5ba0ad0
1(17187) **** done consume
2(17188) SIP Request:
2(17188) method: <CANCEL>
2(17188) uri: <sip:801@x.x.x>
2(17188) version: <SIP/2.0>
2(17188) parse_headers: flags=1
2(17188) Found param type 232, <branch> = <z9hG4bK159d.9169633.0>; state=16
2(17188) end of header reached, state=5
2(17188) parse_headers: Via found, flags=1
2(17188) parse_headers: this is the first via
2(17188) After parse_msg...
2(17188) preparing to run routing scripts...
2(17188) parse_headers: flags=128
2(17188) end of header reached, state=9
2(17188) DEBUG: get_hdr_field: <To> [28]; uri=[sip:801@x.x.x]
2(17188) DEBUG: to body [<sip:801@x.x.x>
]
2(17188) get_hdr_field: cseq <CSeq>: <2> <CANCEL>
2(17188) DEBUG: get_hdr_body : content_length=0
2(17188) found end of header
2(17188) DEBUG: is_maxfwd_present: max_forwards header not found!
2(17188) DEBUG: add_param: tag=237abc61
2(17188) end of header reached, state=29
2(17188) parse_headers: flags=256
2(17188) find_first_route: No Route headers found
2(17188) loose_route: There is no Route HF
2(17188) is_local(): Realm 'x.x.x' is local
2(17188) DEBUG: t_newtran: msg id=9 , global msg id=8 , T on
entrance=0xffffffff
2(17188) parse_headers: flags=-1
2(17188) parse_headers: flags=60
2(17188) t_lookup_request: start searching: hash=55633, isACK=0
2(17188) DEBUG: RFC3261 transaction matching failed
2(17188) DEBUG: t_lookup_request: no transaction found
2(17188) DBG: trans=0xb5ba1488, callback type 1, id 0 entered
2(17188) parse_headers: flags=44
2(17188) DEBUG: t_lookupOriginalT: searching on hash entry 55633
2(17188) DEBUG: RFC3261 transaction matching failed
2(17188) DEBUG: t_lookupOriginalT: no CANCEL matching found!
2(17188) DEBUG: t_lookupOriginalT completed
2(17188) DEBUG: mk_proxy: doing DNS lookup...
2(17188) get_record: lookup(_sip._udp.x.x.x, 33) failed
2(17188) sip_resolvehost: no SRV record found for x.x.x, trying
'normal' lookup...
2(17188) check_via_address(x.x.x.x, x.x.x.x, 0)
################################################################
Another thing, i saw that t_uac_cancel, instead, is able to interact
with an existing transaction, by sending CANCEL to called and 487 to
caller (using t_lookup_callid function to get transaction from callid
and cseq). Does someone think that it is possible to modify t_uac_cancel
to handle basic pickup functions? (that should be CANCEL for the called
side and redirect for caller towards pickup user)
This is some log for this case:
##################################################################
1(16115) INFO: fifo_server: command empty
1(16115) DEBUG: fifo_uac_cancel: ############### begin ##############
1(16115) DEBUG: fifo_uac_cancel: callid="0b29c5266716aa67"
1(16115) DEBUG: fifo_uac_cancel: cseq="2"
1(16115) created comparable call_id header field: >Call-ID:
0b29c5266716aa67
<
1(16115) created comparable cseq header field: >CSeq: 2 INVITE<
1(16115) just locked hash index 37328, looking for transactions there:
1(16115) we have a match: callid=>>Call-ID: 0b29c5266716aa67
<< cseq=>>CSeq: 2<<
1(16115) DEBUG: t_lookup_callid: transaction found.
1(16115) DEBUG: fifo_uac_cancel: now calling cancel_uacs
1(16115) DEBUG: cancel_branch: sending cancel...
1(16115) DEBUG: add_to_tail_of_timer[4]: 0xb5b763f0
1(16115) DEBUG: add_to_tail_of_timer[0]: 0xb5b76400
1(16115) DEBUG: fifo_uac_cancel: ################ end ##############
##################################################################
Thank you very much for your help
Stefano Blasco
_______________________________________________
Serusers mailing list
Serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers