[RTPproxy Users] enabling timeout notification?
Maxim Sobolev
sobomax at sippysoft.com
Thu Dec 3 14:21:20 PST 2009
Arman Gungor wrote:
> Hi,
>
> I have a problem with enabling notification on timeout. I followed steps in Daniel Pocock's mail:
>
> ------------------------------------------------------------------------------------------
> Here are some notes on how to observe the new notification behaviour:
>
>
> Start a timeout listener in one window:
>
> $ socat UNIX-LISTEN:/var/run/rtpproxy-test.timeout.sock STDOUT
>
>
> Start rtpproxy in another window:
>
> $ /tmp/rtpproxy -s unix:/var/run/rtpproxy-test.sock -n
>
> unix:/var/run/rtpproxy-test.timeout.sock -f
>
>
>
> In a third window, send a test command to rtpproxy:
>
> $ socat STDIO UNIX-CONNECT:/var/run/rtpproxy-test.sock
> Ua test01 192.168.1.100 1001 fromtag01 totag01
>
>
> ------------------------------------------------------------------------------------------
>
> However, nothing happens after a timeout. Is there anything else to do, in order to enable timeout notification? If we have to include something like "send timeout notification for this session", what is the format for it?
Yes, it has to be requested by the signaling component specifically by
passing the socket name and optional argument (i.e. session id) after
all parameters (i.e. after totag).
Check this file for example:
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/sippy/sippy/Rtp_proxy_session.py?view=markup
def update_caller(self, remote_ip, remote_port, result_callback,
options = '', index = 0, *callback_parameters):
command = 'U'
self.max_index = max(self.max_index, index)
if self.rtp_proxy_client.sbind_supported and
self.caller_raddress != None:
if self.rtp_proxy_client.is_local:
options += 'L%s' %
self.global_config['_sip_tm'].l4r.getServer( \
self.caller_raddress).laddress[0]
else:
options += 'R%s' % self.caller_raddress[0]
command += options
command += ' %s %s %d %s %s' % ('%s-%d' % (self.call_id,
index), remote_ip, remote_port, self.from_tag, self.to_tag)
if self.notify_socket != None and index == 0 and \
self.rtp_proxy_client.tnot_supported:
command += ' %s %s' % (self.notify_socket, self.notify_tag)
self.rtp_proxy_client.send_command(command, self.update_result,
(result_callback, 'caller', callback_parameters))
Hope it helps.
Regards,
--
Maksym Sobolyev
Sippy Software, Inc.
Internet Telephony (VoIP) Experts
T/F: +1-646-651-1110
Web: http://www.sippysoft.com
MSN: sales at sippysoft.com
Skype: SippySoft
More information about the Users
mailing list