SIP Methods

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Enable MESSAGE Method)
(/* SIP Methods in Yate /* duplicated information ("not in ysipchan") moved to "generically ..."-section as an intro. Wording.)
 
(79 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page describes how Yate handles the SIP requests depending on the request method.
+
Yate handles [[wikipedia:List of SIP request methods|SIP requests]] differently, depending on the request method.
 +
 
 +
There are SIP requests methods that are handled internally in [[ysipchan]] module or generically in other Yate's [[modules]] or in [[External Module|external scripts]].
 +
 
 +
You can also generate SIP requests from Yate (from other modules/custom scripts) and they will be sent to a specific party.
  
 
== What is a SIP Request Method? ==
 
== What is a SIP Request Method? ==
Line 12: Line 16:
 
* PRACK - Similar to ACK, but a provisional confirmation.
 
* PRACK - Similar to ACK, but a provisional confirmation.
 
* CANCEL - Cancel any pending requests.  
 
* CANCEL - Cancel any pending requests.  
* REGISTER - Registers the client with the server according to the address in the To he
+
* REGISTER - Registers the client with the server according to the address in the To header field.
 
* INFO - Sends information in the middle of a session that doesn't modify the session's state.
 
* INFO - Sends information in the middle of a session that doesn't modify the session's state.
 
* SUBSCRIBE -Subscribes the device for an event notification.  
 
* SUBSCRIBE -Subscribes the device for an event notification.  
Line 21: Line 25:
 
* UPDATE - Modifies a session's state without altering the dialog state.
 
* UPDATE - Modifies a session's state without altering the dialog state.
  
== SIP Methods in Yate ==
+
== SIP methods in Yate ==
  
 
In Yate some SIP requests are handled internally while others are handled generically.
 
In Yate some SIP requests are handled internally while others are handled generically.
  
When a SIP request comes in Yate, depending on the request method it will be either handled in ysipchan module(internally handled), or an internal yate message named ''sip.methodname'' will be sent(generically handled).  
+
When a SIP request arrives in Yate it will – depending on the request method – either be handled in the ysipchan module (internally handled), or an internal yate message named ''sip.methodname'' will be sent (generically handled). The handling of generically handled messages is done in other modules/external scripts.
  
Generically handled methods are not handled in ysipchan module. A yate message is sent for them and the handling is done in other modules/external scripts. Some methods have yate modules that handle them while others don't, so you need to define the handling of the message in a custom way when enabling them.
+
=== Internally handled methods ===
 
+
=== Internally handled Methods ===
+
  
 
Internally handled request methods are requests handled directly by ysipchan module. Yate messages like ''sip.methodname'' won't be generated for them.
 
Internally handled request methods are requests handled directly by ysipchan module. Yate messages like ''sip.methodname'' won't be generated for them.
Line 41: Line 43:
 
** BYE
 
** BYE
 
* methods that are handled in the default configuration and that can be enabled/disabled from [general] section
 
* methods that are handled in the default configuration and that can be enabled/disabled from [general] section
** INFO - controlled by ''info'' setting. If request is received during a dialog it's handled internally. Outside a dialog it's handled generically.
+
** INFO - controlled by ''info'' setting. If request is received during a dialog initiated by an INVITE and it's used for application/dtmf-relay or application/dtmf then it's handled internally. Outside a dialog it's handled generically.
 
** OPTIONS - controlled by ''options'' setting.
 
** OPTIONS - controlled by ''options'' setting.
 
* methods that are handled in the default configuration when yate is started in server mode, and are disabled when yate is started in client mode. They can be enabled/disabled from [general] section
 
* methods that are handled in the default configuration when yate is started in server mode, and are disabled when yate is started in client mode. They can be enabled/disabled from [general] section
Line 49: Line 51:
 
** PRACK - controlled by ''prack'' setting
 
** PRACK - controlled by ''prack'' setting
  
=== Generically handled Methods ===
+
=== Generically handled methods ===
 +
Generically handled SIP methods are methods that are not handled in the ysipchan module.
  
* INFO - this SIP method if is dialogless is handled generically (by using parameter lazy100 in [[SIP Configuration File|ysipchan.conf]]).
+
In order to handle other methods besides those listed above you must enable them in the [methods] section. Some have separate yate modules that handle them while others don't, so you need to define the handling of the message in a custom way when enabling them.
+
  
===Enabling additional Methods===
+
When Yate receives a request for one of the enabled methods, it will generate a [[#SIP_generic_message|generic SIP message]]. This message will be handled from a module or from an external script.
  
Use section [methods] from [[SIP Configuration File|ysipchan.conf]] to allow/restrict the processing of specific SIP methods. For enabled methods yate will generate internal messages with name [[SIP_Generic_Message|sip.<methodname>]] that can be handled from other modules.
+
=== Requests genenerated from Yate ===
  
====Examples====
+
In some cases you might need to initiate SIP requests from a module in Yate and send them to a specific party.
  
===== Enable MESSAGE Method =====
+
In this case you should send [[Xsip.generate|xsip.generate]] message from the module/script where the logic is implemented. The ysipchan module handles this message and sends the SIP request to the specified party.
  
This example allows chat and short files transfer between Twinkle clients using MESSAGE Request Method.
+
This happens when Yate sends NOTIFY requests to the users that subscribed to a certain event. Or you can follow the setup for [[How_to_setup_chat_and_short_file_transfer_using_MESSAGE_Request_Method|sending chat messages between SIP users]] that uses both SIP generic messages and [[Xsip.generate|xsip.generate]].
  
A [http://tools.ietf.org/html/rfc3428 MESSAGE request method] transports instant messages using SIP.
+
== SIP generic message ==
  
regexroute.conf:
+
SIP generic messages are messages generated by the [[SIP Configuration File|ysipchan]] module on receiving the specified requests in [methods] section.
  
[extra]
+
=== Syntax ===
sip.message=120
+
msg.route=25
+
msg.execute=90
+
+
[sip.message]
+
${xsip_type}^$=415
+
.*=echo Got SIP MESSAGE type '${xsip_type}' ${xsip_body_encoding} from '${username}': ${xsip_body}
+
.*=enqueue msg.execute;caller=${caller};called=${called};\
+
  domain=${domain};callto=lateroute/${called};\
+
  body_encoding=${xsip_body_encoding};type=${xsip_type};text=${xsip_body}
+
.*=200
+
 
+
[msg.route]
+
.*=rename call.route;message=msg.route
+
+
[msg.execute]
+
${callto}^sip/\(sip:.*\)$=rename xsip.generate;\
+
method=MESSAGE;uri=\1;sip_From=<sip:${caller}@${domain$nosuch.dom}>;\
+
xsip_type=${type$text/plain};xsip_body_encoding=${body_encoding};\
+
xsip_body=${text}
+
  
 +
The syntax is: ''sip.methodname'', where methodname is the name of the received SIP request (e.g. sip.subscribe).
  
In ysipchan.conf:
+
'''Parameters'''
  
[general]
+
;xsip_dlgtag
maxpkt=4096
+
:The dialog tag of the received request.
generate=yes
+
;sip_uri
+
:The request URI of the received SIP method.
[methods]
+
;xsip_type
message=yes
+
:The content type header.
+
;sip_headername
To configure twinkle clients, register users in regfile.conf:
+
:Where headername is the name of the header received with the request. This parameter is repeated for each header in the request (e.g. sip_from, sip_to, etc).
  
[123]
+
'''Return'''
password=mypass123
+
+
[234]
+
password=mypass234
+
  
If sniffer is enabled in telnet
+
A module processing this message should set the 'code' parameter of the message to a SIP response code.
  
* sip.message
+
The processing module may also set message's parameters named osip_headername to be returned in the SIP response (e.g. osip_Expires).
  
Sniffed 'sip.message' time=1352472395.780609                                                                                                                       
+
=== Example ===
  thread=0x890d348 'YSIP EndPoint'                                                                                                                                 
+
  data=(nil)                                                                                                                                                       
+
  retval='(null)'                                                                                                                                                   
+
  param['username'] = '123'                                                                                                                                         
+
  param['realm'] = 'Yate'                                                                                                                                           
+
  param['ip_transport'] = 'UDP'                                                                                                                                     
+
  param['newcall'] = 'false'                                                                                                                                       
+
  param['domain'] = '192.168.168.156'                                                                                                                               
+
  param['device'] = 'Twinkle/1.4.1'                                                                                                                                 
+
  param['connection_id'] = 'general'                                                                                                                               
+
  param['connection_reliable'] = 'false'                                                                                                                           
+
  param['username'] = '123'                                                                                                                                         
+
  param['called'] = '234'                                                                                                                                           
+
  param['caller'] = '123'                                                                                                                                           
+
  param['callername'] = 'DanielaGrigore'                                                                                                                           
+
  param['antiloop'] = '19'                                                                                                                                         
+
  param['address'] = '192.168.168.156:5060'                                                                                                                         
+
  param['ip_host'] = '192.168.168.156'                                                                                                                             
+
  param['ip_port'] = '5060'                                                                                                                                         
+
  param['ip_transport'] = 'UDP'                                                                                                                                     
+
  param['sip_uri'] = 'sip:234@192.168.168.156'                                                                                                                     
+
  param['sip_callid'] = 'xgjfitpjqqffbmz@localhost.localdomain'                                                                                                     
+
  param['xsip_dlgtag'] = '2078093122'                                                                                                                               
+
  param['sip_to'] = '<sip:234@192.168.168.156>'                                                                                                                     
+
  param['sip_from'] = '"DanielaGrigore" <sip:123@192.168.168.156>;tag=hhzbn'                                                                                       
+
  param['sip_content-type'] = 'text/plain;charset=utf-8'                                                                                                           
+
  param['sip_user-agent'] = 'Twinkle/1.4.1'                                                                                                                         
+
  param['xsip_type'] = 'text/plain'                                                                                                                                 
+
  param['xsip_body'] = 'hello Monica'                                                                                                                               
+
Got SIP MESSAGE type 'text/plain'  from '123': hello Monica                                                                                                         
+
<RegexRoute:ALL> Enqueueing new message 'msg.execute' by rule #3 '.*' in context 'sip.message'                                                                     
+
Returned true 'sip.message' delay=0.001392                                                                                                                         
+
  thread=0x890d348 'YSIP EndPoint'                                                                                                                                 
+
  data=(nil)                                                                                                                                                       
+
  retval='200'                                                                                                                                                     
+
  param['username'] = '123'                                                                                                                                         
+
  param['realm'] = 'Yate'                                                                                                                                           
+
  param['ip_transport'] = 'UDP'                                                                                                                                     
+
  param['newcall'] = 'false'                                                                                                                                       
+
  param['domain'] = '192.168.168.156'                                                                                                                               
+
  param['device'] = 'Twinkle/1.4.1'                                                                                                                                 
+
  param['connection_id'] = 'general'                                                                                                                               
+
  param['connection_reliable'] = 'false'                                                                                                                           
+
  param['username'] = '123'                                                                                                                                         
+
  param['called'] = '234'                                                                                                                                           
+
  param['caller'] = '123'                                                                                                                                           
+
  param['callername'] = 'DanielaGrigore'                                                                                                                           
+
  param['antiloop'] = '19'                                                                                                                                         
+
  param['address'] = '192.168.168.156:5060'                                                                                                                         
+
  param['ip_host'] = '192.168.168.156'                                                                                                                             
+
  param['ip_port'] = '5060'                                                                                                                                         
+
  param['ip_transport'] = 'UDP'                                                                                                                                     
+
  param['sip_uri'] = 'sip:234@192.168.168.156'                                                                                                                     
+
  param['sip_callid'] = 'xgjfitpjqqffbmz@localhost.localdomain'                                                                                                     
+
  param['xsip_dlgtag'] = '2078093122'                                                                                                                               
+
  param['sip_to'] = '<sip:234@192.168.168.156>'                                                                                                                     
+
  param['sip_from'] = '"DanielaGrigore" <sip:123@192.168.168.156>;tag=hhzbn'                                                                                       
+
  param['sip_content-type'] = 'text/plain;charset=utf-8'                                                                                                           
+
  param['sip_user-agent'] = 'Twinkle/1.4.1'                                                                                                                         
+
  param['xsip_type'] = 'text/plain'                                                                                                                                 
+
  param['xsip_body'] = 'hello Monica'                                                                                                                               
+
  param['handlers'] = 'regexroute:120'
+
  
'''msg.execute'''
+
Yate receives a SIP request for MESSAGE method as below:
Sniffed 'msg.execute' time=1352472395.781897                                                                                                                       
+
  thread=0x89228a8 'Engine Worker'                                                                                                                                 
+
  data=(nil)                                                                                                                                                       
+
  retval='(null)'                                                                                                                                                   
+
  param['caller'] = '123'                                                                                                                                           
+
  param['called'] = '234'                                                                                                                                           
+
  param['domain'] = '192.168.168.156'                                                                                                                               
+
  param['callto'] = 'lateroute/234'                                                                                                                                 
+
  param['body_encoding'] = ''                                                                                                                                       
+
  param['type'] = 'text/plain'                                                                                                                                     
+
  param['text'] = 'hello Monica' 
+
+
'''msg.route'''                                                                                                                             
+
Sniffed 'msg.route' time=1352472395.781897                                                                                                                         
+
  thread=0x89228a8 'Engine Worker'                                                                                                                                 
+
  data=(nil)                                                                                                                                                       
+
  retval='(null)'                                                                                                                                                   
+
  param['caller'] = '123'                                                                                                                                           
+
  param['called'] = '234'                                                                                                                                           
+
  param['domain'] = '192.168.168.156'                                                                                                                               
+
  param['body_encoding'] = ''                                                                                                                                       
+
  param['type'] = 'text/plain'                                                                                                                                     
+
  param['text'] = 'hello Monica'                                                                                                                                   
+
  param['handlers'] = 'lateroute:75'                                                                                                                               
+
<RegexRoute:ALL> Renaming message 'msg.route' to 'call.route' by rule #1 '.*' in context 'msg.route'                                                               
+
<INFO> Could not route call to '234' in context 'default', wasted 178 usec                                                                                         
+
<regfile:INFO> Routed '234' via 'sip/sip:234@192.168.168.11(null)'                                                                                                 
+
Returned true 'call.route' delay=0.003463                                                                                                                           
+
  thread=0x89228a8 'Engine Worker'                                                                                                                                 
+
  data=(nil)                                                                                                                                                       
+
  retval='sip/sip:234@192.168.168.11'                                                                                                                               
+
  param['caller'] = '123'                                                                                                                                           
+
  param['called'] = '234'                                                                                                                                           
+
  param['domain'] = '192.168.168.156'                                                                                                                               
+
  param['body_encoding'] = ''                                                                                                                                       
+
  param['type'] = 'text/plain'                                                                                                                                     
+
  param['text'] = 'hello Monica'                                                                                                                                   
+
  param['handlers'] = 'lateroute:75,regexroute:25,cdrbuild:50,iax:100,h323:100,jingle:100,regexroute:100,sip:100,regfile:100'                                       
+
  param['message'] = 'msg.route'                                                                                                                                   
+
  param['oconnection_id'] = 'general'                                                                                                                               
+
  param['driver'] = 'sip'                                                                                                                                           
+
<INFO> Late routing call to 'lateroute/234' via 'sip/sip:234@192.168.168.11'                                                                                       
+
<RegexRoute:ALL> Renaming message 'msg.execute' to 'xsip.generate' by rule #1 '${callto}^sip/\(sip:.*\)$' in context 'msg.execute'                                 
+
<sip:INFO> SipHandler::received() [0x890ec68]                                                                                                                       
+
Returned true 'xsip.generate' delay=0.003973                                                                                                                       
+
  thread=0x89228a8 'Engine Worker'                                                                                                                                 
+
  data=(nil)                                                                                                                                                       
+
  retval='(null)'                                                                                                                                                   
+
  param['caller'] = '123'                                                                                                                                           
+
  param['called'] = '234'                                                                                                                                           
+
  param['domain'] = '192.168.168.156'                                                                                                                               
+
  param['body_encoding'] = ''                                                                                                                                       
+
  param['type'] = 'text/plain'                                                                                                                                     
+
  param['text'] = 'hello Monica'                                                                                                                                   
+
  param['handlers'] = 'lateroute:75,regexroute:25,cdrbuild:50,iax:100,h323:100,jingle:100,regexroute:100,sip:100,regfile:100,regexroute:90,sip:110'                 
+
  param['message'] = 'msg.route'                                                                                                                                   
+
  param['oconnection_id'] = 'general'                                                                                                                               
+
  param['driver'] = 'sip'                                                                                                                                           
+
  param['callto'] = 'sip/sip:234@192.168.168.11'                                                                                                                   
+
  param['method'] = 'MESSAGE'                                                                                                                                       
+
  param['uri'] = 'sip:234@192.168.168.11'                                                                                                                           
+
  param['sip_From'] = '<sip:123@192.168.168.156>'                                                                                                                   
+
  param['xsip_type'] = 'text/plain'                                                                                                                                 
+
  param['xsip_body_encoding'] = ''                                                                                                                                 
+
  param['xsip_body'] = 'hello Monica'
+
  
===== Enable SUBSCRIBE Method=====
+
<sip:INFO> 'udp:0.0.0.0:5062' received 381 bytes SIP message from 192.168.168.156:5060 [0x890f858]
 +
------
 +
MESSAGE sip:234@192.168.168.156 SIP/2.0
 +
Via: SIP/2.0/UDP 192.168.168.156;rport;branch=z9hG4bKmibzipmn
 +
Max-Forwards: 70
 +
To: <sip:234@192.168.168.156>
 +
From: "DanielaGrigore" <sip:123@192.168.168.156>;tag=hhzbn
 +
Call-ID: xgjfitpjqqffbmz@localhost.localdomain
 +
CSeq: 427 MESSAGE
 +
Content-Type: text/plain;charset=utf-8
 +
User-Agent: Twinkle/1.4.1
 +
Content-Length: 12
 +
hello Monica
 +
------
  
ysipchan.conf
+
And emits a '''sip.message''': 
  
  [methods]
+
  Sniffed 'sip.message' time=1352472395.780609                                                                     
subscribe=yes
+
  thread=0x890d348 'YSIP EndPoint'                                                                   
 +
  data=(nil)                                                         
 +
  retval='(null)'
 +
  param['username'] = '123'
 +
  param['realm'] = 'Yate'
 +
  param['ip_transport'] = 'UDP'
 +
  param['newcall'] = 'false'
 +
  param['domain'] = '192.168.168.156'
 +
  param['device'] = 'Twinkle/1.4.1'
 +
  param['connection_id'] = 'general'
 +
  param['connection_reliable'] = 'false'
 +
  param['username'] = '123'
 +
  param['called'] = '234'
 +
  param['caller'] = '123'
 +
  param['callername'] = 'DanielaGrigore'
 +
  param['antiloop'] = '19'
 +
  param['address'] = '192.168.168.156:5060'
 +
  param['ip_host'] = '192.168.168.156'
 +
  param['ip_port'] = '5060'
 +
  param['ip_transport'] = 'UDP'
 +
  param['sip_uri'] = 'sip:234@192.168.168.156'
 +
  param['sip_callid'] = 'xgjfitpjqqffbmz@localhost.localdomain'
 +
  param['xsip_dlgtag'] = '2078093122'
 +
  param['sip_to'] = '<sip:234@192.168.168.156>'
 +
  param['sip_from'] = '"DanielaGrigore" <sip:123@192.168.168.156>;tag=hhzbn'
 +
  param['sip_content-type'] = 'text/plain;charset=utf-8'
 +
  param['sip_user-agent'] = 'Twinkle/1.4.1'
 +
  param['xsip_type'] = 'text/plain'
 +
  param['xsip_body'] = 'hello Monica'
  
You then configure the allowed events for subscribing in [[SIP Features Module|sipfeatures.conf]] and define the logic for SUBSCRIBE/NOTIFY in [[subscriptions|subscription.conf]].
+
Follow the example below for a full configuration on how the enable and handle the MESSAGE method.
  
 +
[[How to setup chat and short file transfer using MESSAGE Request Method]].
  
<!--* [[Sip Generic|sip.<methodname>]] - where methodname is the name of the received SIP request
 
* [[xsip.generate]] - is a message sent by a module (ysipchan module) requesting the transmission of a SIP request-->
 
  
 
'''See also'''
 
'''See also'''
Line 261: Line 153:
 
* [[subscriptions|Subscriptions module]]
 
* [[subscriptions|Subscriptions module]]
 
* [[SIP Features Module]]
 
* [[SIP Features Module]]
 +
* [[Telephony]]
 +
 +
[[Category:SIP]] [[Category:SIP Methods]] [[Category:SIP generic message]]

Latest revision as of 20:29, 13 March 2014

Yate handles SIP requests differently, depending on the request method.

There are SIP requests methods that are handled internally in ysipchan module or generically in other Yate's modules or in external scripts.

You can also generate SIP requests from Yate (from other modules/custom scripts) and they will be sent to a specific party.

Contents

[edit] What is a SIP Request Method?

A SIP request method defines the nature and the purpose of the SIP request.

This the list of SIP request methods:

  • INVITE - Requests a session.
  • ACK - Final response to the INVITE
  • OPTIONS - Ask for server capabilities
  • BYE - Terminates a session
  • PRACK - Similar to ACK, but a provisional confirmation.
  • CANCEL - Cancel any pending requests.
  • REGISTER - Registers the client with the server according to the address in the To header field.
  • INFO - Sends information in the middle of a session that doesn't modify the session's state.
  • SUBSCRIBE -Subscribes the device for an event notification.
  • NOTIFY - Notifies all subscribers of an event.
  • PUBLISH - Publishes an event to a server.
  • REFER - Asks the client to issue a SIP request, typically a call transfer.
  • MESSAGE - Sends an instant message using SIP.
  • UPDATE - Modifies a session's state without altering the dialog state.

[edit] SIP methods in Yate

In Yate some SIP requests are handled internally while others are handled generically.

When a SIP request arrives in Yate it will – depending on the request method – either be handled in the ysipchan module (internally handled), or an internal yate message named sip.methodname will be sent (generically handled). The handling of generically handled messages is done in other modules/external scripts.

[edit] Internally handled methods

Internally handled request methods are requests handled directly by ysipchan module. Yate messages like sip.methodname won't be generated for them.

The methods are handled internally by Yate:

  • methods that are always handled when ysipchan module is enabled
    • INVITE
    • CANCEL
    • ACK
    • BYE
  • methods that are handled in the default configuration and that can be enabled/disabled from [general] section
    • INFO - controlled by info setting. If request is received during a dialog initiated by an INVITE and it's used for application/dtmf-relay or application/dtmf then it's handled internally. Outside a dialog it's handled generically.
    • OPTIONS - controlled by options setting.
  • methods that are handled in the default configuration when yate is started in server mode, and are disabled when yate is started in client mode. They can be enabled/disabled from [general] section
    • REFER - controlled by transfer setting
    • REGISTER - controlled by register setting. If register=enabled then [registrar] section defines how Yate will work as a SIP REGISTRAR. Before starting yate as SIP registrar set users in regfile.conf or in register.conf.
  • methods that are disabled in the default configuration but can be enabled/disabled from [general] section
    • PRACK - controlled by prack setting

[edit] Generically handled methods

Generically handled SIP methods are methods that are not handled in the ysipchan module.

In order to handle other methods besides those listed above you must enable them in the [methods] section. Some have separate yate modules that handle them while others don't, so you need to define the handling of the message in a custom way when enabling them.

When Yate receives a request for one of the enabled methods, it will generate a generic SIP message. This message will be handled from a module or from an external script.

[edit] Requests genenerated from Yate

In some cases you might need to initiate SIP requests from a module in Yate and send them to a specific party.

In this case you should send xsip.generate message from the module/script where the logic is implemented. The ysipchan module handles this message and sends the SIP request to the specified party.

This happens when Yate sends NOTIFY requests to the users that subscribed to a certain event. Or you can follow the setup for sending chat messages between SIP users that uses both SIP generic messages and xsip.generate.

[edit] SIP generic message

SIP generic messages are messages generated by the ysipchan module on receiving the specified requests in [methods] section.

[edit] Syntax

The syntax is: sip.methodname, where methodname is the name of the received SIP request (e.g. sip.subscribe).

Parameters

xsip_dlgtag
The dialog tag of the received request.
sip_uri
The request URI of the received SIP method.
xsip_type
The content type header.
sip_headername
Where headername is the name of the header received with the request. This parameter is repeated for each header in the request (e.g. sip_from, sip_to, etc).

Return

A module processing this message should set the 'code' parameter of the message to a SIP response code.

The processing module may also set message's parameters named osip_headername to be returned in the SIP response (e.g. osip_Expires).

[edit] Example

Yate receives a SIP request for MESSAGE method as below:

<sip:INFO> 'udp:0.0.0.0:5062' received 381 bytes SIP message from 192.168.168.156:5060 [0x890f858]
------
MESSAGE sip:234@192.168.168.156 SIP/2.0
Via: SIP/2.0/UDP 192.168.168.156;rport;branch=z9hG4bKmibzipmn
Max-Forwards: 70
To: <sip:234@192.168.168.156>
From: "DanielaGrigore" <sip:123@192.168.168.156>;tag=hhzbn
Call-ID: xgjfitpjqqffbmz@localhost.localdomain
CSeq: 427 MESSAGE
Content-Type: text/plain;charset=utf-8
User-Agent: Twinkle/1.4.1
Content-Length: 12
hello Monica
------

And emits a sip.message:

Sniffed 'sip.message' time=1352472395.780609                                                                       
  thread=0x890d348 'YSIP EndPoint'                                                                     
  data=(nil)                                                           
  retval='(null)'
  param['username'] = '123'
  param['realm'] = 'Yate'
  param['ip_transport'] = 'UDP'
  param['newcall'] = 'false'
  param['domain'] = '192.168.168.156'
  param['device'] = 'Twinkle/1.4.1'
  param['connection_id'] = 'general'
  param['connection_reliable'] = 'false'
  param['username'] = '123'
  param['called'] = '234' 
  param['caller'] = '123'
  param['callername'] = 'DanielaGrigore' 
  param['antiloop'] = '19'
  param['address'] = '192.168.168.156:5060'
  param['ip_host'] = '192.168.168.156'
  param['ip_port'] = '5060' 
  param['ip_transport'] = 'UDP'
  param['sip_uri'] = 'sip:234@192.168.168.156'
  param['sip_callid'] = 'xgjfitpjqqffbmz@localhost.localdomain'
  param['xsip_dlgtag'] = '2078093122' 
  param['sip_to'] = '<sip:234@192.168.168.156>'
  param['sip_from'] = '"DanielaGrigore" <sip:123@192.168.168.156>;tag=hhzbn'
  param['sip_content-type'] = 'text/plain;charset=utf-8'
  param['sip_user-agent'] = 'Twinkle/1.4.1'
  param['xsip_type'] = 'text/plain' 
  param['xsip_body'] = 'hello Monica'

Follow the example below for a full configuration on how the enable and handle the MESSAGE method.

How to setup chat and short file transfer using MESSAGE Request Method.


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers