We want to use dialplan python script.

Script working but call setup is lasting too long ( <10sec to >40sec when 60 concurent calls on switch)

Script just route call from user to gateway.

I’ve not a lot of experience in FS and programming, so I need your help.

Ps

I’m not good in English, excuse me.  

Code part

 

                        sessionData = ‘sofia/gateway/gwname/dest’

                       new_session = Session(sessionData,session)

 

                        if new_session.ready():

                                 bridge(session,new_session)

                                 if new_session.ready():

                                      new_session.hangup()

                        hcause = new_session.hangupCause()

 

My native language is