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

Dan Cropp dan at amtelco.com
Fri Aug 12 13:19:54 CDT 2022


Thank you George.

rc2 did fix the issue.

I am now able to program the variables in the location_info and pass values via the AMI Originate variables.

Is there a way to make the location_info optional?

On the same PJSIP Endpoint, we may need to originate calls with different requirements for the fields passed.
For example
Dialing a number for customer A, need to pass country, A1, A3, HNO, RD, STS, PC, FLR and ROOM.
Dialing a number for customer B, need to pass country, A1, A2, and A3.

Is it possible to program the Profile/Location to support values for all the settings, but have Asterisk ignore any settings where the value is blank?

Right now, if I have HNO=${MYGEO_FLR} but the variable MYGEO_FLR is not set, it still passes the FLR in the sip as <ca:FLR/>

I believe it’s perfectly fine to send the <ca:FLR/>
My fear is some system may interpret a blank FLR differently than the FLR not being present at all.

Dan

From: asterisk-users <asterisk-users-bounces at lists.digium.com> On Behalf Of George Joseph
Sent: Thursday, August 11, 2022 1:22 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
Subject: Re: [External] [asterisk-users] [External] [External] [External] [External] Geo location 18.14.0-rc1 question



On Thu, Aug 11, 2022 at 8:43 AM Dan Cropp <dan at amtelco.com<mailto:dan at amtelco.com>> 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 at 192.168.33.31<mailto:1234 at 192.168.33.31>
Exten: createcall
Context: IS
Priority: 1
Timeout: 60000
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 at 192.168.33.31<mailto:1234 at 192.168.33.31> Topology:  <0:audio-0:audio:sendrecv (slin)>
[08/10 15:04:12.470] DEBUG[1614] chan_pjsip.c:  1234 at 192.168.33.31<mailto:1234 at 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:  <initializing>: 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-00000005' 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-00000005: 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-00000005:  <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-00000005
[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-00000005^M
ChannelState: 0^M
ChannelStateDesc: Down^M
CallerIDNum: <unknown>^M
CallerIDName: <unknown>^M
ConnectedLineNum: <unknown>^M
ConnectedLineName: <unknown>^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

[08/10 15:04:12.471] DEBUG[1569] threadpool.c: Increasing threadpool stasis/pool's size by 1
[08/10 15:04:12.471] DEBUG[1908] chan_pjsip.c:  PJSIP/192.168.33.31-00000005 Topology:  <0:audio-0:audio:sendrecv (ulaw)>
[08/10 15:04:12.471] DEBUG[1908] chan_pjsip.c:  'call' task pushed
[08/10 15:04:12.471] DEBUG[1774] manager.c: Examining AMI event:
Event: Newchannel^M
Privilege: call,all^M
Channel: PJSIP/192.168.33.31-00000005^M
ChannelState: 0^M
ChannelStateDesc: Down^M
CallerIDNum: <unknown>^M
CallerIDName: <unknown>^M
ConnectedLineNum: <unknown>^M
ConnectedLineName: <unknown>^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

[08/10 15:04:12.471] DEBUG[1774] manager.c: Examining AMI event:
Event: Newexten^M
Privilege: dialplan,all^M
Channel: PJSIP/192.168.33.31-00000005^M
ChannelState: 0^M
ChannelStateDesc: Down^M
CallerIDNum: <unknown>^M
CallerIDName: <unknown>^M
ConnectedLineNum: <unknown>^M
ConnectedLineName: <unknown>^M
Language: en^M
AccountCode: 20^M
Context: IS^M
Exten: s^M
Priority: 1^M
Uniqueid: 1660161852.8^M
Linkedid: 1660161852.8^M
Extension: s^M
Application: AppDial2^M
AppData: (Outgoing Line)^M
^M

[08/10 15:04:12.471] DEBUG[1774] manager.c: Examining AMI event:
Event: VarSet^M
Privilege: dialplan,all^M
Channel: PJSIP/192.168.33.31-00000005^M
ChannelState: 0^M
ChannelStateDesc: Down^M
CallerIDNum: <unknown>^M
CallerIDName: <unknown>^M
ConnectedLineNum: <unknown>^M
ConnectedLineName: <unknown>^M
Language: en^M
AccountCode: 20^M
Context: IS^M
Exten: s^M
Priority: 1^M
Uniqueid: 1660161852.8^M
Linkedid: 1660161852.8^M
Variable: _MY_GEO_STS^M
Value: Street^M
^M

[08/10 15:04:12.471] DEBUG[1774] manager.c: Examining AMI event:
Event: VarSet^M
Privilege: dialplan,all^M
Channel: PJSIP/192.168.33.31-00000005^M
ChannelState: 0^M
ChannelStateDesc: Down^M
CallerIDNum: <unknown>^M
CallerIDName: <unknown>^M
ConnectedLineNum: <unknown>^M
CallerIDName: <unknown>^M
ConnectedLineNum: <unknown>^M
ConnectedLineName: <unknown>^M
Language: en^M
AccountCode: 20^M
Context: IS^M
Exten: s^M
Priority: 1^M
Uniqueid: 1660161852.8^M
Linkedid: 1660161852.8^M
Variable: _MY_GEO_RD^M
Value: Main^M
^M

[08/10 15:04:12.471] DEBUG[1626] manager.c: Examining AMI event:
Event: Newexten^M
Privilege: dialplan,all^M
Channel: PJSIP/192.168.33.31-00000005^M
ChannelState: 0^M
ChannelStateDesc: Down^M
CallerIDNum: <unknown>^M
CallerIDName: <unknown>^M
ConnectedLineNum: <unknown>^M
ConnectedLineName: <unknown>^M
Language: en^M
AccountCode: 20^M
Context: IS^M
Exten: s^M
Priority: 1^M
Uniqueid: 1660161852.8^M
Linkedid: 1660161852.8^M
Extension: s^M
Application: AppDial2^M
AppData: (Outgoing Line)^M
^M

[08/10 15:04:12.471] DEBUG[1626] manager.c: Examining AMI event:
Event: VarSet^M
Privilege: dialplan,all^M
Channel: PJSIP/192.168.33.31-00000005^M
ChannelState: 0^M
ChannelStateDesc: Down^M
CallerIDNum: <unknown>^M
CallerIDName: <unknown>^M
ConnectedLineNum: <unknown>^M
ConnectedLineName: <unknown>^M
Language: en^M
AccountCode: 20^M
Context: IS^M
Exten: s^M
Priority: 1^M
Uniqueid: 1660161852.8^M
Linkedid: 1660161852.8^M
Variable: _MY_GEO_STS^M
Value: Street^M
^M

….

[08/10 15:04:12.471] DEBUG[1614] chan_pjsip.c:  PJSIP/192.168.33.31-00000005 Topology:  <0:audio-0:audio:sendrecv (ulaw)>
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Processing streams
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Processing stream 0:audio-0:audio:sendrecv (ulaw)
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005 Adding position 0
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  Creating new media session
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  Setting media session as default for audio
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  Done
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005 Stream: 0:audio-0:audio:sendrecv (ulaw)
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_sdp_rtp.c:  PJSIP/192.168.33.31-00000005 Type: audio 0:audio-0:audio:sendrecv (ulaw)
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_sdp_rtp.c: Transport transport1 bound to 0.0.0.0<http://0.0.0.0>: Using it for RTP media.
[08/10 15:04:12.471] DEBUG[1614] rtp_engine.c: Using engine 'asterisk' for RTP instance '0x7f19c80c3bf0'
[08/10 15:04:12.471] DEBUG[1614] res_rtp_asterisk.c: (0x7f19c80c3bf0) RTP allocated port 17214
[08/10 15:04:12.471] DEBUG[1614] res_rtp_asterisk.c: (0x7f19c80c3bf0) ICE creating session 0.0.0.0:17214<http://0.0.0.0:17214> (17214)
[08/10 15:04:12.471] DEBUG[1614] res_rtp_asterisk.c: (0x7f19c80c3bf0) ICE create
[08/10 15:04:12.471] DEBUG[1614] res_rtp_asterisk.c: (0x7f19c80c3bf0) ICE add system candidates
[08/10 15:04:12.471] DEBUG[1614] res_rtp_asterisk.c: (0x7f19c80c3bf0) ICE add candidate: 192.168.33.33:17214<http://192.168.33.33:17214>, 2130706431
[08/10 15:04:12.471] DEBUG[1614] rtp_engine.c: RTP instance '0x7f19c80c3bf0' is setup and ready to go
[08/10 15:04:12.471] DEBUG[1614] res_rtp_asterisk.c: (0x7f19c80c3bf0) ICE stopped
[08/10 15:04:12.471] DEBUG[1614] res_rtp_asterisk.c: (0x7f19c80c3bf0) RTCP setup on RTP instance
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_sdp_rtp.c:  RC: 1
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  Handled
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Stream 0:audio-0:audio:sendrecv (ulaw) added
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Done with 0:audio-0:audio:sendrecv (ulaw)
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Adding bundle groups (if available)
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Copying connection details
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Processing media 0
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Media 0 reset
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.471] DEBUG[1614] res_pjsip_session.c:
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Method is INVITE
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  PJSIP/192.168.33.31-00000005: There was no geoloc datastore
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  PJSIP/192.168.33.31-00000005: There are no geoloc profiles on this channel
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  PJSIP/192.168.33.31-00000005: There are now 1 geoloc profiles to be sent
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  ep: 'IS_prof_9' EffectiveLoc: country=${_MY_GEO_COUNTRY},A1=${_MY_GEO_NATIONAL_SUBDIVISION},A2=${_MY_GEO_NATSUB},A3=${_MY_GEO_CITY},HNO=${_MY_GEO_HNO},RD=${_MY_GEO_RD},STS=${_MY\
_GEO_STS},PC=${_MY_GEO_PC}
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.472] DEBUG[1614] res_geolocation/geoloc_eprofile.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.472] DEBUG[1614] res_geolocation/geoloc_eprofile.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_COUNTRY result is '' from channel
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_COUNTRY result is '' from headp
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_NATIONAL_SUBDIVISION result is '' from channel
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_NATIONAL_SUBDIVISION result is '' from headp
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_NATSUB result is '' from channel
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_NATSUB result is '' from headp
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_CITY result is '' from channel
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_CITY result is '' from headp
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_HNO result is '' from channel
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_HNO result is '' from headp
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_RD result is '' from channel
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_RD result is '' from headp
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_STS result is '' from channel
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_STS result is '' from headp
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_PC result is '' from channel
[08/10 15:04:12.472] DEBUG[1614] pbx_variables.c: Variable _MY_GEO_PC result is '' from headp
[08/10 15:04:12.472] DEBUG[1614] res_geolocation/geoloc_civicaddr.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.472] DEBUG[1614] res_geolocation/geoloc_civicaddr.c:  PJSIP/192.168.33.31-00000005: Done
[08/10 15:04:12.472] DEBUG[1614] res_geolocation/geoloc_eprofile.c:  PJSIP/192.168.33.31-00000005: Done
[08/10 15:04:12.472] DEBUG[1614] res_geolocation/geoloc_eprofile.c:  PJSIP/192.168.33.31-00000005: Done
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  body: 0x7f19c8048390 0
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  cid: 'whjwo at 192.168.33.33<mailto:whjwo at 192.168.33.33>' uri: 'cid:whjwo at 192.168.33.33<mailto:cid%3Awhjwo at 192.168.33.33>' pidf_index: 0
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  PJSIP/192.168.33.31-00000005: PIDF-LO added with cid 'whjwo at 192.168.33.33<mailto:whjwo at 192.168.33.33>'
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  ix: 0 of 1 LocRef: cid:whjwo at 192.168.33.33<mailto:cid%3Awhjwo at 192.168.33.33>
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_geolocation.c:  PJSIP/192.168.33.31-00000005: Geolocation: <cid:whjwo at 192.168.33.33<mailto:cid%3Awhjwo at 192.168.33.33>>
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.472] DEBUG[1614] res_pjsip/pjsip_resolver.c: Performing SIP DNS resolution of target '192.168.33.31'
[08/10 15:04:12.472] DEBUG[1614] res_pjsip/pjsip_resolver.c: Transport type for target '192.168.33.31' is 'UDP transport'
[08/10 15:04:12.472] DEBUG[1614] res_pjsip/pjsip_resolver.c: Target '192.168.33.31' is an IP address, skipping resolution
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005 Event: TSX_STATE  Inv State: CALLING
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c: PJSIP/192.168.33.31-00000005: Source of transaction state change is TX_MSG
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c:
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005 TSX State: Calling  Inv State: CALLING
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c:  Nothing delayed
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005 TSX State: Calling  Inv State: CALLING
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c:  Topology: Pending:  <0:audio-0:audio:sendrecv (ulaw)>  Active: (null topology)
[08/10 15:04:12.472] DEBUG[1614] res_pjsip_session.c:
[08/10 15:04:12.472] DEBUG[1614] chan_pjsip.c:  RC: 0
[08/10 15:04:12.473] DEBUG[1613] res_pjsip/pjsip_distributor.c: Searching for serializer associated with dialog dlg0x7f19c80a2798 for Response msg 100/INVITE/cseq=21131 (rdata0x7f19b4001768)
[08/10 15:04:12.473] DEBUG[1613] res_pjsip/pjsip_distributor.c: Found serializer pjsip/outsess/192.168.33.31-000000a6 associated with dialog dlg0x7f19c80a2798
[08/10 15:04:12.473] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005 Method: INVITE Status: 100
[08/10 15:04:12.473] DEBUG[1614] res_pjsip_session.c:
[08/10 15:04:12.473] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005 TSX State: Proceeding  Inv State: CALLING
[08/10 15:04:12.473] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005: Response is 100 Trying
[08/10 15:04:12.473] DEBUG[1614] chan_pjsip.c:  PJSIP/192.168.33.31-00000005: Status: 100
[08/10 15:04:12.473] DEBUG[1614] chan_pjsip.c:  PJSIP/192.168.33.31-00000005: Not queueing anything
[08/10 15:04:12.473] DEBUG[1614] chan_pjsip.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.473] DEBUG[1614] chan_pjsip.c:  PJSIP/192.168.33.31-00000005: Status: 100
[08/10 15:04:12.473] DEBUG[1614] chan_pjsip.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.473] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005
[08/10 15:04:12.473] DEBUG[1614] res_pjsip_session.c:  Nothing delayed
[08/10 15:04:12.473] DEBUG[1614] res_pjsip_session.c:  PJSIP/192.168.33.31-00000005 TSX State: Proceeding  Inv State: CALLING
[08/10 15:04:12.473] DEBUG[1614] res_pjsip_session.c:  Topology: Pending:  <0:audio-0:audio:sendrecv (ulaw)>  Active: (null topology)
[08/10 15:04:12.473] DEBUG[1614] res_pjsip_session.c:

The SIP INVITE is as follows (all the civic address settings are blank, despite the AMI VarSet events showing the variables were set on the channel)

[08/10 15:04:12.472] VERBOSE[1614] res_pjsip_logger.c: <--- Transmitting SIP request (2265 bytes) to UDP:192.168.33.31:5060<http://192.168.33.31:5060> --->
INVITE sip:1234 at 192.168.33.31<mailto:sip%3A1234 at 192.168.33.31> SIP/2.0^M
Via: SIP/2.0/UDP 192.168.33.33:5060;rport;branch=z9hG4bKPj37ef75eb-0ddc-4802-baa7-0921ff30ff8a^M
From: "John Smith" <sip:8005551234 at 192.168.33.33<mailto:sip%3A8005551234 at 192.168.33.33>>;tag=1720fabc-afd7-46ad-aa08-ff84140a7add^M
To: <sip:1234 at 192.168.33.31<mailto:sip%3A1234 at 192.168.33.31>>^M
Contact: <sip:asterisk at 192.168.33.33:5060<http://sip:asterisk@192.168.33.33:5060>>^M
Call-ID: c0a41f60-08d7-43e3-9901-39860a8001f5^M
CSeq: 21131 INVITE^M
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER^M
Supported: 100rel, timer, replaces, norefersub, histinfo^M
Session-Expires: 1800^M
Min-SE: 90^M
Geolocation: <cid:whjwo at 192.168.33.33<mailto:cid%3Awhjwo at 192.168.33.33>>^M
Geolocation-Routing: no^M
Max-Forwards: 70^M
User-Agent: Asterisk PBX 18.14.0-rc1^M
Content-Type: multipart/mixed;boundary=8542a9ce-7ac4-47f7-8c17-d42771ebd564^M
Content-Length:  1470^M
^M
^M
--8542a9ce-7ac4-47f7-8c17-d42771ebd564^M
Content-Type: application/sdp^M
Content-Length:   181^M
^M
v=0^M
o=- 823099435 823099435 IN IP4 192.168.33.33^M
s=Asterisk^M
c=IN IP4 192.168.33.33^M
t=0 0^M
m=audio 17214 RTP/AVP 0^M
a=rtpmap:0 PCMU/8000^M
a=ptime:20^M
a=maxptime:150^M
a=sendrecv^M
^M
--8542a9ce-7ac4-47f7-8c17-d42771ebd564^M
Content-ID: <whjwo at 192.168.33.33<mailto:whjwo at 192.168.33.33>>^M
Content-Type: application/pidf+xml^M
Content-Length:  1009^M
^M
<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:gbp="urn:ietf:params:xml:\
ns:pidf:geopriv10:basicPolicy" xmlns:gml="http://www.opengis.net/gml" xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" xmlns:gs="http://www.opengis.net/pidflo/1.0" xmlns:date="http://exslt.org/dates-and-times" entity="IS_prof_9">
  <dm:device>
    <gp:geopriv>
      <gp:location-info>
        <ca:civicAddress xml:lang="en">
          <ca:country/>
          <ca:A1/>
          <ca:A2/>
          <ca:A3/>
          <ca:HNO/>
          <ca:RD/>
          <ca:STS/>
          <ca:PC/>
        </ca:civicAddress>
      </gp:location-info>
      <gp:usage-rules>
        <gp:retransmission_allowed>yes</gp:retransmission_allowed>
      </gp:usage-rules>
    </gp:geopriv>
    <dm:timestamp>2022-08-10T20:04:12Z</dm:timestamp>
  </dm:device>
</presence>
^M
--8542a9ce-7ac4-47f7-8c17-d42771ebd564--^M


From: asterisk-users <asterisk-users-bounces at lists.digium.com<mailto:asterisk-users-bounces at lists.digium.com>> On Behalf Of George Joseph
Sent: Wednesday, August 10, 2022 1:34 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com<mailto:asterisk-users at lists.digium.com>>
Subject: Re: [External] [asterisk-users] [External] [External] [External] Geo location 18.14.0-rc1 question



On Wed, Aug 10, 2022 at 11:25 AM Dan Cropp <dan at amtelco.com<mailto:dan at amtelco.com>> wrote:
Thank you George.

Looking forward to working with the changes.  I will retrieve them when the next release candidate comes out.


A quick question on using variables to pass custom Geo Location settings on via an AMI Originate.


If my AMI originate request looks something like this…
Action: Originate
Channel: PJSIP/1234 at 192.168.x.x<mailto:PJSIP/1234 at 192.168.x.x>
Exten: createcall
Context: mycontext
Priority: 1
Timeout: 60000
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
Async: true

Do I need to program the location_variables in the profile like this?

[1]
type = profile
pidf_element = device
profile_action = discard_incoming
usage_rules = retransmission_allowed=yes
location_variables = country=${_MY_GEO_COUNTRY}
location_variables = A1=${_MY_GEO_NATIONAL_SUBDIVISION}
location_variables = A2=${_MY_GEO_NATSUB}
location_variables = A3=${_MY_GEO_CITY}
location_variables = HNO=${_MY_GEO_HNO}
location_variables = RD=${_MY_GEO_RD}
location_variables = STS=${_MY_GEO_STS}
location_variables = PC=${_MY_GEO_PC}

Or would I need to program the location_info_refinements in the profile to use those variables?

location_info_refinement is what you want.  location_variables defines new variables to use in addition to those on the channel.  You'd use these if you had variables that for some reason you didn't want on the channel itself.

However...   The profile you defined above doesn't have a location reference to refine so you'd need at least a dummy location with a format of civicAddress.

[mylog]
type = location
format = civicAddress

Then in your profile...
[1]
type = profile
pidf_element = device
profile_action = discard_incoming
usage_rules = retransmission_allowed=yes
location_reference = myloc
location_variables = country=${_MY_GEO_COUNTRY}
location_variables = A1=${_MY_GEO_NATIONAL_SUBDIVISION}
...

You can also do this which might actually be faster...
[mylog]
type = location
format = civicAddress
location_info = country=${_MY_GEO_COUNTRY}, A1=${_MY_GEO_NATIONAL_SUBDIVISION}
location_info = A2=${_MY_GEO_NATSUB}, ...

[1]
type = profile
pidf_element = device
profile_action = discard_incoming
usage_rules = retransmission_allowed=yes
location_reference = myloc

This way you don't need to use location_info_refinement at all.
IIRC this saves having to parse location_info_refinement and bounce it against
the original location_info which could be empty.







Dan


From: asterisk-users <asterisk-users-bounces at lists.digium.com<mailto:asterisk-users-bounces at lists.digium.com>> On Behalf Of George Joseph
Sent: Wednesday, August 10, 2022 8:58 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com<mailto:asterisk-users at lists.digium.com>>
Subject: Re: [External] [asterisk-users] [External] [External] Geo location 18.14.0-rc1 question

Sorry for the delay but this turned out to be a bit more complex than I anticipated.
There are reviews up on Gerrit for the 16 and 18 branches that address the issues below as well as clean up the implementation, plug some memory leaks, etc.
16: https://gerrit.asterisk.org/c/asterisk/+/18896
18: https://gerrit.asterisk.org/c/asterisk/+/18897

I anticipate these will make it into the next set of release candidates which are due to be cut tomorrow.

Give them a try.

On Wed, Aug 3, 2022 at 1:51 PM George Joseph <gjoseph at sangoma.com<mailto:gjoseph at sangoma.com>> wrote:
Looks like it'll be tomorrow before I can get the patch up.  I ran into some strange issues.

On Tue, Aug 2, 2022 at 1:43 PM Dan Cropp <dan at amtelco.com<mailto:dan at amtelco.com>> wrote:
Thank you George

From: asterisk-users <asterisk-users-bounces at lists.digium.com<mailto:asterisk-users-bounces at lists.digium.com>> On Behalf Of George Joseph
Sent: Tuesday, August 2, 2022 2:40 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com<mailto:asterisk-users at lists.digium.com>>
Subject: Re: [External] [asterisk-users] [External] Geo location 18.14.0-rc1 question



On Tue, Aug 2, 2022 at 1:35 PM George Joseph <gjoseph at sangoma.com<mailto:gjoseph at sangoma.com>> wrote:


