In this second release I decided to add a flag to this application. When you receive a FSK message you can now end the Receive application when data carrier is lost and not only when you got an hangup. Default behaviour is "end when data carrier is lost", if you want to revert to old behaviour and keep application to receive until it got an hangup, just add the "h" flag. New verison can be downloaded here (app_fsk.c)
For your reference I Bell103 encoded a simple message: "field1#field2#field3" in wav which can be used to test the application.
An example of dialplan might be:
exten => 200, 1, Answer()
exten => 200, n, ReceiveFSK(msg)
exten => 200, n, Noop(Message received ${msg})
exten => 200, n, Set(f1=${CUT(msg,#,1)})
exten => 200, n, Set(f2=${CUT(msg,#,2)})
exten => 200, n, Set(f3=${CUT(msg,#,3)})
exten => 200, n, Noop(f1: ${f1})
exten => 200, n, Noop(f2: ${f2})
exten => 200, n, Noop(f3: ${f3})
exten => 200, n, Hangup()
exten => h, 1, Noop(Got hangup)
exten => h, n, Noop(Message ${msg} processed on hangup)
exten => h, n, Set(f1=${CUT(msg,#,1)})
exten => h, n, Set(f2=${CUT(msg,#,2)})
exten => h, n, Set(f3=${CUT(msg,#,3)})
exten => h, n, Noop(f1: ${f1})
exten => h, n, Noop(f2: ${f2})
exten => h, n, Noop(f3: ${f3})
exten => h, n, Hangup()
No comments:
Post a Comment