sangoma / switchy

async FreeSWITCH cluster control
https://switchy.readthedocs.io/en/latest/
Mozilla Public License 2.0
72 stars 18 forks source link

Make an easy way to originate from a gateway instead of a profile #40

Closed tsemczyszyn closed 8 years ago

tsemczyszyn commented 8 years ago

In order to change the originate command to use a gateway (trunk) I need to do the following

fscli = o.pool.clients[0]
fscli._orig_cmd = 'originate {{sip_h_X-switchy_originating_session={uuid_str},sip_h_X-switchy_app={app_id},originator_codec=PCMU,switchy_app={app_id},originate_timeout=60,ignore_display_updates=true,origination_uuid={uuid_str},origination_caller_id_number=1112223333,origination_caller_id_name=Mr_Switchy,absolute_codec_string=}}sofia/gateway/my_gateway/switchy@10.10.12.5:5080;fs_path=sip:10.10.12.63 &park()'

It would be nice if there was an easy way to do this from the command-line utility or from the originator itself.

goodboy commented 8 years ago

I was just thinking. Maybe it'd be nice to have a fancy make_orig_cmd util func which takes in just the profile and the proxy address (i.e. socket of the target DUT UA). We can use the same code from @moises-silva for the cli stuff and we auto construct the rest of it.

goodboy commented 8 years ago

@tsemczyszyn sorry about the delay with this... Can you give ^ branch a try?