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: executeexecute-app-name: set_profile_varexecute-app-arg: destination_number_ton=1event-lock: true
sendmsg call-command: executeexecute-app-name: bridgeexecute-app-arg: {calltype=FORWARD,destination_number_ton=1}freetdm/1/a/XXXXXXevent-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