[Freeswitch-users] simulate att_xfer , threeway

Lee JJ jengjr at gmail.com
Thu Sep 4 20:24:59 PDT 2008


Hello :

While the att_xfer , I collect show the calls  and channels info .
After press "0" , the calls is Zero , and found the last channel using
application "three_way"

# during att_xfer , press "0"
freeswitch at TTN_Li> show channels
API CALL [show(channels)] output:
uuid,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,write_codec,write_rate
33c232f5-e0ff-446e-ad93-8c2f80d61656,2008-09-05
11:00:40,1220583640,sofia/inter2/1529 at 10.20.1.233,CS_EXECUTE,1529,1529,172.16.93.231,1526,att_xfer,sofia/inter2/1528,XML,inter2,PCMU,8000,PCMU,8000
0d51ddb6-cac2-428b-a310-d9c54f979efc,2008-09-05
11:00:40,1220583640,sofia/inter2/1526,CS_EXCHANGE_MEDIA,Extension
1529,1529,172.16.93.231,1526,playback,local_stream://moh,XML,inter2,PCMU,8000,PCMU,8000
501e6351-6b9f-46a6-81bc-9a2c5a3306fa,2008-09-05
11:00:53,1220583653,sofia/inter2/1528,CS_EXECUTE,Extension
1529,1529,172.16.93.231,1528,three_way,33c232f5-e0ff-446e-ad93-8c2f80d61656,XML,inter2,PCMU,8000,PCMU,8000
3 total.
freeswitch at TTN_Li>
freeswitch at TTN_Li> show calls
API CALL [show(calls)] output:
0 total.

freeswitch at TTN_Li> show calls
API CALL [show(calls)] output:
function,created,created_epoch,caller_cid_name,caller_cid_num,caller_dest_num,caller_chan_name,caller_uuid,callee_cid_name,callee_cid_num,callee_dest_num,callee_chan_name,callee_uuid
2008-09-05 11:00:42,1220583642,switch_ivr_multi_threaded_bridge,1529,1529,1526,sofia/inter2/1529 at 10.20.1.233,33c232f5-e0ff-446e-ad93-8c2f80d61656,Extension
1529,1529,1526,sofia/inter2/1526,0d51ddb6-cac2-428b-a310-d9c54f979efc
2008-09-05 11:00:56,1220583656,switch_ivr_multi_threaded_bridge,1529,1529,1526,sofia/inter2/1529 at 10.20.1.233,33c232f5-e0ff-446e-ad93-8c2f80d61656,Extension
1529,1529,1528,sofia/inter2/1528,501e6351-6b9f-46a6-81bc-9a2c5a3306fa
2 total.
freeswitch at TTN_Li>
freeswitch at TTN_Li> show channels
API CALL [show(channels)] output:
uuid,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,write_codec,write_rate
33c232f5-e0ff-446e-ad93-8c2f80d61656,2008-09-05
11:00:40,1220583640,sofia/inter2/1529 at 10.20.1.233,CS_EXECUTE,1529,1529,172.16.93.231,1526,att_xfer,sofia/inter2/1528,XML,inter2,PCMU,8000,PCMU,8000
0d51ddb6-cac2-428b-a310-d9c54f979efc,2008-09-05
11:00:40,1220583640,sofia/inter2/1526,CS_EXCHANGE_MEDIA,Extension
1529,1529,172.16.93.231,1526,playback,local_stream://moh,XML,inter2,PCMU,8000,PCMU,8000
501e6351-6b9f-46a6-81bc-9a2c5a3306fa,2008-09-05
11:00:53,1220583653,sofia/inter2/1528,CS_EXCHANGE_MEDIA,Extension
1529,1529,172.16.93.231,1528,,,XML,inter2,PCMU,8000,PCMU,8000
3 total.

So , what's the no calls changing meaning ?

And I  simulate the three_way working using scripts, pitty thing is
either hanup immediately or someone in hold music.
PLS give some advice .

### call test scripts staring
n_sess = new Session() ;
res = n_sess.originate(n_sess, "sofia/inter2/1528%10.20.1.233" );

// wait for it ... answer
n_sess.waitForAnswer(10000);

if (  n_sess.ready()) {  //never go into here
    console_log("info", "n_sess uuid: "+ n_sess.uuid + "\n");
    n_sess.execute("three_way", session.uuid ) ;
}




More information about the FreeSWITCH-users mailing list