[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 192.168.1.20
<nsip%3A212897645 at 192.168.1.20>\n.\n.\n"From: <sip:212897554 at 192.168.1.20
<sip%3A212897554 at 192.168.1.20>>\\r\\nTo: <sip:212897645 at 192.168.1.20
<sip%3A212897645 at 192.168.1.20>>\\r\\np-identifier:
Local_Socket_V1.0\\r\\nContent-Type: text/plain\\r\\n"\n"Hi This is a Test
Message"\n'''*
When I print the above string it gives me the value given below:
:t_uac_dlg:
MESSAGE
sip:212897645 at 192.168.1.20
.
.
"From: <sip:212897554 at 192.168.1.20>\r\nTo:
<sip:212897645 at 192.168.1.20>\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.
Regards,
*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