Thanks Paul,

That was it! It's working.

On 7/10/06, Paul Bagyenda <[EMAIL PROTECTED]> wrote:
One word: PHP. You want to look at $_FILES[mms_files] not $_POST[...] 

 This is because Mbuni VAS GW sends the data to your PHP script using  multipart/form-data encoding. Why? Because it needs to send your script not just the message elements but their content types as well. So for instance if the message contains an image, Mbuni needs to send you the image data as well as the content type. multipart/form-data is made for that. In effect, it as if you had the following HTML form:

<form action="" href="http://localhost/afrisysmms/mms_blog.php" target="_blank" >http://localhost/afrisysmms/mms_blog.php" method="POST" enctype="multipart/form-data">
 Image: <input type="FILE" name="mms_files[]">
 Audio: <input type="FILE" name="mms_files[]">
 <input type="submit">
</form>


The same way you'd process this in PHP is the same way you should process data received from Mbuni


P.




On Jul 09, 2006, at 23:28, joseph wamicha wrote:

Hi,

After a long struggle the mms-service posts to apache. I am using Paul's example on how to call mms-service. Please correct me if I'm wrong but this is how understand things to be working;

Here is where I define the mms-vasp in the mmsc.conf file:

group = mms-vasp
vasp-id = newscorp
type = eaif
short-code = 111
vasp-username = mbuni
vasp-password = test
vasp-url = "" href="http://user:[EMAIL PROTECTED]:12345/" target="_blank" > http://user:[EMAIL PROTECTED]:12345/

So when an MMS is received from the phone and sent to shortcode 111, it is passed to vasp on the URL http://user:[EMAIL PROTECTED]:12345/
mmsbox handles all VASP transactions so when mmsbox receives above MMS it wants to pass it over to the defined MMSC via mmsbox. Thus, find my mmsbox.conf file below:

group = mmsc
id = local
mmsc-url = "" href="http://mbuni:[EMAIL PROTECTED]:1982/eaif" target="_blank" > http://mbuni:[EMAIL PROTECTED]:1982/eaif
#mmsc-url = "" href="http://localhost:1981/" target="_blank" > http://localhost:1981/
incoming-username = user
incoming-password = pass
incoming-port = 12345
type = eaif

group = mms-service
name = phpblog
catch-all = true
post-url = "" href="http://localhost/afrisysmms/mms_blog.php" target="_blank" >http://localhost/afrisysmms/mms_blog.php
#http-post-parameters = fx=true&images[]=%i&text[]=%t
http-post-parameters=mms_files[]=%z
accept-x-mbuni-headers = true
keyword= phpblog
assume-plain-text = true
omit-empty = no
#suppress-reply = true

This indicates that mmsbox should send MMS to just the local mbuni MMSC, but before doing so I guess it should call mms-service.

Here's what my logs show (it appears the mms-service is being called and I can see a post in the apache logs!):

2006-07-09 14:58:48 [11899] [5] DEBUG: WSP: Mapping `text/html', WSP 1.2 to 0x0002.
2006-07-09 14:58:48 [11899] [5] INFO: MMSBox: Queued message from service [phpblog] to outgoing: e-pd-qf6328.2.x899.77
2006-07-09 14:58:48 [11899] [4] DEBUG: Queued to thread 0 for /opt/mbuni/store_mms/mmsbox_outgoing/e/pd/qf6328.2.x899.77
2006-07-09 14:58:48 [11899] [10] INFO: MMSBox: Send [eaif] to MMC[local], msg type [m-send-req], from 111/TYPE=PLMN, to 192.168.11.1/TYPE=IPv4
2006-07-09 14:58:48 [11899] [10] DEBUG: WSP: Mapping `text/html', WSP 1.2 to 0x0002.

However, there is nothing in the $_POST['mms_files'] variable. What could possibly be wrong?

Thanks.


--
C is forever.
_______________________________________________
Users mailing list


_______________________________________________
Users mailing list
[email protected]
http://mbuni.org/mailman/listinfo/users_mbuni.org





--
C is forever.
_______________________________________________
Users mailing list
[email protected]
http://mbuni.org/mailman/listinfo/users_mbuni.org

Reply via email to