[Freeswitch-users] I need to Inject some string when sending an SMS via chat command to avoid a concurrency problem

Leonardo N. S. Pereira leonardo at daitangroup.com
Fri Feb 1 14:42:22 MSK 2013


I'm sending the SMS via mod_socket interface using the following command:
     bgapi chat sip|+17778882233|external/+17778882234 at sms-proxy.com|SMS 
test
The SMS is sent successfully.
The problem is that I need to inject an string to be retrieved when the 
BACKGROUND_JOB event is received.

This is the scenario:
#1 Send an SMS using BGAPI
#2 create a new record in database using the JOB_ID as key
#3 As soon as the BACKGROUND_JOB event is received, update the database.

The problem is that sometimes, the event is received before the record 
has being created.


Is there any way to inject an kind of "trakcing_id" when sending an SMS 
that will be received in BG event? (just in case, for calls I had the 
same problem, and I used the parameter 'origination_channel_name' to 
handle the problem)

Thanks in advance.
Leo





Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list