[OpenSIPS-Devel] XML parse error when publishing message summary

2015-10-20 Thread Henk Hesselink
Hi,

When we publish message-summary events to OpenSIPS 1.11.2 we see this:

ERROR:presence:dialog_fix_remote_target: Failed to parse xml dialog
body: Start tag expected, '<' not found#012
ERROR:presence:update_presentity: Failed to fix remote target

in the logs.  The error comes from dialog_fix_remote_target():

handle_publish => update_presentity => dialog_fix_remote_target

which calls xmlParseMemory to parse the message-summary body as XML.
The call to dialog_fix_remote_target is conditional on fix_remote_target
(bla_fix_remote_target param from the presence module) and if we turn
that off the error goes away.  Shouldn't dialog_fix_remote_target only
be called on XML-type bodies?

Regards,

Henk Hesselink
Voipro International

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] XML parse error when publishing message summary

2015-11-02 Thread Henk Hesselink
Hi Bogdan,

We're publishing message-summary events, not BLA, so straight text.  It
seems to me dialog_fix_remote_target shouldn't be called in that case.

Cheers,

Henk


On 10/22/15 16:21, Bogdan-Andrei Iancu wrote:
> Hi Henk,
> 
> May sounds like a stupid question, but isn't body XML for BLA ?
> 
> Best regards,
> 
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
> 
> On 20.10.2015 13:00, Henk Hesselink wrote:
>> Hi,
>>
>> When we publish message-summary events to OpenSIPS 1.11.2 we see this:
>>
>> ERROR:presence:dialog_fix_remote_target: Failed to parse xml dialog
>> body: Start tag expected, '<' not found#012
>> ERROR:presence:update_presentity: Failed to fix remote target
>>
>> in the logs.  The error comes from dialog_fix_remote_target():
>>
>> handle_publish => update_presentity => dialog_fix_remote_target
>>
>> which calls xmlParseMemory to parse the message-summary body as XML.
>> The call to dialog_fix_remote_target is conditional on fix_remote_target
>> (bla_fix_remote_target param from the presence module) and if we turn
>> that off the error goes away.  Shouldn't dialog_fix_remote_target only
>> be called on XML-type bodies?
>>
>> Regards,
>>
>> Henk Hesselink
>> Voipro International
>>
>> ___
>> Devel mailing list
>> Devel@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>
>>
> 
> 

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] XML parse error when publishing message summary

2015-11-17 Thread Henk Hesselink
Hi Bogdan,

Any further thoughts on this?

Cheers,

Henk


On 11/2/15 22:49, Henk Hesselink wrote:
> Hi Bogdan,
> 
> We're publishing message-summary events, not BLA, so straight text.  It
> seems to me dialog_fix_remote_target shouldn't be called in that case.
> 
> Cheers,
> 
> Henk
> 
> 
> On 10/22/15 16:21, Bogdan-Andrei Iancu wrote:
>> Hi Henk,
>>
>> May sounds like a stupid question, but isn't body XML for BLA ?
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>> On 20.10.2015 13:00, Henk Hesselink wrote:
>>> Hi,
>>>
>>> When we publish message-summary events to OpenSIPS 1.11.2 we see this:
>>>
>>> ERROR:presence:dialog_fix_remote_target: Failed to parse xml dialog
>>> body: Start tag expected, '<' not found#012
>>> ERROR:presence:update_presentity: Failed to fix remote target
>>>
>>> in the logs.  The error comes from dialog_fix_remote_target():
>>>
>>> handle_publish => update_presentity => dialog_fix_remote_target
>>>
>>> which calls xmlParseMemory to parse the message-summary body as XML.
>>> The call to dialog_fix_remote_target is conditional on fix_remote_target
>>> (bla_fix_remote_target param from the presence module) and if we turn
>>> that off the error goes away.  Shouldn't dialog_fix_remote_target only
>>> be called on XML-type bodies?
>>>
>>> Regards,
>>>
>>> Henk Hesselink
>>> Voipro International
>>>
>>> ___
>>> Devel mailing list
>>> Devel@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>>
>>>
>>
>>
> 
> ___
> Devel mailing list
> Devel@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
> 

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] PATCH: use all SRV records for mediaproxy dispatcher entries

2012-10-23 Thread Henk Hesselink

Hi,

The mediaproxy relay only uses the first SRV record returned for each
entry in the  dispatcher line in the config file.  The attached patch
changes that to use all returned records.  This makes it possible to
group dispatchers, and also means the config file doesn't need to be
changed (and the relay restarted) every time the list of dispatchers
changes.  The patch is against mediaproxy 2.4.2.

Regards,

Henk Hesselink
--- relay.py-2.4.2  2010-07-15 11:28:32.0 +0200
+++ relay.py2012-10-24 03:09:51.360810895 +0200
@@ -257,9 +257,10 @@
 return KeepRunning
 
 def _cb_got_srv(self, (answers, auth, add), port):
-for answer in answers:
-if answer.type == dns.SRV and answer.payload and 
answer.payload.target != dns.Name("."):
-return str(answer.payload.target), port
+srvs = [(str(answer.payload.target), port) for answer in answers
+if answer.type == dns.SRV and answer.payload and 
answer.payload.target != dns.Name(".")]
+if len(srvs):
+return srvs
 raise DomainError
 
 def _eb_no_srv(self, failure, addr, port):
@@ -272,7 +273,12 @@
 
 def _cb_got_all(self, results):
 if not self.shutting_down:
-dispatchers = [result[1] for result in results if result[0] and 
result[1] is not None]
+dispatchers = []
+for dispatcher in [result[1] for result in results if result[0] 
and result[1] is not None]:
+if type(dispatcher) == type([]):
+dispatchers.extend(dispatcher)
+else:
+dispatchers.append(dispatcher)
 self.update_dispatchers(dispatchers)
 
 def update_dispatchers(self, dispatchers):
___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel