howto originate fs call from webapp (python)
hi all, i come from asterisk an i am new to freeswitch. after my with days with freeswitch i am very excited! but trying to migrate our deployment i have three challenges. one of them is: i need to call freeswitch from a webapp (e.g. python) and pass number1 and number2. i then need freeswitch to call number1. as soon as it is picked up say a short confirmaton text, call number2 and bridge the two. my first approach was to call via xml_rpc like described in the wiki but when i call like server.freeswitch.api("originate","sofia/gategay/gateway1/{number1} &bridge(sofia/gateway/gateway2/{number2})") but in this case both numbers are called in parallel and the first number to pick up gets a ringback tone until the other number picks up. how can i get the sequence described above? thanks for your help alex
my first approach was to call via xml_rpc like described in the wiki but when i call like
server.freeswitch.api("originate","sofia/gategay/gateway1/{number1} &bridge(sofia/gateway/gateway2/{number2})")
but in this case both numbers are called in parallel and the first number to pick up gets a ringback tone until the other number picks up. how can i get the sequence described above?
thanks for your help alex
You are probably getting early media when dialing number 1. Try : server.freeswitch.api("originate","{ignore_early_media=true}sofia/gategay/gateway1/{number1} &bridge(sofia/gateway/gateway2/{number2})")
On Tue, Feb 24, 2009 at 1:09 PM, Alexander de Greiff <alexander@degreiff.com> wrote:
hi all,
i come from asterisk an i am new to freeswitch. after my with days with freeswitch i am very excited!
Welcome to FreeSWITCH!
but trying to migrate our deployment i have three challenges. one of them is:
i need to call freeswitch from a webapp (e.g. python) and pass number1 and number2. i then need freeswitch to call number1. as soon as it is picked up say a short confirmaton text, call number2 and bridge the two.
my first approach was to call via xml_rpc like described in the wiki but when i call like
server.freeswitch.api("originate","sofia/gategay/gateway1/{number1} &bridge(sofia/gateway/gateway2/{number2})")
but in this case both numbers are called in parallel and the first number to pick up gets a ringback tone until the other number picks up. how can i get the sequence described above?
thanks for your help alex
Do you have any other requirements? For example, what happens if the first bridge fails? Does your Python app need to "do anything"? Just curious. Thanks, MC
participants (3)
-
Alexander de Greiff
-
Michael Collins
-
Rupa Schomaker (lists)