On Tue, Aug 2, 2022 at 1:13 PM Dan Cropp <dan at amtelco.com<mailto:dan at amtelco.com>> wrote:
Is the allow_routing setting on the geolocation Wiki Profile also not fully implemented?

Well, 99% of the code is there.  The 1% is parsing the config option.  Not sure how I missed that.
I'll have a patch up first thing in the morning UTC-6.
I'll call it "allow_use_for_routing" in profile.

Actually just "allow_routing_use"



In the code, I see geolocation_routing used instead of allow_routing.

Tried both and Asterisk indicates it cannot find suitable setting so it doesn’t create the profile object.

Dan

From: Dan Cropp
Sent: Tuesday, August 2, 2022 10:04 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com<mailto:asterisk-users at lists.digium.com>>
Subject: RE: [External] [asterisk-users] Geo location 18.14.0-rc1 question

Thank you George.

From: asterisk-users <asterisk-users-bounces at lists.digium.com<mailto:asterisk-users-bounces at lists.digium.com>> On Behalf Of George Joseph
Sent: Tuesday, August 2, 2022 9:57 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com<mailto:asterisk-users at lists.digium.com>>
Subject: Re: [External] [asterisk-users] Geo location 18.14.0-rc1 question



On Tue, Aug 2, 2022 at 8:46 AM Dan Cropp <dan at amtelco.com<mailto:dan at amtelco.com>> wrote:
I believe I have everything configured correctly, but Asterisk is complaining about my configuration

