Re: [asterisk-users] [External] [External] [External] [External] Geo location 18.14.0-rc1 question

2022-08-12 Thread Joshua C. Colp
On Fri, Aug 12, 2022 at 10:01 AM George Joseph  wrote:

>
>
> On Thu, Aug 11, 2022 at 8:43 AM Dan Cropp  wrote:
>
>> Thank you George.
>>
>>
>>
>> I am still running on asterisk 18.14.0-rc1 and have not retrieved the
>> patches yet.
>>
>> Did this version have a bug with the variables?
>>
>
> It's quite possible.  RC2 was just released so you should try that.
>
>>
>>
>> I’m trying the location_info and variables in the AMI Originate you
>> recommended at the end of the previous e-mail.
>>
>>
>>
>> In case it’s not coming through correctly via e-mail, the variable names
>> are preceeded with a single underscore in the AMI and in the location_info
>> values.
>>
>>
>>
>>
>>
>> [IS_loc_5]
>>
>> type = location
>>
>> format = civicAddress
>>
>> location_info = country=${_MY_GEO_COUNTRY}
>>
>> location_info = A1=${_MY_GEO_NATIONAL_SUBDIVISION}
>>
>> location_info = A2=${_MY_GEO_NATSUB}
>>
>> location_info = A3=${_MY_GEO_CITY}
>>
>> location_info = HNO=${_MY_GEO_HNO}
>>
>> location_info = RD=${_MY_GEO_RD}
>>
>> location_info = STS=${_MY_GEO_STS}
>>
>> location_info = PC=${_MY_GEO_PC}
>>
>
Underscore refers to variable inheritance. For usage you don't include the
underscore. I don't think the code strips out the underscore when
substituting or retrieving, so it could very well end up empty during that
process.

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] [External] [External] [External] [External] Geo location 18.14.0-rc1 question

2022-08-12 Thread George Joseph
On Thu, Aug 11, 2022 at 8:43 AM Dan Cropp  wrote:

> Thank you George.
>
>
>
> I am still running on asterisk 18.14.0-rc1 and have not retrieved the
> patches yet.
>
> Did this version have a bug with the variables?
>

It's quite possible.  RC2 was just released so you should try that.

