[OpenSIPS-Devel] [opensips] mi_xmlrpc_ng bug with t_uac_dlg (#537)

Stas Kobzar notifications at github.com
Mon Jun 1 23:09:50 CEST 2015


Hello,

I have a bug with mi_xmlrpc_ng module when using tm module MI function t_uac_dlg.
I am using it to restart phones and manage MWI.

Python script example to reproduce problem (I have the same problem with ruby xmlrpc client):
```
#!/usr/bin/env python

import xmlrpclib
opensips = xmlrpclib.ServerProxy('http://10.130.8.20:8000/RPC2')
headers="From: <sip:7714 at voip.etsmtl.ca>;tag=8755a8d01aa27e903a6f4ccaf393f04\r\nTo: <sip:7714 at voip.etsmtl.ca>\r\nEvent: check-sync\r\n"
opensips.t_uac_dlg('NOTIFY', 'sip:7714 at campus.voip.etsmtl.ca', ".", ".", headers)

```

When I run the script, opensips generates following NOTIFY packet (from **ngrep**):
```
NOTIFY sip:7714 at 10.130.8.209 SIP/2.0.
Via: SIP/2.0/UDP 10.130.8.20:5060;branch=z9hG4bK43ec.c13af041.0.
Via: SIP/2.0/UDP 10.130.8.20:5060;branch=z9hG4bK43ec.b13af041.0.
To: sip:7714 at voip.etsmtl.ca.
From: <sip:7714 at voip.etsmtl.ca>;tag=8755a8d01aa27e903a6f4ccaf393f04.
CSeq: 10 NOTIFY.
Call-ID: 1c1bbe0b4e2c0d26-27166 at 10.130.8.20.
Max-Forwards: 69.
Content-Length: 0.
Server: ETS voip router01.
Event: check-sync
.
```

There is a terminating character "." is missing in header *Event: check-sync*. Some phone (Avaya) do not accept the packet.

When I run FIFO same command:
```
opensipsctl fifo t_uac_dlg NOTIFY sip:7714 at campus.voip.etsmtl.ca . . '"From: <sip:7714 at voip.etsmtl.ca>;tag=8755a8d01aa27e903a6f4ccaf393f04\r\nTo: <sip:7714 at voip.etsmtl.ca>\r\nEvent: check-sync\r\n"'
```

My packet looks fine and phones accept it:
```
NOTIFY sip:7714 at 10.130.8.209 SIP/2.0.
Via: SIP/2.0/UDP 10.130.8.20:5060;branch=z9hG4bKb31f.4656abe3.0.
Via: SIP/2.0/UDP 10.130.8.20:5060;branch=z9hG4bKb31f.3656abe3.0.
To: sip:7714 at voip.etsmtl.ca.
From: <sip:7714 at voip.etsmtl.ca>;tag=8755a8d01aa27e903a6f4ccaf393f04.
CSeq: 10 NOTIFY.
Call-ID: 1c1bbe0b4e2c0d1f-27167 at 10.130.8.20.
Max-Forwards: 69.
Content-Length: 0.
Server: ETS voip router01.
Event: check-sync.
.

```

The same problem I have with MWI packets. 

OpenSIPS version:
version: opensips 1.11.5-notls (x86_64/linux)
flags: STATS: On, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
git revision: 980b680
main.c compiled on 16:04:51 Jun  1 2015 with gcc 4.4.7




---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/537
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20150601/2d4449df/attachment.htm>


More information about the Devel mailing list