Picture messages

Hi,

I’m currently trying to setup messages that can send images. The problem I have is that Asterisk is not accepting the media type when I send the message. The log on the client contains the following error message:

SIP/2.0 415 Unsupported Media Type

The media types that I get these errors with are:
application/vnd.gsma.rcs-ft-http+xml
application/im-iscomposing+xml

I have entered these media/mime types using ‘notifymimetype’ in Freepbx under ‘Settings -> Asterisk SIP Settings -> Chan SIP Settings -> Other SIP Settings’

notifymimetype = application/vnd.gsma.rcs-ft-http+xml,application/im-iscomposing+xml

…but this has no effect after reboot. I still get the error message.

Has anyone managed to get the right config into Freepbx to get picture messaging working? I am using Linphone as the client.

I really appreciate any help or pointers with this. Thanks.

As far as I know asterisk only supports png and jpg as native image types.

rasterisk -x ‘core show codecs’

As you see it generally only supports audio and a little bit of other possible SIP sessions, to pass-through other sip/sdp content maybe freeswitch or kamailio?

Thanks very much for the advice. I haven’t got any further with it any many others I have gathered from internet posts have not had much success either. I’ll post the log anyway in case someone at some point has a solution to this.

2016-03-18 01:45:22:041 MESSAGE Channel has local address 192.168.1.125:52348
2016-03-18 01:45:22:041 MESSAGE channel 0xdd213000: state READY
2016-03-18 01:45:22:041 MESSAGE message [0xdea06b00] has body of size [232275] but no Content-Length, adding it.
2016-03-18 01:45:22:041 MESSAGE channel [0xdd213000]: message sent to [TLS://my-domain.co.uk:443], size: [175] bytes
POST /mms.php HTTP/1.1
Host: my-domain.co.uk
Content-Type: multipart/form-data;boundary=---------------------------14737809831466499882746641449
Content-Length: 232275

2016-03-18 01:45:22:046 MESSAGE channel [0xdd213000]: found binary data in buffer, will stop logging it now.
2016-03-18 01:45:22:046 MESSAGE channel [0xdd213000]: message sent to [TLS://my-domain.co.uk:443], size: [16319] bytes
-----------------------------14737809831466499882746641449
Content-Disposition: form-data;name=“File”;filename="image.jpg"
Content-Type: image/jpeg

… (first 180 bytes shown)
2016-03-18 01:45:22:102 MESSAGE channel [0xdd213000]: ending send background task with id=[2014ee].
2016-03-18 01:45:22:104 MESSAGE wake_lock_release(): Android wake lock released [ref=0x2014ee]
2016-03-18 01:45:22:201 MESSAGE bellesip_wake_lock_acquire(): Android wake lock acquired [ref=0x2014de]
2016-03-18 01:45:22:201 MESSAGE channel [0xdd213000]: starting recv background task with id=[2014de].
2016-03-18 01:45:22:202 MESSAGE channel [0xdd213000]: received [202] new bytes from [TLS://my-domain.co.uk:443]:
HTTP/1.1 200 OK
Date: Fri, 18 Mar 2016 01:45:17 GMT
Server: Apache/2.4.7
X-Powered-By: PHP/5.5.9-1ubuntu4.9
Vary: Accept-Encoding
Content-Length: 381
Connection: close
Content-Type: text/html

2016-03-18 01:45:22:204 MESSAGE channel [0xdd213000] [202] bytes parsed
2016-03-18 01:45:22:216 MESSAGE channel [0xdd213000]: received [381] new bytes from [TLS://my-domain.co.uk:443]:

<?xml version="1.0" encoding="UTF-8"?> 232031 image.jpg image/jpeg 2016-03-18 01:45:22:216 MESSAGE channel [0xdd213000] read [381] bytes of body from [my-domain.co.uk:443] 2016-03-18 01:45:22:216 MESSAGE Chat message 0xdf2fc700: moving from state LinphoneChatMessageStateInProgress to LinphoneChatMessageStateFileTransferDone 2016-03-18 01:45:22:231 MESSAGE Skipping top route of initial route-set because same as request-uri. 2016-03-18 01:45:22:232 MESSAGE Changing [client] [MESSAGE] transaction [0xde862be0], from state [INIT] to [TRYING] 2016-03-18 01:45:22:233 MESSAGE channel [0xdd114000]: message sent to [TCP://phone.my-domain.co.uk:5060], size: [853] bytes MESSAGE sip:[email protected] SIP/2.0 Via: SIP/2.0/TCP 192.168.1.125:55694;branch=z9hG4bK.mS-Fk6O1k;rport From: ;tag=MRhLr5ejS To: sip:[email protected] CSeq: 20 MESSAGE Call-ID: RFdWSHotR0 Max-Forwards: 70 Supported: replaces, outbound Content-Type: application/vnd.gsma.rcs-ft-http+xml Content-Length: 381 Date: Fri, 18 Mar 2016 01:45:22 GMT User-Agent: LinphoneAndroid/3.1.0 (belle-sip/1.4.2) <?xml version="1.0" encoding="UTF-8"?> 232031 image.jpg image/jpeg 2016-03-18 01:45:22:273 MESSAGE Chat message 0xdf2fc700: moving from state LinphoneChatMessageStateFileTransferDone to LinphoneChatMessageStateInProgress 2016-03-18 01:45:22:282 MESSAGE channel [0xdd213000]: ending recv background task with id=[2014de]. 2016-03-18 01:45:22:284 MESSAGE wake_lock_release(): Android wake lock released [ref=0x2014de] 2016-03-18 01:45:22:391 MESSAGE bellesip_wake_lock_acquire(): Android wake lock acquired [ref=0x20141a] 2016-03-18 01:45:22:391 MESSAGE channel [0xdd114000]: starting recv background task with id=[20141a]. 2016-03-18 01:45:22:392 MESSAGE channel [0xdd114000]: received [457] new bytes from [TCP://phone.my-domain.co.uk:5060]: SIP/2.0 415 Unsupported Media Type Via: SIP/2.0/TCP 192.168.1.125:55694;branch=z9hG4bK.mS-Fk6O1k;received=192.168.1.125;rport=55694 From: ;tag=MRhLr5ejS To: sip:[email protected];tag=as27ca04aa Call-ID: RFdWSHotR0 CSeq: 20 MESSAGE Server: FPBX-13.0.61(12.8.2) Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Length: 0

2016-03-18 01:45:22:399 MESSAGE channel [0xdd114000] [457] bytes parsed
2016-03-18 01:45:22:399 MESSAGE Found transaction matching response.
2016-03-18 01:45:22:399 MESSAGE Changing [client] [MESSAGE] transaction [0xde862be0], from state [TRYING] to [COMPLETED]
2016-03-18 01:45:22:399 MESSAGE Chat message 0xdf2fc700: moving from state LinphoneChatMessageStateInProgress to LinphoneChatMessageStateNotDelivered
2016-03-18 01:45:22:433 MESSAGE Changing [client] [MESSAGE] transaction [0xde862be0], from state [COMPLETED] to [TERMINATED]
2016-03-18 01:45:22:434 MESSAGE Client MESSAGE transaction [0xde862be0] terminated
2016-03-18 01:45:22:434 MESSAGE Unhandled transaction terminated [0xde862be0]
2016-03-18 01:45:22:434 MESSAGE channel [0xdd114000]: ending recv background task with id=[20141a].
2016-03-18 01:45:22:436 MESSAGE wake_lock_release(): Android wake lock released [ref=0x20141a]
2016-03-18 01:45:22:438 MESSAGE bellesip_wake_lock_acquire(): Android wake lock acquired [ref=0x1015ea]
2016-03-18 01:45:22:438 MESSAGE channel [0xdd213000]: starting recv background task with id=[1015ea].
2016-03-18 01:45:22:439 MESSAGE channel 0xdd213000: state DISCONNECTED
2016-03-18 01:45:22:439 MESSAGE channel [0xdd213000]: ending recv background task with id=[1015ea].
2016-03-18 01:45:22:440 MESSAGE wake_lock_release(): Android wake lock released [ref=0x1015ea]
2016-03-18 01:45:22:441 MESSAGE channel [0xdd213000] removed from http provider.
2016-03-18 01:45:22:444 MESSAGE Channel [0xdd213000] destroyed
2016-03-18 01:45:24:376 MESSAGE Skipping top route of initial route-set because same as request-uri.
2016-03-18 01:45:24:377 MESSAGE Changing [client] [MESSAGE] transaction [0xdfe9d160], from state [INIT] to [TRYING]
2016-03-18 01:45:24:378 MESSAGE channel [0xdd114000]: message sent to [TCP://phone.my-domain.co.uk:5060], size: [748] bytes
MESSAGE sip:[email protected] SIP/2.0
Via: SIP/2.0/TCP 192.168.1.125:55694;branch=z9hG4bK.PARbh8WJA;rport
From: sip:[email protected];tag=hQMBKXCNv
To: sip:[email protected]
CSeq: 20 MESSAGE
Call-ID: 5CA2DwqLBM
Max-Forwards: 70
Supported: replaces, outbound
Content-Type: application/im-iscomposing+xml
Content-Length: 282
Date: Fri, 18 Mar 2016 01:45:24 GMT
User-Agent: LinphoneAndroid/3.1.0 (belle-sip/1.4.2)

<?xml version="1.0" encoding="UTF-8"?>

active60

2016-03-18 01:45:24:415 MESSAGE bellesip_wake_lock_acquire(): Android wake lock acquired [ref=0x100b4e]
2016-03-18 01:45:24:415 MESSAGE channel [0xdd114000]: starting recv background task with id=[100b4e].
2016-03-18 01:45:24:415 MESSAGE channel [0xdd114000]: received [457] new bytes from [TCP://phone.my-domain.co.uk:5060]:
SIP/2.0 415 Unsupported Media Type
Via: SIP/2.0/TCP 192.168.1.125:55694;branch=z9hG4bK.PARbh8WJA;received=192.168.1.125;rport=55694
From: sip:[email protected];tag=hQMBKXCNv
To: sip:[email protected];tag=as422cf1f9
Call-ID: 5CA2DwqLBM
CSeq: 20 MESSAGE
Server: FPBX-13.0.61(12.8.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

2016-03-18 01:45:24:424 MESSAGE channel [0xdd114000] [457] bytes parsed
2016-03-18 01:45:24:424 MESSAGE Found transaction matching response.
2016-03-18 01:45:24:424 MESSAGE Changing [client] [MESSAGE] transaction [0xdfe9d160], from state [TRYING] to [COMPLETED]
2016-03-18 01:45:24:424 MESSAGE Changing [client] [MESSAGE] transaction [0xdfe9d160], from state [COMPLETED] to [TERMINATED]
2016-03-18 01:45:24:424 MESSAGE Client MESSAGE transaction [0xdfe9d160] terminated
2016-03-18 01:45:24:424 MESSAGE Unhandled transaction terminated [0xdfe9d160]
2016-03-18 01:45:24:424 MESSAGE Destroying op [0xdd20c6e0] of type [SalOpMessage]
2016-03-18 01:45:24:425 MESSAGE Transaction [0xdfe9d160] deleted
2016-03-18 01:45:24:425 MESSAGE channel [0xdd114000]: ending recv background task with id=[100b4e].
2016-03-18 01:45:24:428 MESSAGE wake_lock_release(): Android wake lock released [ref=0x100b4e]
2016-03-18 01:45:25:740 MESSAGE Skipping top route of initial route-set because same as request-uri.
2016-03-18 01:45:25:741 MESSAGE Changing [client] [MESSAGE] transaction [0xdd0aebe0], from state [INIT] to [TRYING]
2016-03-18 01:45:25:741 MESSAGE channel [0xdd114000]: message sent to [TCP://phone.my-domain.co.uk:5060], size: [448] bytes
MESSAGE sip:[email protected] SIP/2.0
Via: SIP/2.0/TCP 192.168.1.125:55694;branch=z9hG4bK.VDXwPo990;rport
From: sip:[email protected];tag=IV56tH1Qp
To: sip:[email protected]
CSeq: 20 MESSAGE
Call-ID: re1L2-YiO~
Max-Forwards: 70
Supported: replaces, outbound
Content-Type: text/plain
Content-Length: 4
Date: Fri, 18 Mar 2016 01:45:25 GMT
User-Agent: LinphoneAndroid/3.1.0 (belle-sip/1.4.2)

test
2016-03-18 01:45:25:764 MESSAGE Chat message 0xdfeced80: moving from state LinphoneChatMessageStateIdle to LinphoneChatMessageStateInProgress
2016-03-18 01:45:25:785 MESSAGE bellesip_wake_lock_acquire(): Android wake lock acquired [ref=0x2010aa]
2016-03-18 01:45:25:785 MESSAGE channel [0xdd114000]: starting recv background task with id=[2010aa].
2016-03-18 01:45:25:786 MESSAGE channel [0xdd114000]: received [523] new bytes from [TCP://phone.my-domain.co.uk:5060]:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/TCP 192.168.1.125:55694;branch=z9hG4bK.VDXwPo990;received=192.168.1.125;rport=55694
From: sip:[email protected];tag=IV56tH1Qp
To: sip:[email protected];tag=as57ff314c
Call-ID: re1L2-YiO~
CSeq: 20 MESSAGE
Server: FPBX-13.0.61(12.8.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="4834e4a6"
Content-Length: 0

2016-03-18 01:45:25:794 MESSAGE channel [0xdd114000] [523] bytes parsed
2016-03-18 01:45:25:794 MESSAGE Found transaction matching response.
2016-03-18 01:45:25:794 MESSAGE Changing [client] [MESSAGE] transaction [0xdd0aebe0], from state [TRYING] to [COMPLETED]
2016-03-18 01:45:25:795 MESSAGE linphone_core_find_auth_info(): returning auth info username=6002, realm=asterisk
2016-03-18 01:45:25:795 MESSAGE Auth info found for [6002] realm [asterisk]
2016-03-18 01:45:25:795 MESSAGE Changing [client] [MESSAGE] transaction [0xdd0ae340], from state [INIT] to [TRYING]
2016-03-18 01:45:25:796 MESSAGE channel [0xdd114000]: message sent to [TCP://phone.my-domain.co.uk:5060], size: [627] bytes
MESSAGE sip:[email protected] SIP/2.0
Via: SIP/2.0/TCP 192.168.1.125:55694;branch=z9hG4bK.nQsj4SHni;rport
From: sip:[email protected];tag=IV56tH1Qp
To: sip:[email protected]
CSeq: 21 MESSAGE
Call-ID: re1L2-YiO~
Max-Forwards: 70
Supported: replaces, outbound
Content-Type: text/plain
Content-Length: 4
Date: Fri, 18 Mar 2016 01:45:25 GMT
User-Agent: LinphoneAndroid/3.1.0 (belle-sip/1.4.2)
Authorization: Digest realm=“asterisk”, nonce=“4834e4a6”, algorithm=MD5, username=“6002”, uri="sip:[email protected]", response=“7ec53bda9b6633c5d58638d4ddd69e2d”

test
2016-03-18 01:45:25:796 MESSAGE Changing [client] [MESSAGE] transaction [0xdd0aebe0], from state [COMPLETED] to [TERMINATED]
2016-03-18 01:45:25:796 MESSAGE Client MESSAGE transaction [0xdd0aebe0] terminated
2016-03-18 01:45:25:796 MESSAGE Unhandled transaction terminated [0xdd0aebe0]
2016-03-18 01:45:25:796 MESSAGE channel [0xdd114000]: ending recv background task with id=[2010aa].
2016-03-18 01:45:25:799 MESSAGE wake_lock_release(): Android wake lock released [ref=0x2010aa]
2016-03-18 01:45:25:872 MESSAGE bellesip_wake_lock_acquire(): Android wake lock acquired [ref=0x200eb6]
2016-03-18 01:45:25:872 MESSAGE channel [0xdd114000]: starting recv background task with id=[200eb6].
2016-03-18 01:45:25:872 MESSAGE channel [0xdd114000]: received [443] new bytes from [TCP://phone.my-domain.co.uk:5060]:
SIP/2.0 202 Accepted
Via: SIP/2.0/TCP 192.168.1.125:55694;branch=z9hG4bK.nQsj4SHni;received=192.168.1.125;rport=55694
From: sip:[email protected];tag=IV56tH1Qp
To: sip:[email protected];tag=as57ff314c
Call-ID: re1L2-YiO~
CSeq: 21 MESSAGE
Server: FPBX-13.0.61(12.8.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

2016-03-18 01:45:25:879 MESSAGE channel [0xdd114000] [443] bytes parsed
2016-03-18 01:45:25:880 MESSAGE Found transaction matching response.
2016-03-18 01:45:25:880 MESSAGE Changing [client] [MESSAGE] transaction [0xdd0ae340], from state [TRYING] to [COMPLETED]
2016-03-18 01:45:25:880 MESSAGE Chat message 0xdfeced80: moving from state LinphoneChatMessageStateInProgress to LinphoneChatMessageStateDelivered
2016-03-18 01:45:25:913 MESSAGE Changing [client] [MESSAGE] transaction [0xdd0ae340], from state [COMPLETED] to [TERMINATED]
2016-03-18 01:45:25:913 MESSAGE Client MESSAGE transaction [0xdd0ae340] terminated
2016-03-18 01:45:25:913 MESSAGE Unhandled transaction terminated [0xdd0ae340]
2016-03-18 01:45:25:913 MESSAGE channel [0xdd114000]: ending recv background task with id=[200eb6].
2016-03-18 01:45:25:915 MESSAGE wake_lock_release(): Android wake lock released [ref=0x200eb6]
2016-03-18 01:45:28:580 MESSAGE Vtable [0xdfef0300] unregistered on core [0xdf2caac0]