It is complaining about confidence settings.

From the Asterisk Geolocation Implementation Wiki, I believe I have this set correctly.


Sub-parameters:

  *   value: A percentage indicating the confidence or "unknown".
  *   pdf: "unknown", "normal" or "rectangular"
Example: confidence = value=80, pdf=unknown
If no confidence parameter is specified, the default is 95%.
See RFC7459<https://wiki.asterisk.org/wiki/display/AST/Geolocation+Reference+Information#GeolocationReferenceInformation-rfc7459> for the exact definition of this parameter.


[08/02 09:30:03.724] ERROR[682944] config_options.c: Could not find option suitable for category 'IS_loc_1' named 'confidence' at line 12 of
[08/02 09:30:03.724] ERROR[682944] res_sorcery_config.c: Could not create an object of type 'location' with id 'IS_loc_1' from configuration file 'geolocation.conf'

[IS_loc_1]
type = location
format = civicAddress
confidence = value=95, pdf=unknown
location_info = country=US,A1=Wisconsin,A3=Madison
location_info = HNO=4800,RD=Main,STS=Drive,PC=53704

Remove the confidence param for now.    I documented it before I implemented it. :)



Also seeing problems with location_refinement setting.
Again, I believe my setting matches what is on the Asterisk Geolocation Implementation wiki.

[08/02 09:30:03.724] ERROR[682944] config_options.c: Could not find option suitable for category 'IS_prof_20' named 'location_refinement' at line 56 of
[08/02 09:30:03.724] ERROR[682944] res_sorcery_config.c: Could not create an object of type 'profile' with id 'IS_prof_20' from configuration file 'geolocation.conf'

[IS_prof_20]
type = profile
profile_action = prefer_incoming
pidf_element = person
usage_rules = retransmission_allowed=no
location_reference = IS_loc_22
location_refinement = ROOM=292
location_refinement = FLR=1

Pffft.  I renamed this to "location_info_refinement" to better match the "location_info" parameter in the Location object.  I forgot to rename it in the wiki documentation.  If you just change the name it should work.





Dan
--
_____________________________________________________________________
-- 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
--
_____________________________________________________________________
-- 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
--
_____________________________________________________________________
-- 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
--
_____________________________________________________________________
-- 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
--
_____________________________________________________________________
-- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20220812/9f479f93/attachment-0001.html>


More information about the asterisk-users mailing list