Author Topic: How to fetch RAW SIP or SIP body from multipart invite in external module ?  (Read 2527 times)

bfoot

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hi all

I have the following INVITE:

INVITE sip:192.168.3.179:5060;transport=udp SIP/2.0
Via:SIP/2.0/UDP 192.168.3.100;branch=z9hG4bKBroadWorks.-1ju3mmj-192.168.3.179V5060-0-103704257-743232825-1378891910528-
From:"yuri2012 yuri2012"<sip:4996666666@192.168.3.100;user=phone>;tag=743232825-1378891910528-
To:<sip:192.168.3.179:5060>
Call-ID:BW0531505281109131859818925@192.168.3.100
CSeq:103704257 INVITE
Contact:<sip:192.168.3.100:5060>;src
Privacy:none
Recv-Info:
Accept:application/media_control+xml,application/sdp,application/x-broadworks-call-center+xml
Allow:ACK,BYE,CANCEL,INFO,INVITE,OPTIONS,PRACK,REFER,NOTIFY
Supported:
Max-Forwards:10
Content-Type:multipart/mixed;boundary=UniqueBroadWorksBoundary
Content-Length:2310
MIME-Version:1.0


--UniqueBroadWorksBoundary
Content-Type:application/rs-metadata+xml
Content-Disposition:recording-session
Content-Length:1898

<?xml version="1.0" encoding="UTF-8"?><recording_metadata xmlns="urn:ietf:params:xml:ns:siprec"><dataMode>complete</dataMode><recording id="urn:uuid:223578ec-2d3d-487e-a870-7254c8a728eb"><requestor>SRC</requestor><type>selective</type></recording><group id="urn:uuid:2f934a8d-9406-4de1-bb06-d59dd229748b" recording="urn:uuid:223578ec-2d3d-487e-a870-7254c8a728eb"><initiator>sip:yuri2012</initiator></group><session id="urn:uuid:346bd9dd-3621-480a-9f66-1681120dacb2" group="urn:uuid:2f934a8d-9406-4de1-bb06-d59dd229748b"><start-time>2013-09-11T05:31:50-04:00</start-time></session><participant id="urn:uuid:ecc0135f-ec84-43a6-b682-81caf76064c2" session="urn:uuid:346bd9dd-3621-480a-9f66-1681120dacb2"><aor>sip:yuri2012</aor><send><id>urn:uuid:ee054b66-9ae3-49b0-90fc-3a9b48ce5513</id></send></participant><participant id="urn:uuid:57b1dae1-b8dc-4326-a263-dcafcb79fd03" session="urn:uuid:346bd9dd-3621-480a-9f66-1681120dacb2"><aor>sip:6767@192.168.3.100</aor><send><id>urn:uuid:ee054b66-9ae3-49b0-90fc-3a9b48ce5513</id></send></participant><stream id="urn:uuid:ee054b66-9ae3-49b0-90fc-3a9b48ce5513" session="urn:uuid:346bd9dd-3621-480a-9f66-1681120dacb2"><label>1</label><mode>mixed</mode></stream><extensiondata id="urn:uuid:188db9cd-71fe-4fe4-8aa6-c759f29d0432" parent="urn:uuid:346bd9dd-3621-480a-9f66-1681120dacb2"><broadWorksRecordingMetadata xmlns="http://schema.broadsoft.com/broadworksCallRecording"><extTrackingID>53:1</extTrackingID><serviceProviderID>tst03434</serviceProviderID><groupID>testgroup</groupID><userID>yuri2012@fcs.com</userID><callID>callhalf-2151:0</callID><callType><origCall><callingPartyNumber>sip:6666@192.168.3.100</callingPartyNumber><calledPartyNumber>sip:6767@192.168.3.100</calledPartyNumber><dialedDigits>sip:6767@192.168.3.100</dialedDigits></origCall></callType><recordingType>on</recordingType></broadWorksRecordingMetadata></extensiondata></recording_metadata>
--UniqueBroadWorksBoundary
Content-Type:application/sdp
Content-Length:164

v=0
o=BroadWorks 452 1 IN IP4 192.168.3.102
s=-
c=IN IP4 192.168.3.102
t=0 0
m=audio 10390 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:20
a=sendonly
a=label:1

--UniqueBroadWorksBoundary--

In call.execute I can found the parameters:

<ExtModReceiver:WARN> Error: 'Yate Object'
<ExtModReceiver:WARN> Error: '('
<ExtModReceiver:WARN> Error: '    [type] => incoming'
<ExtModReceiver:WARN> Error: '    [name] => call.execute'
<ExtModReceiver:WARN> Error: '    [retval] => '
<ExtModReceiver:WARN> Error: '    [origin] => 1378893637'
<ExtModReceiver:WARN> Error: '    [id] => 0x7fe197d2d8c0.607887666'
<ExtModReceiver:WARN> Error: '    [handled] => 1'
<ExtModReceiver:WARN> Error: '    [params] => Array'
<ExtModReceiver:WARN> Error: '        ('
<ExtModReceiver:WARN> Error: '            [id] => sip/1'
<ExtModReceiver:WARN> Error: '            [module] => sip'
<ExtModReceiver:WARN> Error: '            [status] => incoming'
<ExtModReceiver:WARN> Error: '            [address] => 192.168.3.100:5060'
<ExtModReceiver:WARN> Error: '            [billid] => 1378893632-1'
<ExtModReceiver:WARN> Error: '            [answered] => false'
<ExtModReceiver:WARN> Error: '            [direction] => incoming'
<ExtModReceiver:WARN> Error: '            [callid] => sip/BW0529235401109131777486166@192.168.3.100/1412211827-1378891763540-/'
<ExtModReceiver:WARN> Error: '            [caller] => 4996666666'
<ExtModReceiver:WARN> Error: '            [called] => 700'
<ExtModReceiver:WARN> Error: '            [callername] => yuri2012 yuri2012'
<ExtModReceiver:WARN> Error: '            [antiloop] => 9'
<ExtModReceiver:WARN> Error: '            [ip_host] => 192.168.3.100'
<ExtModReceiver:WARN> Error: '            [ip_port] => 5060'
<ExtModReceiver:WARN> Error: '            [ip_transport] => UDP'
<ExtModReceiver:WARN> Error: '            [sip_uri] => sip:192.168.3.179:5060;transport=udp'
<ExtModReceiver:WARN> Error: '            [sip_from] => sip:4996666666@192.168.3.100;user=phone'
<ExtModReceiver:WARN> Error: '            [sip_to] => <sip:192.168.3.179:5060>'
<ExtModReceiver:WARN> Error: '            [sip_callid] => BW0529235401109131777486166@192.168.3.100'
<ExtModReceiver:WARN> Error: '            [device] => '
<ExtModReceiver:WARN> Error: '            [sip_contact] => <sip:192.168.3.100:5060>;src'
<ExtModReceiver:WARN> Error: '            [sip_privacy] => none'
<ExtModReceiver:WARN> Error: '            [sip_recv-info] => '
<ExtModReceiver:WARN> Error: '            [sip_accept] => application/media_control+xml,application/sdp,application/x-broadworks-call-center+xml'
<ExtModReceiver:WARN> Error: '            [sip_allow] => ACK,BYE,CANCEL,INFO,INVITE,OPTIONS,PRACK,REFER,NOTIFY'
<ExtModReceiver:WARN> Error: '            [sip_supported] => '
<ExtModReceiver:WARN> Error: '            [sip_content-type] => multipart/mixed;boundary=UniqueBroadWorksBoundary'
<ExtModReceiver:WARN> Error: '            [sip_mime-version] => 1.0'
<ExtModReceiver:WARN> Error: '            [rtp_addr] => 192.168.3.102'
<ExtModReceiver:WARN> Error: '            [media] => yes'
<ExtModReceiver:WARN> Error: '            [formats] => alaw'
<ExtModReceiver:WARN> Error: '            [transport] => RTP/AVP'
<ExtModReceiver:WARN> Error: '            [rtp_rfc2833] => false'
<ExtModReceiver:WARN> Error: '            [rtp_port] => 10380'
<ExtModReceiver:WARN> Error: '            [sdp_sendonly] => '
<ExtModReceiver:WARN> Error: '            [sdp_label] => 1'
<ExtModReceiver:WARN> Error: '            [rtp_forward] => possible'
<ExtModReceiver:WARN> Error: '            [handlers] => javascript:15,regexroute:100,javascript:15,cdrbuild:50,fileinfo:90,subscription:100,regexroute:100,javascript:15,gvoice:20,queues:45,yrtp:50,cdrbuild:50,lateroute:75,dbwave:90,dumb:90,wave:90,tone:90,analyzer:90,sip:90,iax:90,conf:90,jingle:90,filetransfer:90,analog:90,sig:90,mgcpgw:90,callgen:100,moh:100,pbx:100,extmodule:100'
<ExtModReceiver:WARN> Error: '            [context] => default'
<ExtModReceiver:WARN> Error: '            [osip_X-Test] => aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
<ExtModReceiver:WARN> Error: '            [callto] => external/nodata/playrec.php'
<ExtModReceiver:WARN> Error: '            [targetid] => playrec/34084903552303f44924815.09074560'
<ExtModReceiver:WARN> Error: '        )'
<ExtModReceiver:WARN> Error: ')'


How to get custom muiltiparts?