[OpenSIPS-Users] t_uac_dlg command through mi_datagram socket gives 400 bad headers

Husnain Taseer husnain.taseer at gmail.com
Mon Mar 6 03:17:47 EST 2017

Hi Folks!

I am trying to generate a MESSAGE packet using t_uac_dlg command from a
management script written in Python. I have tried different combination of
argument string but either getting parsing error or 400 bad headers error.
The string which I am sending to mi_datagram socket in my Python script is:

*message = ''':t_uac_dlg:\nMESSAGE\nsip:212897645 at
<nsip%3A212897645 at>\n.\n.\n"From: <sip:212897554 at
<sip%3A212897554 at>>\\r\\nTo: <sip:212897645 at
<sip%3A212897645 at>>\\r\\np-identifier:
Local_Socket_V1.0\\r\\nContent-Type: text/plain\\r\\n"\n"Hi This is a Test

When I print the above string it gives me the value given below:

sip:212897645 at
"From: <sip:212897554 at>\r\nTo:
<sip:212897645 at>\r\np-identifier:
Local_Socket_V1.0\r\nContent-Type: text/plain\r\n"
"Hi This is a test"

When I send this string to mi_datagram socket it gives me *400 Bad
headers *Please
guide where I am doing wrong.

*Husnain Taseer*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170306/7db197e5/attachment.html>

More information about the Users mailing list