[SIP Beyond VoIP] SIP URI parse error

Saúl Ibarra Corretgé saul at ag-projects.com
Mon Jun 17 11:03:01 CEST 2013


Hi Christoph,

Sorry I missed your mail!

On Jun 4, 2013, at 5:04 PM, Christoph Kuhr wrote:

> Hi everyone,
> 
> at first, I am new to sip simple.
> 
> I am trying to set the sip uri from a Qt QLineedit.
> # qt slot
> def set_remote_sip_uri(self, remote_uri):
>    self.remote_uri =  ToHeader(SIPURI.parse(str(remote_uri))) # remote_uri is a QString
> these lines of code produce the follwoing error:
> 17:00:19.677   SIPURI_parse  pool created, size=4096
> self.remote_uri =  ToHeader(SIPURI.parse(str(remote_uri)))
>   File "_core.helper.pxi", line 197, in sipsimple.core._core.SIPURI_parse (sipsimple/core/_core.c:60390)
> sipsimple.core._core.SIPCoreError: Not a valid SIP URI: sip:christoph at sip2sip.info:53024
> 
> I tried all possibilities I could think of. According to the wiki it should be done like that:
> 
> SIPURI.parse('sip:alice at example.org:54321;transport=tls')
> 
> Could anyone tell me, what I am doing wrong?
> 

"sip:christoph at sip2sip.info:53024" is a valid SIP URI, so there must be something we can't see there which makes it invalid. Can you please print the representation of the URI in the set_remote_sip_uri function?

uri = str(remote_uri)
print repr(uri)

And see if there is any extraneous trailing spaces, for example.


Regards,

--
Saúl Ibarra Corretgé
AG Projects





More information about the SIPBeyondVoIP mailing list