Hello Daniel.
The module being used is 'mi_xmlrpc.so' I am using the Carsten's rtpproxy
patch. RTPPROXY detects the media timeout and send a notification through
XMLRPC lib with 'dlg_terminate_dlg callid' to Kamailio. After that, I
configured the event_route to catch the local generated requests for
accounting these BYEs.
Thanks,
Alexandre
-----Mensagem original-----
De: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
Enviada em: quarta-feira, 23 de março de 2011 10:17
Para: Alexandre Abreu
Cc: 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List'
Assunto: Re: RES: [SR-Users] event_route and acc_db_request().
Hello,
On 3/23/11 1:44 PM, Alexandre Abreu wrote:
> Hello Daniel.
>
> The BYE is generated by kamctl/xmlrpc (dlg_terminate_dlg).
is xmlrpc via mi_xmlrpc or via xmlrpc module?
I have to double check, but looks very likely to be the fact that acc db
connection was not initialized for MI/RPC children processes.
Thanks,
Daniel
> Alexandre
>
> De: Daniel-Constantin Mierla [mailto:miconda@gmail.com] Enviada em:
> quarta-feira, 23 de março de 2011 04:55
> Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> Users Mailing List
> Cc: Alexandre Abreu
> Assunto: Re: [SR-Users] event_route and acc_db_request().
>
> Hello,
>
> On 3/17/11 5:45 PM, Alexandre Abreu wrote:
> Hello.
>
> Why acc_db_request() doesnt work on event_route?
>
> I will take a look.
>
> Is the BYE generated by dialog timeout or you trigger it by kamctl/xmlrpc?
>
> Cheers,
> Daniel
>
>
>
> Mar 17 13:15:44 devel kamailio[25209]: INFO:<script>: Routing locally
> generated BYE to<sip:2000000@192.168.200.114:9297>
> Mar 17 13:15:44 devel kamailio[25209]: ERROR:<core> [db.c:421]:
> invalid parameter value Mar 17 13:15:44 devel kamailio[25209]: ERROR:
> acc [acc.c:391]: error in use_table Mar 17 13:15:44 devel
> kamailio[25209]: INFO:<script>: Routing locally generated BYE
> to<sip:2000001@192.168.200.149:7335>
> Mar 17 13:15:44 devel kamailio[25209]: ERROR:<core> [db.c:421]:
> invalid parameter value Mar 17 13:15:44 devel kamailio[25209]: ERROR:
> acc [acc.c:391]: error in use_table
>
> event_route[tm:local-request] {
>
> xlog("L_INFO", "Routing locally generated $rm to<$ru>\n");
>
> if (is_method("BYE"))
> acc_db_request("rtp-timeout", acc); }
>
> If I change acc_db_request() to acc_log_request() everything works
> fine, but this BYE should go to database for accounting purposes.
>
> I am using GIT version from Kamailio branch 3.1.
>
> From 2008 there is a thread that also demonstrate this problem:
>
> http://www.mail-archive.com/users@lists.kamailio.org/msg01411.html
>
> Unfortunately, in the archives, theres no solution for that.
>
> Regards,
> Alexandre
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
> list sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
--
Daniel-Constantin Mierla
http://www.asipto.com
Hello,
What is (or should be) the binary main name when using FLAVOUR=ser,
FLAVOUR=sip-router or no FLAVOUR specified?
I'm getting "ser" as the name whatever I set to FLAVOUR var at compile time. Is
it right? (Makefiles.defs says "ser" in these cases but not sure the intention
of the sip-router project).
I need to know the correct one to make an ebuild package for Gentoo.
Thank you for your answers..
Regards,
Claudio
Hello.
Why acc_db_request() doesn't work on event_route?
Mar 17 13:15:44 devel kamailio[25209]: INFO: <script>: Routing locally
generated BYE to <sip:2000000@192.168.200.114:9297>
Mar 17 13:15:44 devel kamailio[25209]: ERROR: <core> [db.c:421]: invalid
parameter value
Mar 17 13:15:44 devel kamailio[25209]: ERROR: acc [acc.c:391]: error in
use_table
Mar 17 13:15:44 devel kamailio[25209]: INFO: <script>: Routing locally
generated BYE to <sip:2000001@192.168.200.149:7335>
Mar 17 13:15:44 devel kamailio[25209]: ERROR: <core> [db.c:421]: invalid
parameter value
Mar 17 13:15:44 devel kamailio[25209]: ERROR: acc [acc.c:391]: error in
use_table
event_route[tm:local-request] {
xlog("L_INFO", "Routing locally generated $rm to <$ru>\n");
if (is_method("BYE"))
acc_db_request("rtp-timeout", "acc");
}
If I change acc_db_request() to acc_log_request() everything works fine, but
this BYE should go to database for accounting purposes.
I am using GIT version from Kamailio branch 3.1.
>From 2008 there is a thread that also demonstrate this problem:
http://www.mail-archive.com/users@lists.kamailio.org/msg01411.html
Unfortunately, in the archives, there's no solution for that.
Regards,
Alexandre
Hi Carsten,
Patch applied. It works now.
Thanks,
Alexandre.
-----Mensagem original-----
De: kaiserbock2(a)googlemail.com [mailto:kaiserbock2@googlemail.com] Em nome
de Carsten Bock
Enviada em: terça-feira, 22 de março de 2011 08:00
Para: Alexandre Abreu
Cc: sr-users(a)lists.sip-router.org; RTPproxy Development
Assunto: Re: RTPPROXY timeout patch.
Hi Alexandre,
it took quite a lot of searching, but now it's done. It was a general
RTPProxy/PThread issue.
The problem seems to be, that the PThread is created before the fork
of the main process. Then the Thread waits forever...
Attached an changed main.c + rtpp_defines.h which modifies this
behaviour and starts the Thread after the fork.
I will create an according patch and send it to the
RTPProxy-Dev-Mailinglist as well.
Have fun,
Carsten
2011/3/22 Carsten Bock <lists(a)bock.info>:
> Hi Alexandre,
>
> it seem to be a general RTP-Proxy/PThread issue. It seems not to be
> related to the XML-RPC notification; the thread, which processes the
> timeouts, seems to waits forever... I will check...
>
> Carsten
>
> 2011/3/21 Alexandre Abreu <alexandre.abreu(a)redt.com.br>:
>> Hi Carsten,
>>
>> After more testing, I just realized that the notification works only if I
>> use "-f" parameter in RTPPROXY. If I omit this parameter (to run in
>> background mode), the session timeout but there's no notification sent
>> (BYE). Why's that?
>>
>> Thanks,
>> Alexandre.
>>
>> -----Mensagem original-----
>> De: Alexandre Abreu [mailto:alexandre.abreu@redt.com.br]
>> Enviada em: quarta-feira, 16 de março de 2011 14:41
>> Para: 'Carsten Bock'
>> Cc: 'sr-users(a)lists.sip-router.org'
>> Assunto: RES: RTPPROXY timeout patch.
>>
>> Carsten,
>>
>> Here it goes:
>>
>> [root@devel rtpproxy-carsten]# ./rtpproxy -T 10 -f -F -i -l
192.168.200.90
>> -s udp:*:7722 -d DBUG ERR INFO -n tcp:127.0.0.1:7723
>> INFO:main: rtpproxy started, pid 22495
>> rtpproxy: >>> Running Timeout-Process
>>
>> DBUG:handle_command: received command "22428_8 Uc0,8,101 080b5d23d1603667
>> 192.168.200.114 6380 0073852a;1"
>> INFO:handle_command: new session 080b5d23d1603667, tag 0073852a;1
requested,
>> type strong
>> INFO:handle_command: new session on a port 48662 created, tag 0073852a;1
>> INFO:handle_command: pre-filling caller's address with
192.168.200.114:6380
>> DBUG:doreply: sending reply "22428_8 48662 192.168.200.90"
>> DBUG:handle_command: received command "22436_8 Lc0,8,101 080b5d23d1603667
>> 192.168.200.149 7614 0073852a;1 c758967a;1
>> xmlrpc:http://127.0.0.1:8000/RPC2"
>> INFO:handle_command: lookup on ports 48662/58604, session timer restarted
>> INFO:handle_command: setting custom timeout handler
>> (xmlrpc:http://127.0.0.1:8000/RPC2)
>> INFO:handle_command: pre-filling callee's address with
192.168.200.149:7614
>> DBUG:doreply: sending reply "22436_8 58604 192.168.200.90"
>> INFO:process_rtp: session timeout
>> INFO:remove_session: RTP stats: 982 in from callee, 4 in from caller, 986
>> relayed, 0 dropped
>> INFO:remove_session: RTCP stats: 5 in from callee, 1 in from caller, 6
>> relayed, 0 dropped
>> INFO:remove_session: session on ports 48662/58604 is cleaned up
>> ERR:do_timeout_notification: Timeout socket is: èîÈÄÐÊ@ÍÈÄÈÄ`ê
>> DBUG:reconnect_timeout_handler: reconnecting timeout socket
>> ERR:reconnect_timeout_handler: can't create timeout socket: Address
family
>> not supported by protocol
>> ERR:do_timeout_notification: unable to send timeout notification
>>
>> Very weird chars in the debug of what Timeout socket is...
>>
>> But the custom timeout handler are being printed correctly from the
config
>> file.
>> INFO:handle_command: setting custom timeout handler
>> (xmlrpc:http://127.0.0.1:8000/RPC2)
>> Here I am running CentOS 5.2 32-bit.
>>
>> Thanks,
>> Alexandre
>>
>> -----Mensagem original-----
>> De: kaiserbock2(a)googlemail.com [mailto:kaiserbock2@googlemail.com] Em
nome
>> de Carsten Bock Enviada em: quarta-feira, 16 de março de 2011 14:18
>> Para: Alexandre Abreu
>> Cc: sr-users(a)lists.sip-router.org
>> Assunto: Re: RTPPROXY timeout patch.
>>
>> Hi Alexandre,
>>
>> My version of RTP-Proxy is following:
>>
>> bock@bock-tde:~/ims/rtpproxy$ ./rtpproxy -v Basic version: 20040107
>> Extension 20050322: Support for multiple RTP streams and MOH Extension
>> 20060704: Support for extra parameter in the V command Extension
20071116:
>> Support for RTP re-packetization Extension 20071218: Support for forking
>> (copying) RTP stream Extension 20080403: Support for RTP statistics
querying
>> Extension 20081102: Support for setting codecs in the update/lookup
command
>> Extension 20081224: Support for session timeout notifications Extension
>> 20090810: Support for automatic bridging Extension 20100819: Support for
>> timeout notifications using XML-RPC towards Kamailio/sip-router.org
>>
>> Please find attached a modified rtpp_notify.c file. I have just added
some
>> tiny debug output in order to see some points.
>> Now you should see the following Debug-Outputs:
>>
>> rtpproxy: >>> Running Timeout-Process
>>
>> Then the notifier process is running. That would be good. If not, that's
the
>> reason why it is not working. When the request comes in, you should see
the
>> following:
>>
>> INFO:handle_command: setting custom timeout handler
>> (xmlrpc:http://localhost:8000/RPC2)
>>
>> Then the Timeout-Socket was properly set, that would be good as well.
>> Now the timeout:
>>
>> INFO:process_rtp: session timeout
>> [...]
>> ERR:do_timeout_notification: Timeout socket is:
>> xmlrpc:http://localhost:8000/RPC2
>>
>> That would be great, because then the Timeout towards the Kamailio should
be
>> triggerd.
>> If these parts are ok, then there must be some issue either in the
XML-RPC
>> client library or in the communication between the RTP-Proxy and
Kamailio. I
>> hope you did a trace on the XML-RPC Port both on the RTPproxy and on the
>> Kamailio? What distro are you using? My tests were only on Ubuntu and
>> Debian, which are quite similar.
>>
>> Hope we find this issue,
>>
>> Kind regards,
>> Carsten
>>
>> P.S.: I think i removed that check for the port for testing, that's why
my
>> version accepted the socket without port... (now i'm using "-n
>> tcp:127.0.0.1:9999")
>>
>> 2011/3/16 Alexandre Abreu <alexandre.abreu(a)redt.com.br>:
>>> Carsten,
>>>
>>> Indeed. Very strange.
>>>
>>> Are we running the same RTPPROXY version? How can you start using '-n
>>> tcp:127.0.0.1' without specifying a port?
>>>
>>> [root@devel rtpproxy-carsten]# ./rtpproxy -T 10 -f -F -i -l
>>> 192.168.200.90 -s udp:*:7722 -d DBUG ERR INFO -n tcp:127.0.0.1
>>> rtpproxy: can't parse host:port in TCP address
>>> rtpproxy: can't start notification thread
>>>
>>> [root@devel rtpproxy-carsten]# ./rtpproxy -T 10 -f -F -i -l
>>> 192.168.200.90 -s udp:*:7722 -d DBUG ERR INFO -n tcp:127.0.0.1:7723
>>> INFO:main: rtpproxy started, pid 21169
>>>
>>> DBUG:handle_command: received command "17828_9 Uc0,8,101
>>> 4b10ce04de4f8818
>>> 192.168.200.114 6380 9c4b6265;1"
>>> INFO:handle_command: new session 4b10ce04de4f8818, tag 9c4b6265;1
>>> requested, type strong
>>> INFO:handle_command: new session on a port 43750 created, tag
>>> 9c4b6265;1
>>> INFO:handle_command: pre-filling caller's address with
>>> 192.168.200.114:6380
>>> DBUG:doreply: sending reply "17828_9 43750 192.168.200.90 "
>>> DBUG:handle_command: received command "17847_9 Lc0,8,101
>>> 4b10ce04de4f8818
>>> 192.168.200.149 7386 9c4b6265;1 dd69ab1d;1
>>> xmlrpc:http://localhost:8000/RPC2"
>>> INFO:handle_command: lookup on ports 43750/55796, session timer
>>> restarted
>>> INFO:handle_command: setting custom timeout handler
>>> (xmlrpc:http://localhost:8000/RPC2)
>>> INFO:handle_command: pre-filling callee's address with
>>> 192.168.200.149:7386
>>> DBUG:doreply: sending reply "17847_9 55796 192.168.200.90 "
>>> INFO:process_rtp: session timeout
>>> INFO:remove_session: RTP stats: 548 in from callee, 5 in from caller,
>>> 553 relayed, 0 dropped
>>> INFO:remove_session: RTCP stats: 3 in from callee, 1 in from caller, 4
>>> relayed, 0 dropped
>>> INFO:remove_session: session on ports 43750/55796 is cleaned up
>>> DBUG:reconnect_timeout_handler: reconnecting timeout socket
>>> ERR:reconnect_timeout_handler: can't create timeout socket: Address
>>> family not supported by protocol
>>> ERR:do_timeout_notification: unable to send timeout notification
>>>
>>> Above the error message.
>>>
>>> [root@devel ~]# md5sum rtpproxy-carsten.tar.gz
>>> c02b1e2ac57d39562e86bcfc4ee592b8 rtpproxy-carsten.tar.gz
>>>
>>> Thanks,
>>> Alexandre.
>>>
>>> -----Mensagem original-----
>>> De: kaiserbock2(a)googlemail.com [mailto:kaiserbock2@googlemail.com] Em
>>> nome de Carsten Bock Enviada em: quarta-feira, 16 de março de 2011
>>> 13:03
>>> Para: Alexandre Abreu
>>> Cc: sr-users(a)lists.sip-router.org
>>> Assunto: Re: RTPPROXY timeout patch.
>>>
>>> Hi Alexandre,
>>>
>>> That is strange:
>>>
>>> I run the RTP-Proxy like this (directly from the TAR-File, i sent you)
>>> and Kamailio with attached config-file.
>>>
>>> bock@bock-tde:~/ims/rtpproxy$ sudo ./rtpproxy -T 10 -f -F -i -l
>>> 127.0.0.1 -s udp:*:22222 -d DBUG -n tcp:127.0.0.1
>>> rtpproxy: Timer started.
>>> INFO:main: rtpproxy started, pid 4203
>>> [... Kamailio connects to RTP-Proxy...]
>>> DBUG:handle_command: received command "4259_8
>>> UAc98,97,99,104,3,0,8,9,96 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5
>>> 195.71.4.203 4008 5371f039-40d0-4944-aae7-6f75071a2f8c;1"
>>> INFO:handle_command: new session 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5,
>>> tag 5371f039-40d0-4944-aae7-6f75071a2f8c;1 requested, type strong
>>> INFO:handle_command: new session on a port 45508 created, tag
>>> 5371f039-40d0-4944-aae7-6f75071a2f8c;1
>>> INFO:handle_command: pre-filling caller's address with
>>> 195.71.4.203:4008
>>> DBUG:doreply: sending reply "4259_8 45508 127.0.0.1 "
>>> DBUG:handle_command: received command "4259_9 LAc98,96
>>> 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5 195.71.4.203 4000
>>> 5371f039-40d0-4944-aae7-6f75071a2f8c;1
>>> 9915df0c-30fc-49c5-aa8a-c86b4242c094;1
>>> xmlrpc:http://localhost:8000/RPC2"
>>> INFO:handle_command: lookup on ports 45508/45238, session timer
>>> restarted
>>> INFO:handle_command: setting custom timeout handler
>>> (xmlrpc:http://localhost:8000/RPC2)
>>> INFO:handle_command: pre-filling callee's address with
>>> 195.71.4.203:4000
>>> DBUG:doreply: sending reply "4259_9 45238 127.0.0.1 "
>>> INFO:process_rtp: session timeout
>>> ERR:rtpp_notify_schedule: XMLRPC xmlrpc:http://localhost:8000/RPC2
>>> INFO:remove_session: RTP stats: 0 in from callee, 0 in from caller, 0
>>> relayed, 0 dropped
>>> INFO:remove_session: RTCP stats: 0 in from callee, 0 in from caller, 0
>>> relayed, 0 dropped
>>> INFO:remove_session: session on ports 45508/45238 is cleaned up
>>> ERR:do_timeout_notification: Timeout socket:
>>> xmlrpc:http://localhost:8000/RPC2
>>>
>>> And it works for me:
>>>
>>> U 2011/03/16 16:50:14.350721 127.0.0.1:5060 -> 127.0.0.1:15061 BYE
>>> sip:2@127.0.0.1:15061;ob SIP/2.0.
>>> Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK06e9.245e2dd7.0.
>>> To: sip:2@localhost;tag=5371f039-40d0-4944-aae7-6f75071a2f8c.
>>> From: sip:1@localhost;tag=9915df0c-30fc-49c5-aa8a-c86b4242c094.
>>> CSeq: 7905 BYE.
>>> Call-ID: 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5.
>>> Content-Length: 0.
>>> User-Agent: kamailio (3.2.0-dev2 (x86_64/linux)).
>>> Max-Forwards: 70.
>>> .
>>>
>>> U 2011/03/16 16:50:14.350801 127.0.0.1:5060 -> 127.0.0.1:15060 BYE
>>> sip:1@127.0.0.1:15060;transport=UDP;ob SIP/2.0.
>>> Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK06e9.345e2dd7.0.
>>> To: sip:1@localhost;tag=9915df0c-30fc-49c5-aa8a-c86b4242c094.
>>> From: sip:2@localhost;tag=5371f039-40d0-4944-aae7-6f75071a2f8c.
>>> CSeq: 7905 BYE.
>>> Call-ID: 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5.
>>> Content-Length: 0.
>>> User-Agent: kamailio (3.2.0-dev2 (x86_64/linux)).
>>> Max-Forwards: 70.
>>> .
>>> [...]
>>>
>>> Maybe, you can add some more debug-info from RTP-Proxy...
>>> And can you verify, that the RTP-Proxy is not trying to send the
request?
>>>
>>> Kind regards,
>>> Carsten
>>>
>>> 2011/3/16 Alexandre Abreu <alexandre.abreu(a)redt.com.br>:
>>>> Hi Carsten,
>>>>
>>>> Even with your RTPPROXY tarball I was unable to get this working.
>>>> Session remains after RTPPROXY timeout.
>>>> I am using KAMAILIO 3.1 branch from GIT and as I told you, I moved
>>>> the rtpproxy/ from GIT-MASTER to the Kamailio branch (waiting your
>> backport).
>>> Is
>>>> there anything else regarding this feature that should also should be
>>> moved
>>>> (beyond rtpproxy/)?
>>>>
>>>> Thanks,
>>>> Alexandre
>>
>>
>
>
>
> --
> Carsten Bock
> http://www.ng-voice.com
> mailto:carsten@ng-voice.com
>
--
Carsten Bock
http://www.ng-voice.com
mailto:carsten@ng-voice.com
Hi,
I have a service that requires a user to authenticate, in order to bill him at the end of the service. I also need real-
time check of the balance during a call, in order to signal when the amount is too low to continue the call. Is this
possible with SER?
Thanx,
Miguel Tadeu
Hello.
Is there a way to adjust the timezone to display the charts and the logs in
the SIREMIS 2.0? I have my linux machine with my local timezone, but the
display in the charts and the logs are not in synch with my local time.
Thanks in advance.
Regards,
Ricardo Martinez.-
Greetings fellow open source VoIP users and developers!
We are happy to announce that ClueCon 2011 registration is now open. The
event will be held August 9-11, 2011 at the Sofitel Hotel in downtown
Chicago. Additionally, we are now accepting proposals for speaking topics.
If you or your organization would like to speak at ClueCon this year please
contact us with your ideas. Visit us at http://www.cluecon.com for
additional details on registration, speaking, or sponsorship opportunities.
Thank you to all the members of the open source telephony projects who have
supported ClueCon over the years. We hope to see you all again this coming
August!
Michael S Collins
ClueCon Team Member
http://www.cluecon.com
Hello.
I have found another important thread "Catching internally generated BYE
event & other" regarding this goal.
Alex,
Do you mind to share how did you catch the internally generated BYE? (by
just reading the thread I can't know if you really did)
As far as I understand, the event_route could be used for this (accounting)
but specially acc_db_request() does not seem to work. Maybe I am missing
something basic or there is other approach to reach this target.
Thanks for any tip,
Alexandre.
De: Alexandre Abreu [mailto:alexandre.abreu@redt.com.br]
Enviada em: quinta-feira, 17 de março de 2011 13:45
Para: sr-users(a)lists.sip-router.org
Assunto: event_route and acc_db_request().
Hello.
Why acc_db_request() doesnt work on event_route?
Mar 17 13:15:44 devel kamailio[25209]: INFO: <script>: Routing locally
generated BYE to <sip:2000000@192.168.200.114:9297>
Mar 17 13:15:44 devel kamailio[25209]: ERROR: <core> [db.c:421]: invalid
parameter value
Mar 17 13:15:44 devel kamailio[25209]: ERROR: acc [acc.c:391]: error in
use_table
Mar 17 13:15:44 devel kamailio[25209]: INFO: <script>: Routing locally
generated BYE to <sip:2000001@192.168.200.149:7335>
Mar 17 13:15:44 devel kamailio[25209]: ERROR: <core> [db.c:421]: invalid
parameter value
Mar 17 13:15:44 devel kamailio[25209]: ERROR: acc [acc.c:391]: error in
use_table
event_route[tm:local-request] {
xlog("L_INFO", "Routing locally generated $rm to <$ru>\n");
if (is_method("BYE"))
acc_db_request("rtp-timeout", acc);
}
If I change acc_db_request() to acc_log_request() everything works fine, but
this BYE should go to database for accounting purposes.
I am using GIT version from Kamailio branch 3.1.
>From 2008 there is a thread that also demonstrate this problem:
http://www.mail-archive.com/users@lists.kamailio.org/msg01411.html
Unfortunately, in the archives, theres no solution for that.
Regards,
Alexandre
Hi Carsten,
After more testing, I just realized that the notification works only if I
use "-f" parameter in RTPPROXY. If I omit this parameter (to run in
background mode), the session timeout but there's no notification sent
(BYE). Why's that?
Thanks,
Alexandre.
-----Mensagem original-----
De: Alexandre Abreu [mailto:alexandre.abreu@redt.com.br]
Enviada em: quarta-feira, 16 de março de 2011 14:41
Para: 'Carsten Bock'
Cc: 'sr-users(a)lists.sip-router.org'
Assunto: RES: RTPPROXY timeout patch.
Carsten,
Here it goes:
[root@devel rtpproxy-carsten]# ./rtpproxy -T 10 -f -F -i -l 192.168.200.90
-s udp:*:7722 -d DBUG ERR INFO -n tcp:127.0.0.1:7723
INFO:main: rtpproxy started, pid 22495
rtpproxy: >>> Running Timeout-Process
DBUG:handle_command: received command "22428_8 Uc0,8,101 080b5d23d1603667
192.168.200.114 6380 0073852a;1"
INFO:handle_command: new session 080b5d23d1603667, tag 0073852a;1 requested,
type strong
INFO:handle_command: new session on a port 48662 created, tag 0073852a;1
INFO:handle_command: pre-filling caller's address with 192.168.200.114:6380
DBUG:doreply: sending reply "22428_8 48662 192.168.200.90"
DBUG:handle_command: received command "22436_8 Lc0,8,101 080b5d23d1603667
192.168.200.149 7614 0073852a;1 c758967a;1
xmlrpc:http://127.0.0.1:8000/RPC2"
INFO:handle_command: lookup on ports 48662/58604, session timer restarted
INFO:handle_command: setting custom timeout handler
(xmlrpc:http://127.0.0.1:8000/RPC2)
INFO:handle_command: pre-filling callee's address with 192.168.200.149:7614
DBUG:doreply: sending reply "22436_8 58604 192.168.200.90"
INFO:process_rtp: session timeout
INFO:remove_session: RTP stats: 982 in from callee, 4 in from caller, 986
relayed, 0 dropped
INFO:remove_session: RTCP stats: 5 in from callee, 1 in from caller, 6
relayed, 0 dropped
INFO:remove_session: session on ports 48662/58604 is cleaned up
ERR:do_timeout_notification: Timeout socket is: èîÈÄÐÊ@ÍÈÄÈÄ`ê
DBUG:reconnect_timeout_handler: reconnecting timeout socket
ERR:reconnect_timeout_handler: can't create timeout socket: Address family
not supported by protocol
ERR:do_timeout_notification: unable to send timeout notification
Very weird chars in the debug of what Timeout socket is...
But the custom timeout handler are being printed correctly from the config
file.
INFO:handle_command: setting custom timeout handler
(xmlrpc:http://127.0.0.1:8000/RPC2)
Here I am running CentOS 5.2 32-bit.
Thanks,
Alexandre
-----Mensagem original-----
De: kaiserbock2(a)googlemail.com [mailto:kaiserbock2@googlemail.com] Em nome
de Carsten Bock Enviada em: quarta-feira, 16 de março de 2011 14:18
Para: Alexandre Abreu
Cc: sr-users(a)lists.sip-router.org
Assunto: Re: RTPPROXY timeout patch.
Hi Alexandre,
My version of RTP-Proxy is following:
bock@bock-tde:~/ims/rtpproxy$ ./rtpproxy -v Basic version: 20040107
Extension 20050322: Support for multiple RTP streams and MOH Extension
20060704: Support for extra parameter in the V command Extension 20071116:
Support for RTP re-packetization Extension 20071218: Support for forking
(copying) RTP stream Extension 20080403: Support for RTP statistics querying
Extension 20081102: Support for setting codecs in the update/lookup command
Extension 20081224: Support for session timeout notifications Extension
20090810: Support for automatic bridging Extension 20100819: Support for
timeout notifications using XML-RPC towards Kamailio/sip-router.org
Please find attached a modified rtpp_notify.c file. I have just added some
tiny debug output in order to see some points.
Now you should see the following Debug-Outputs:
rtpproxy: >>> Running Timeout-Process
Then the notifier process is running. That would be good. If not, that's the
reason why it is not working. When the request comes in, you should see the
following:
INFO:handle_command: setting custom timeout handler
(xmlrpc:http://localhost:8000/RPC2)
Then the Timeout-Socket was properly set, that would be good as well.
Now the timeout:
INFO:process_rtp: session timeout
[...]
ERR:do_timeout_notification: Timeout socket is:
xmlrpc:http://localhost:8000/RPC2
That would be great, because then the Timeout towards the Kamailio should be
triggerd.
If these parts are ok, then there must be some issue either in the XML-RPC
client library or in the communication between the RTP-Proxy and Kamailio. I
hope you did a trace on the XML-RPC Port both on the RTPproxy and on the
Kamailio? What distro are you using? My tests were only on Ubuntu and
Debian, which are quite similar.
Hope we find this issue,
Kind regards,
Carsten
P.S.: I think i removed that check for the port for testing, that's why my
version accepted the socket without port... (now i'm using "-n
tcp:127.0.0.1:9999")
2011/3/16 Alexandre Abreu <alexandre.abreu(a)redt.com.br>:
> Carsten,
>
> Indeed. Very strange.
>
> Are we running the same RTPPROXY version? How can you start using '-n
> tcp:127.0.0.1' without specifying a port?
>
> [root@devel rtpproxy-carsten]# ./rtpproxy -T 10 -f -F -i -l
> 192.168.200.90 -s udp:*:7722 -d DBUG ERR INFO -n tcp:127.0.0.1
> rtpproxy: can't parse host:port in TCP address
> rtpproxy: can't start notification thread
>
> [root@devel rtpproxy-carsten]# ./rtpproxy -T 10 -f -F -i -l
> 192.168.200.90 -s udp:*:7722 -d DBUG ERR INFO -n tcp:127.0.0.1:7723
> INFO:main: rtpproxy started, pid 21169
>
> DBUG:handle_command: received command "17828_9 Uc0,8,101
> 4b10ce04de4f8818
> 192.168.200.114 6380 9c4b6265;1"
> INFO:handle_command: new session 4b10ce04de4f8818, tag 9c4b6265;1
> requested, type strong
> INFO:handle_command: new session on a port 43750 created, tag
> 9c4b6265;1
> INFO:handle_command: pre-filling caller's address with
> 192.168.200.114:6380
> DBUG:doreply: sending reply "17828_9 43750 192.168.200.90 "
> DBUG:handle_command: received command "17847_9 Lc0,8,101
> 4b10ce04de4f8818
> 192.168.200.149 7386 9c4b6265;1 dd69ab1d;1
> xmlrpc:http://localhost:8000/RPC2"
> INFO:handle_command: lookup on ports 43750/55796, session timer
> restarted
> INFO:handle_command: setting custom timeout handler
> (xmlrpc:http://localhost:8000/RPC2)
> INFO:handle_command: pre-filling callee's address with
> 192.168.200.149:7386
> DBUG:doreply: sending reply "17847_9 55796 192.168.200.90 "
> INFO:process_rtp: session timeout
> INFO:remove_session: RTP stats: 548 in from callee, 5 in from caller,
> 553 relayed, 0 dropped
> INFO:remove_session: RTCP stats: 3 in from callee, 1 in from caller, 4
> relayed, 0 dropped
> INFO:remove_session: session on ports 43750/55796 is cleaned up
> DBUG:reconnect_timeout_handler: reconnecting timeout socket
> ERR:reconnect_timeout_handler: can't create timeout socket: Address
> family not supported by protocol
> ERR:do_timeout_notification: unable to send timeout notification
>
> Above the error message.
>
> [root@devel ~]# md5sum rtpproxy-carsten.tar.gz
> c02b1e2ac57d39562e86bcfc4ee592b8 rtpproxy-carsten.tar.gz
>
> Thanks,
> Alexandre.
>
> -----Mensagem original-----
> De: kaiserbock2(a)googlemail.com [mailto:kaiserbock2@googlemail.com] Em
> nome de Carsten Bock Enviada em: quarta-feira, 16 de março de 2011
> 13:03
> Para: Alexandre Abreu
> Cc: sr-users(a)lists.sip-router.org
> Assunto: Re: RTPPROXY timeout patch.
>
> Hi Alexandre,
>
> That is strange:
>
> I run the RTP-Proxy like this (directly from the TAR-File, i sent you)
> and Kamailio with attached config-file.
>
> bock@bock-tde:~/ims/rtpproxy$ sudo ./rtpproxy -T 10 -f -F -i -l
> 127.0.0.1 -s udp:*:22222 -d DBUG -n tcp:127.0.0.1
> rtpproxy: Timer started.
> INFO:main: rtpproxy started, pid 4203
> [... Kamailio connects to RTP-Proxy...]
> DBUG:handle_command: received command "4259_8
> UAc98,97,99,104,3,0,8,9,96 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5
> 195.71.4.203 4008 5371f039-40d0-4944-aae7-6f75071a2f8c;1"
> INFO:handle_command: new session 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5,
> tag 5371f039-40d0-4944-aae7-6f75071a2f8c;1 requested, type strong
> INFO:handle_command: new session on a port 45508 created, tag
> 5371f039-40d0-4944-aae7-6f75071a2f8c;1
> INFO:handle_command: pre-filling caller's address with
> 195.71.4.203:4008
> DBUG:doreply: sending reply "4259_8 45508 127.0.0.1 "
> DBUG:handle_command: received command "4259_9 LAc98,96
> 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5 195.71.4.203 4000
> 5371f039-40d0-4944-aae7-6f75071a2f8c;1
> 9915df0c-30fc-49c5-aa8a-c86b4242c094;1
> xmlrpc:http://localhost:8000/RPC2"
> INFO:handle_command: lookup on ports 45508/45238, session timer
> restarted
> INFO:handle_command: setting custom timeout handler
> (xmlrpc:http://localhost:8000/RPC2)
> INFO:handle_command: pre-filling callee's address with
> 195.71.4.203:4000
> DBUG:doreply: sending reply "4259_9 45238 127.0.0.1 "
> INFO:process_rtp: session timeout
> ERR:rtpp_notify_schedule: XMLRPC xmlrpc:http://localhost:8000/RPC2
> INFO:remove_session: RTP stats: 0 in from callee, 0 in from caller, 0
> relayed, 0 dropped
> INFO:remove_session: RTCP stats: 0 in from callee, 0 in from caller, 0
> relayed, 0 dropped
> INFO:remove_session: session on ports 45508/45238 is cleaned up
> ERR:do_timeout_notification: Timeout socket:
> xmlrpc:http://localhost:8000/RPC2
>
> And it works for me:
>
> U 2011/03/16 16:50:14.350721 127.0.0.1:5060 -> 127.0.0.1:15061 BYE
> sip:2@127.0.0.1:15061;ob SIP/2.0.
> Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK06e9.245e2dd7.0.
> To: sip:2@localhost;tag=5371f039-40d0-4944-aae7-6f75071a2f8c.
> From: sip:1@localhost;tag=9915df0c-30fc-49c5-aa8a-c86b4242c094.
> CSeq: 7905 BYE.
> Call-ID: 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5.
> Content-Length: 0.
> User-Agent: kamailio (3.2.0-dev2 (x86_64/linux)).
> Max-Forwards: 70.
> .
>
> U 2011/03/16 16:50:14.350801 127.0.0.1:5060 -> 127.0.0.1:15060 BYE
> sip:1@127.0.0.1:15060;transport=UDP;ob SIP/2.0.
> Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK06e9.345e2dd7.0.
> To: sip:1@localhost;tag=9915df0c-30fc-49c5-aa8a-c86b4242c094.
> From: sip:2@localhost;tag=5371f039-40d0-4944-aae7-6f75071a2f8c.
> CSeq: 7905 BYE.
> Call-ID: 56f0f83a-5373-46a1-b6f6-9ce2f93e68d5.
> Content-Length: 0.
> User-Agent: kamailio (3.2.0-dev2 (x86_64/linux)).
> Max-Forwards: 70.
> .
> [...]
>
> Maybe, you can add some more debug-info from RTP-Proxy...
> And can you verify, that the RTP-Proxy is not trying to send the request?
>
> Kind regards,
> Carsten
>
> 2011/3/16 Alexandre Abreu <alexandre.abreu(a)redt.com.br>:
>> Hi Carsten,
>>
>> Even with your RTPPROXY tarball I was unable to get this working.
>> Session remains after RTPPROXY timeout.
>> I am using KAMAILIO 3.1 branch from GIT and as I told you, I moved
>> the rtpproxy/ from GIT-MASTER to the Kamailio branch (waiting your
backport).
> Is
>> there anything else regarding this feature that should also should be
> moved
>> (beyond rtpproxy/)?
>>
>> Thanks,
>> Alexandre