mi_datagram and passing quote sign

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

mi_datagram and passing quote sign

Alex Massover

Hi!

 

I'm trying to pass string that includes quote sign(s) via mi_datagram interface.

 

For example dlg_end_dlg can receive additional header, let say I want two headers, so I build:

:dlg_end_dlg:\n

"Header1: data1\r\nHeader2: data2\r\n\r\n"\n

And this one works.

 

Now I want the Header2 to be

Header2: data2 "data3 data4"

 

Straight-forward way:

:dlg_end_dlg:\n

"Header1: data1\r\nHeader2: data2 "data3 data4"\r\n\r\n"\n

doesn't work.

 

Escaping also doesn't work:

:dlg_end_dlg:\n

"Header1: data1\r\nHeader2: data2 \"data3 data4\"\r\n\r\n"\n

 

I wonder how to pass something quoted via mi_datagram.

 

--

Best Regards,

Alex Massover

 



******************************************************************************
This footnote confirms that this email message has been scanned by Jajah Inc. Mail system for the presence of malicious code, vandals & computer viruses.
******************************************************************************


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: mi_datagram and passing quote sign

Iñaki Baz Castillo
2008/12/28 Alex Massover <[hidden email]>:

> Escaping also doesn't work:
>
> :dlg_end_dlg:\n
>
> "Header1: data1\r\nHeader2: data2 \"data3 data4\"\r\n\r\n"\n
>
>
>
> I wonder how to pass something quoted via mi_datagram.


Not sure, but would work the following?:

:dlg_end_dlg:\n
'Header1: data1\r\nHeader2: data2 "data3 data4"\r\n\r\n'\n



--
Iñaki Baz Castillo
<[hidden email]>
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: mi_datagram and passing quote sign

Bogdan-Andrei Iancu
In reply to this post by Alex Massover
Hi Alex,

You can escape " char by using \"  . If it doesn't work, please post the
entire Mi command you are sending as well as the opensips logs (use
debug=6).

Thanks and regards,
Bogdan

Alex Massover wrote:

>
> Hi!
>
>  
>
> I'm trying to pass string that includes quote sign(s) via mi_datagram
> interface.
>
>  
>
> For example dlg_end_dlg can receive additional header, let say I want
> two headers, so I build:
>
> :dlg_end_dlg:\n
>
> "Header1: data1\r\nHeader2: data2\r\n\r\n"\n
>
> And this one works.
>
>  
>
> Now I want the Header2 to be
>
> Header2: data2 "data3 data4"
>
>  
>
> Straight-forward way:
>
> :dlg_end_dlg:\n
>
> "Header1: data1\r\nHeader2: data2 "data3 data4"\r\n\r\n"\n
>
> doesn't work.
>
>  
>
> Escaping also doesn't work:
>
> :dlg_end_dlg:\n
>
> "Header1: data1\r\nHeader2: data2 \"data3 data4\"\r\n\r\n"\n
>
>  
>
> I wonder how to pass something quoted via mi_datagram.
>
>  
>
> --
>
> Best Regards,
>
> Alex Massover
>
>  
>
>
>
> ******************************************************************************
>
> This footnote confirms that this email message has been scanned by
> Jajah Inc. Mail system for the presence of malicious code, vandals &
> computer viruses.
> ******************************************************************************
>
> 
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: mi_datagram and passing quote sign

Alex Massover
Hi!

While writing the reply and attaching the log file I found the problem, it was missing final \n after last argument. However if I don't escape quotes inside the mi command it works even without final \n, and because of that I missed the point from the beginning.

Now everything works fine, thanks!

I have another question, please. Because of mi_datagram module opens new socket for each replying instead of using the one it listens on, client that talk to mi_datagram interface can't be behind NAT. Why not to reply from the same socket the module listens on?

--
Best Regards,
Alex Massover

-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:[hidden email]]
Sent: Monday, December 29, 2008 4:12 PM
To: Alex Massover
Cc: opensip
Subject: Re: [OpenSIPS-Users] mi_datagram and passing quote sign

Hi Alex,

You can escape " char by using \"  . If it doesn't work, please post the
entire Mi command you are sending as well as the opensips logs (use
debug=6).

Thanks and regards,
Bogdan

Alex Massover wrote:

>
> Hi!
>
>
>
> I'm trying to pass string that includes quote sign(s) via mi_datagram
> interface.
>
>
>
> For example dlg_end_dlg can receive additional header, let say I want
> two headers, so I build:
>
> :dlg_end_dlg:\n
>
> "Header1: data1\r\nHeader2: data2\r\n\r\n"\n
>
> And this one works.
>
>
>
> Now I want the Header2 to be
>
> Header2: data2 "data3 data4"
>
>
>
> Straight-forward way:
>
> :dlg_end_dlg:\n
>
> "Header1: data1\r\nHeader2: data2 "data3 data4"\r\n\r\n"\n
>
> doesn't work.
>
>
>
> Escaping also doesn't work:
>
> :dlg_end_dlg:\n
>
> "Header1: data1\r\nHeader2: data2 \"data3 data4\"\r\n\r\n"\n
>
>
>
> I wonder how to pass something quoted via mi_datagram.
>
>
>
> --
>
> Best Regards,
>
> Alex Massover
>
>
>
>
>
> ******************************************************************************
>
> This footnote confirms that this email message has been scanned by
> Jajah Inc. Mail system for the presence of malicious code, vandals &
> computer viruses.
> ******************************************************************************
>
> 
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>




******************************************************************************

 This footnote confirms that this email message has been scanned by Jajah Inc. Mail system for the presence of malicious code, vandals & computer viruses.

******************************************************************************




******************************************************************************
 This footnote confirms that this email message has been scanned by Jajah Inc. Mail system for the presence of malicious code, vandals & computer viruses.
******************************************************************************

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: mi_datagram and passing quote sign

Bogdan-Andrei Iancu
Hi Alex,

This is an know issue, already reported by Ovidiu Sas - there is an open
bug report on this. I will take care of this.

Best regards,
Bogdan

Alex Massover wrote:

> Hi!
>
> While writing the reply and attaching the log file I found the problem, it was missing final \n after last argument. However if I don't escape quotes inside the mi command it works even without final \n, and because of that I missed the point from the beginning.
>
> Now everything works fine, thanks!
>
> I have another question, please. Because of mi_datagram module opens new socket for each replying instead of using the one it listens on, client that talk to mi_datagram interface can't be behind NAT. Why not to reply from the same socket the module listens on?
>
> --
> Best Regards,
> Alex Massover
>
> -----Original Message-----
> From: Bogdan-Andrei Iancu [mailto:[hidden email]]
> Sent: Monday, December 29, 2008 4:12 PM
> To: Alex Massover
> Cc: opensip
> Subject: Re: [OpenSIPS-Users] mi_datagram and passing quote sign
>
> Hi Alex,
>
> You can escape " char by using \"  . If it doesn't work, please post the
> entire Mi command you are sending as well as the opensips logs (use
> debug=6).
>
> Thanks and regards,
> Bogdan
>
> Alex Massover wrote:
>  
>> Hi!
>>
>>
>>
>> I'm trying to pass string that includes quote sign(s) via mi_datagram
>> interface.
>>
>>
>>
>> For example dlg_end_dlg can receive additional header, let say I want
>> two headers, so I build:
>>
>> :dlg_end_dlg:\n
>>
>> "Header1: data1\r\nHeader2: data2\r\n\r\n"\n
>>
>> And this one works.
>>
>>
>>
>> Now I want the Header2 to be
>>
>> Header2: data2 "data3 data4"
>>
>>
>>
>> Straight-forward way:
>>
>> :dlg_end_dlg:\n
>>
>> "Header1: data1\r\nHeader2: data2 "data3 data4"\r\n\r\n"\n
>>
>> doesn't work.
>>
>>
>>
>> Escaping also doesn't work:
>>
>> :dlg_end_dlg:\n
>>
>> "Header1: data1\r\nHeader2: data2 \"data3 data4\"\r\n\r\n"\n
>>
>>
>>
>> I wonder how to pass something quoted via mi_datagram.
>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Alex Massover
>>
>>
>>
>>
>>
>> ******************************************************************************
>>
>> This footnote confirms that this email message has been scanned by
>> Jajah Inc. Mail system for the presence of malicious code, vandals &
>> computer viruses.
>> ******************************************************************************
>>
>> 
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>    
>
>
>
>
> ******************************************************************************
>
>  This footnote confirms that this email message has been scanned by Jajah Inc. Mail system for the presence of malicious code, vandals & computer viruses.
>
> ******************************************************************************
>
>
>
>
> ******************************************************************************
>  This footnote confirms that this email message has been scanned by Jajah Inc. Mail system for the presence of malicious code, vandals & computer viruses.
> ******************************************************************************
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users