[Freeswitch-users] How to set destination_number_ton when originating a call with bgapi

mbo mbodbg at gmx.net
Mon Oct 15 19:29:58 MSD 2012


We are running freeswitch connected with a sangoma A101 card to the PSTN. We have an application that is connected to the event socket to control incoming calls.
When bridging a call to an external number, I set the profile variable "destination_number_ton" and put it also as option to the bridge command to have the variable filled in all channel events.   

sendmsg 
call-command: execute
execute-app-name: set_profile_var
execute-app-arg: destination_number_ton=1
event-lock: true

sendmsg 
call-command: execute
execute-app-name: bridge
execute-app-arg: {calltype=FORWARD,destination_number_ton=1}freetdm/1/a/XXXXXX
event-lock: true

In this scenario everything works fine, the type for the Called Party Number is set correctly to "international".

Prot Disc:Q.931/I.451 (0x08)
  Call Ref:007C (Originating side)
  Type:SETUP (0x5)
  Sending complete:
  Bearer Capability:Coding:ITU-T(0) TransferCap:Speech(0) TransferRate:64 Kbit/s(16) L1Prot:G.711 A-Law(3)
  Channel Id:No:1 Type:B-chans(3)  Exclusive/Implicit
  Calling Party Number:XXXXX(l:11) plan:isdn(1) type:national(2)scr:user, passed(1) pres:allowed(0)
  Called Party Number:XXXX(l:15) plan:isdn(1) type:international(1) <<<----------------- OK
  [ 08 02 00 7c 05 a1 04 03 80 90 a3 18 03 a9 83 81 6c 0d 21 81 32 32 31 35 35 34 30 30 33 31 38 70
    10 91 34 39 32 32 31 34 30 30 36 37 38 33 31 30 33 ]

For another scenario I need to originate calls with bgapi function like:

bgapi originate {origination_caller_id_number=XXXX,originate_timeout=20,origination_uuid=7a1093b5-4225-4a99-b3dc-bb4254217e4,destination_number_ton=1}freetdm/1/a/XXXX &park

event if I set the profile_var destination_number_ton, it's not "transported" to the ISDN layer. In the ISDN trace I can see that the number type of the Called Party Number is always "unknown".

Prot Disc:Q.931/I.451 (0x08)
  Call Ref:007A (Originating side)
  Type:SETUP (0x5)
  Sending complete:
  Bearer Capability:Coding:ITU-T(0) TransferCap:Speech(0) TransferRate:64 Kbit/s(16) L1Prot:G.711 A-Law(3)
  Channel Id:No:1 Type:B-chans(3)  Exclusive/Implicit
  Calling Party Number:XXXXX(l:12) plan:isdn(1) type:national(2)scr:user, passed(1) pres:allowed(0)
  Called Party Number:XXXXX(l:15) plan:isdn(1) type:unknown(0) <<<----------------- NOT OK
  [ 08 02 00 7a 05 a1 04 03 80 90 a3 18 03 a9 83 81 6c 0e 21 81 30 32 32 31 35 35 34 30 30 33 31 38
    70 10 81 34 39 32 32 31 34 30 30 36 37 38 33 31 30 31 ] 

How to can the destination_number_ton be set when originating a call via bgapi?

Thanks

Markus



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121015/39cf63c1/attachment-0001.html 


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