>
>
> I’m trying the location_info and variables in the AMI Originate you
> recommended at the end of the previous e-mail.
>
>
>
> In case it’s not coming through correctly via e-mail, the variable names
> are preceeded with a single underscore in the AMI and in the location_info
> values.
>
>
>
>
>
> [IS_loc_5]
>
> type = location
>
> format = civicAddress
>
> location_info = country=${_MY_GEO_COUNTRY}
>
> location_info = A1=${_MY_GEO_NATIONAL_SUBDIVISION}
>
> location_info = A2=${_MY_GEO_NATSUB}
>
> location_info = A3=${_MY_GEO_CITY}
>
> location_info = HNO=${_MY_GEO_HNO}
>
> location_info = RD=${_MY_GEO_RD}
>
> location_info = STS=${_MY_GEO_STS}
>
> location_info = PC=${_MY_GEO_PC}
>
>
>
> [IS_prof_9]
>
> type = profile
>
> location_reference = IS_loc_5
>
> pidf_element = device
>
> profile_action = discard_incoming
>
> usage_rules = retransmission_allowed=yes
>
>
>
>
>
> [192.168.33.31]
>
> type = endpoint
>
> context = IS
>
> transport = transport1
>
> auth = auth14
>
> aors = 192.168.33.31
>
> accountcode = 20
>
> dtmf_mode = inband
>
> device_state_busy_at = 1600
>
> moh_passthrough = no
>
> identify_by = username,ip,header
>
> disallow = all
>
> allow = ulaw
>
> acl = acl1
>
> geoloc_incoming_call_profile = IS_prof_7
>
> geoloc_outgoing_call_profile = IS_prof_9
>
>
>
>
>
>
>
> Using a telnet session, I connect up via AMI and login.  Then I attempt to
> Originate.  The call goes through, but none of the location_info settings
> are being updated
>
>
>
> Action: Originate
>
> Channel: PJSIP/1234@192.168.33.31
>
> Exten: createcall
>
> Context: IS
>
> Priority: 1
>
> Timeout: 6
>
> CallerID: John Smith <8005551234>
>
> Variable:
> _MY_GEO_COUNTRY=US,_MY_GEO_NATSUB=Florida,_MY_GEO_CITY=Orlando,_MY_GEO_HNO=100,_MY_GEO_RD=Main,_MY_GEO_STS=Street,CALLERID(num-pres)=allowed_passed_screen
>
> Async: true
>
>
>
>
>
> [08/10 15:04:12.470] DEBUG[1774] manager.c: Running action 'Originate'
>
> [08/10 15:04:12.470] DEBUG[1907] chan_pjsip.c:  1234@192.168.33.31
> Topology:  <0:audio-0:audio:sendrecv (slin)>
>
> [08/10 15:04:12.470] DEBUG[1614] chan_pjsip.c:  1234@192.168.33.31
>
> [08/10 15:04:12.470] DEBUG[1614] res_pjsip_session.c:  192.168.33.31 1234
> Topology:  <0:audio-0:audio:sendrecv (slin)>
>
> [08/10 15:04:12.470] DEBUG[1614] dsp.c: Setup tone 1100 Hz, 500 ms,
> block_size=160, hits_required=21
>
> [08/10 15:04:12.470] DEBUG[1614] dsp.c: Setup tone 2100 Hz, 2600 ms,
> block_size=160, hits_required=116
>
> [08/10 15:04:12.470] DEBUG[1614] chan_pjsip.c:  192.168.33.31
>
> [08/10 15:04:12.470] DEBUG[1614] chan_pjsip.c:  Direct media no glare
> mitigation
>
> [08/10 15:04:12.471] DEBUG[1614] res_pjsip_session/pjsip_session_caps.c:
> '192.168.33.31' Caps for outgoing audio call with pref 'remote_merge' -
> remote: (slin) local: (ulaw) joint: (ulaw)
>
> [08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:
>
> [08/10 15:04:12.471] DEBUG[1614] chan_pjsip.c:
>
> [08/10 15:04:12.471] DEBUG[1907] chan_pjsip.c:  192.168.33.31
>
> [08/10 15:04:12.471] DEBUG[1907] channel_internal_api.c:  :
> Formats: (none)
>
> [08/10 15:04:12.471] DEBUG[1907] channel_internal_api.c:  Channel is being
> initialized or destroyed
>
> [08/10 15:04:12.471] DEBUG[1907] stasis.c: Creating topic. name:
> channel:1660161852.8, detail:
>
> [08/10 15:04:12.471] DEBUG[1907] stasis.c: Topic 'channel:1660161852.8':
> 0x7f19c0023210 created
>
> [08/10 15:04:12.471] DEBUG[1907] channel.c: Channel 0x7f19c00048d0
> 'PJSIP/192.168.33.31-0005' allocated
>
> [08/10 15:04:12.471] DEBUG[1907] chan_pjsip.c:  Topology:
> <0:audio-0:audio:sendrecv (ulaw)> Formats: (ulaw)
>
> [08/10 15:04:12.471] DEBUG[1907] chan_pjsip.c:  Compatible? yes
>
> [08/10 15:04:12.471] DEBUG[1907] channel_internal_api.c:
> PJSIP/192.168.33.31-0005: MultistreamFormats: (ulaw)
>
> [08/10 15:04:12.471] DEBUG[1907] channel_internal_api.c:  Set native
> formats but not topology
>
> [08/10 15:04:12.471] DEBUG[1907] channel_internal_api.c:
> PJSIP/192.168.33.31-0005:  <0:audio-0:audio:sendrecv (ulaw)>
>
> [08/10 15:04:12.471] DEBUG[1907] channel_internal_api.c:  Used provided
> topology
>
> [08/10 15:04:12.471] DEBUG[1907] chan_pjsip.c:
>
> [08/10 15:04:12.471] DEBUG[1907] chan_pjsip.c:  Channel:
> PJSIP/192.168.33.31-0005
>
> [08/10 15:04:12.471] DEBUG[1626] manager.c: Examining AMI event:
>
> Event: Newchannel^M
>
> Privilege: call,all^M
>
> Channel: PJSIP/192.168.33.31-0005^M
>
> ChannelState: 0^M
>
> ChannelStateDesc: Down^M
>
> CallerIDNum: ^M
>
> CallerIDName: ^M
>
> ConnectedLineNum: ^M
>
> ConnectedLineName: ^M
>
> Language: en^M
>
> AccountCode: 20^M
>
> Context: IS^M
>
> Exten: s^M
>
> Priority: 1^M
>
> Uniqueid: 1660161852.8^M
>
> Linkedid: 1660161852.8^M
>
> ^M
>
>
>