Difference between revisions of "Callback over Email"
Line 3: | Line 3: | ||
This function receives email and initiates callback using details in this email. | This function receives email and initiates callback using details in this email. | ||
A device can have one CallerID from which it is able to initiate Callback. | |||
Admin | Admin sets up the email box, which should be monitored for callback execution. | ||
SMS to initiate callback can look like: | An SMS to initiate callback can look like: | ||
For CallerID change: change*new_callerid | For CallerID change: change*new_callerid | ||
Line 41: | Line 41: | ||
1. SMS gateway sends email to specified address (example callback@hostname.com) in following format: | 1. SMS gateway sends email to specified address (example callback@hostname.com) in the following format: | ||
CallerID change: | CallerID change: | ||
Line 64: | Line 64: | ||
3. /usr/local/mor/mor_email2callback.sh script parses email and sends everything to MOR | 3. /usr/local/mor/mor_email2callback.sh script parses email and sends everything to MOR. | ||
<nowiki>wget -o /dev/null -O /dev/null "http://localhost/billing/emails/email_callback?subject=$subject¶m1=$param1¶m2=$param2¶m3=$param3"</nowiki> | <nowiki>wget -o /dev/null -O /dev/null "http://localhost/billing/emails/email_callback?subject=$subject¶m1=$param1¶m2=$param2¶m3=$param3"</nowiki> | ||
4. MOR GUI initiates callback using AMI command Originate | 4. MOR GUI initiates callback using AMI command Originate. | ||
Revision as of 11:19, 16 May 2010
Description
This function receives email and initiates callback using details in this email.
A device can have one CallerID from which it is able to initiate Callback.
Admin sets up the email box, which should be monitored for callback execution.
An SMS to initiate callback can look like:
For CallerID change: change*new_callerid
For callback inititation:
- first_number#second_number
- first_number - will ask destination
Then SMS gateway should send email to MOR to initiate callback in following format:
CallerID change:
- Email subject: change
- Email body: old callerid\nnew callerid, (\n) means new line
Callback inititation:
- Email subject: callback
- Email body:
MOR_PARAM1 auth_callerid MOR_PARAM2 first_number MOR_PARAM3 second_number
NOTE: email format should be plain, not html!
Inner mechanics
1. SMS gateway sends email to specified address (example callback@hostname.com) in the following format:
CallerID change:
- Email subject: change
- Email body: old callerid\nnew callerid, (\n) means new line
Callback inititation:
- Email subject: callback
- Email body:
MOR_PARAM1 auth_callerid MOR_PARAM2 first_number MOR_PARAM3 second_number
2. Postfix server gets email and sends to /usr/local/mor/mor_email2callback.sh script
This is configured in /etc/aliases file:
callback: "|/usr/local/mor/mor_email2callback.sh"
3. /usr/local/mor/mor_email2callback.sh script parses email and sends everything to MOR.
wget -o /dev/null -O /dev/null "http://localhost/billing/emails/email_callback?subject=$subject¶m1=$param1¶m2=$param2¶m3=$param3"
4. MOR GUI initiates callback using AMI command Originate.