[Freeswitch-users] respond to received SIP INFOs with a customized 200-OK
Michael Jerris
mike at jerris.com
Fri Aug 24 01:01:27 UTC 2018
I dont think we have any way to add a body to a response to info currently exposed, it would take some code to expose such a thing.
> On Aug 23, 2018, at 8:00 PM, Elliot <304060611 at qq.com> wrote:
>
> We're looking for a way to modify content-body of 200 OK message(CSeq INFO),
> insert XML content into its body.
>
> Purpose:
> FreeSWITCH to handle INFO interactions based on RFC5707: Media Server Markup
> Language (MSML)
> https://tools.ietf.org/html/rfc5707
>> INFO message sent by UAC carries XML content.
>> UAS(FreeSWITCH) tries to parse the XML content on INFO message.
> 200 OK message should contain XML body in order to notify UAC with the
> structured "response codes" and "failed reason descriptions" by the INFO
> message.
>
> Current behavior:
> FreeSWITCH reply back to all INFO messages with 200 OK automatically,
> without carrying any content body on it(content-length=0)
>
> nua.c:879 nua_respond() nua: nua_respond: entering
> nua_stack.c:529 nua_signal() nua(0x7fcf0c009d70): sent signal r_respond
> nua.c:366 nua_handle_magic() nua: nua_handle_magic: entering
> nua_stack.c:573 nua_stack_signal() nua(0x7fcf0c009d70): recv signal
> r_respond 200 OK
> nua_params.c:485 nua_stack_set_params() nua: nua_stack_set_params: entering
> soa.c:403 soa_set_params() soa_set_params(static::0x7fcf0c00a600, ...)
> called
> tport.c:3257 tport_tsend() tport_tsend(0x7fcf0c004700) tpn =
> UDP/x.x.x.x:5060
> tport.c:4046 tport_resolve() tport_resolve addrinfo = x.x.x.x:5060
> tport.c:4680 tport_by_addrinfo() tport_by_addrinfo(0x7fcf0c004700): not
> found by name UDP/x.x.x.x:5060
> tport.c:3594 tport_vsend() tport_vsend(0x7fcf0c004700): 544 bytes of 544 to
> udp/x.x.x.x:5060
> tport.c:3492 tport_send_msg() tport_vsend returned 544
> nta.c:6791 incoming_reply() nta: sent 200 OK for INFO (2)
> 06:12:20.678673 IP (tos 0x0, ttl 64, id 22618, offset 0, flags [none], proto
> UDP (17), length 572)
> 192.168.89.162.sip > 192.168.89.45.sip: SIP, length: 544
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP
> 192.168.89.45:5060;branch=z9hG4bK-d8754z-8b0c4e23b5df6b68-1---d8754z-;rport=5060
> From: <sip:192.168.89.45:5060>;tag=098fbe06e806d500
> To: <sip:192.168.89.162:5060>;tag=tgX42HcKaeSma
> Call-ID:
> ZTM5MzMwYTI3NzA1ZDkxOGQ2MGZlYjcyYzNlZGUzMjY.e806d500 at 165.254.89.45
> CSeq: 2 INFO
> User-Agent: FreeSWITCH
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
> REGISTER, REFER, NOTIFY
> Supported: timer, path, replaces
> Content-Length: 0
>
>
> Expected behavior:
> when receiving INFO, be able to customize its content body on 200-OK
> response message.
> either by setting channel variables or optionally treat this 200OK as
> FreeSWITCH event
>
> A sample 200 OK message:
> SIP/2.0 200 OK
> Call‐ID: 36C7E305 at 10.10.0.16:15062
> CSeq: 324630703 INFO
> From: <sip:user at 10.10.0.16:15062>
> ;tag=10.10.0.1615062+1+1090000+fa0329b5
> To: <sip:msml at 10.14.9.13:5060>;tag=10.14.9.135060+1+1060000+81d0b080
> Via: SIP/2.0/UDP 10.10.0.16:15062
> ;branch=z9hG4bK+fdebd5691fe0202fc7d685d1e1138955+10.10.0.1615062+1
> Server: DC‐SIP/2.0
> Supported: precondition
> Supported: timer
> Supported: 100rel
> Accept: application/sdp, text/*, application/msml+xml, application/moml+xml
> Content‐Length: 220
> Content‐Type: application/msml+xml
> Contact: <sip:msml at 10.14.9.13:5060>
> <?xml version="1.0" encoding="US‐ASCII"?>
> <msml version="1.1">
> <result response="200">
> <auditresult targetid="conf:conf04010105a">
> <confconfig deletewhen="nocontrol" term="true"/>
> </auditresult>
> </result>
> </msml>
>
More information about the FreeSWITCH-users
mailing list