<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px"><div id="yui_3_16_0_1_1451473382024_2530" dir="ltr">Good evening.</div><div id="yui_3_16_0_1_1451473382024_2499" dir="ltr">I have succesfully configured mod_callcenter (queue, agent and tiers) in my freeswtich with agent behing a trunk sip (all the extension are reachable from FS but are not registered in it), all work as intended.<br></div><div id="yui_3_16_0_1_1451473382024_2548" dir="ltr">So the simple configuration of the agent is:</div><div id="yui_3_16_0_1_1451473382024_2549" dir="ltr">&nbsp;&nbsp;&nbsp; &lt;agent name="agent999" type="callback" contact="[call_timeout=10]sofia/gateway/gatewayName/999" status="Logged Out" max-no-answer="3" wrap-up-time="10" reject-delay-time="30" busy-delay-time="60" no-answer-delay-time="10" /&gt;</div><div id="yui_3_16_0_1_1451473382024_2529" dir="ltr">All work well and i get the right agent status and agent state.</div><div id="yui_3_16_0_1_1451473382024_3012" dir="ltr"><br></div><div id="yui_3_16_0_1_1451473382024_2643" dir="ltr">But this work only for the inbound call routed to freeswitch, i haven't any information abount agent independent presence (For Example: if the agent dial and is in call with another agent) .</div><div id="yui_3_16_0_1_1451473382024_2742" dir="ltr">So the internal database "think" that the agent is available and ready even if is in call and busy so the mod try to invite him obviously whitout success.<br></div><div id="yui_3_16_0_1_1451473382024_3030" dir="ltr"><br></div><div id="yui_3_16_0_1_1451473382024_2815" dir="ltr">I&nbsp; try in the gateway to subscribe whit the presence of remote agent, and in some way update internal database with script lua or event_socket</div><div id="yui_3_16_0_1_1451473382024_3068" dir="ltr">&lt;include&gt;<br class="" id="yui_3_16_0_1_1451473382024_3067">&nbsp; &lt;gateway name="server_gw"&gt;</div><div id="yui_3_16_0_1_1451473382024_3078" dir="ltr">&nbsp;&nbsp;&nbsp;&nbsp;&lt;param value="no-reg" name="username"/&gt;<br class="" id="yui_3_16_0_1_1451473382024_3102">&nbsp;&nbsp;&nbsp; &lt;param value="server.org" name="realm"/&gt;<br class="" id="yui_3_16_0_1_1451473382024_3104">&nbsp;&nbsp;&nbsp; &lt;param value="no-reg" name="password"/&gt;<br class="" id="yui_3_16_0_1_1451473382024_3106">&nbsp;&nbsp;&nbsp; &lt;param value="10.0.80.10:5060" name="proxy"/&gt;<br></div><div id="yui_3_16_0_1_1451473382024_2866" dir="ltr">&nbsp;&nbsp;&nbsp; &lt;subscriptions&gt;<br class="" id="yui_3_16_0_1_1451473382024_2853">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;subscription event="presence"&gt;<br class="" id="yui_3_16_0_1_1451473382024_2855">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param name="content-type" value="application/pidf+xml"/&gt;<br class="" id="yui_3_16_0_1_1451473382024_2857">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param name="expire-seconds" value="60"/&gt;<br class="" id="yui_3_16_0_1_1451473382024_2859">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param name="retry-seconds" value="30"/&gt;<br class="" id="yui_3_16_0_1_1451473382024_2861">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param name="username-in-request" value="true"/&gt;<br class="" id="yui_3_16_0_1_1451473382024_2863">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/subscription&gt;<br class="" id="yui_3_16_0_1_1451473382024_2865">&nbsp;&nbsp;&nbsp; &lt;/subscriptions&gt;</div><div id="yui_3_16_0_1_1451473382024_2867" dir="ltr">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br></div><div id="yui_3_16_0_1_1451473382024_2882" dir="ltr">I haven't found a way to subiscribe and receive the notifiy and publish event of prencence in the gateway (trunk sip) for a specific group of agent, in my example the extension 999 behind the trunk (but ideally all my call center agent), the subscribe is from and to "no-reg" for a contact gw+server_gw, i need to subscribe to someting like 999@server.org<br></div><div id="yui_3_16_0_1_1451473382024_3291" dir="ltr"><br></div>&nbsp; SUBSCRIBE sip:sa@server.org:5060 SIP/2.0<br class="" id="yui_3_16_0_1_1451473382024_3253">&nbsp;&nbsp; Via: SIP/2.0/UDP 10.1.10.82:5080;rport;branch=z9hG4bKU3DyKZaHrg24p<br class="" id="yui_3_16_0_1_1451473382024_3255">&nbsp;&nbsp; Max-Forwards: 70<br class="" id="yui_3_16_0_1_1451473382024_3257">&nbsp;&nbsp; From: &lt;sip:no-reg@10.0.80.10:5060&gt;;tag=K3N8p1cKmS1vm<br class="" id="yui_3_16_0_1_1451473382024_3259">&nbsp;&nbsp; To: &lt;sip:no-reg@10.0.80.10:5060&gt;;tag=e340d29f4e69500c4c17ab56fb041ae6-7cd3<br class="" id="yui_3_16_0_1_1451473382024_3261">&nbsp;&nbsp; Call-ID: 1db94e51-298b-1234-1493-005056963714<br class="" id="yui_3_16_0_1_1451473382024_3263">&nbsp;&nbsp; CSeq: 85401361 SUBSCRIBE<br class="" id="yui_3_16_0_1_1451473382024_3265"><div id="yui_3_16_0_1_1451473382024_3329" dir="ltr">&nbsp;&nbsp; Contact: &lt;sip:gw+server_gw@10.1.10.82:5080;transport=udp;gw=server_gw&gt;</div>&nbsp;&nbsp; Expires: 60<br class="" id="yui_3_16_0_1_1451473382024_3269">&nbsp;&nbsp; User-Agent: FreeSWITCH-mod_sofia/1.7.0+git~20151210T010223Z~85f8bca628~64bit<br class="" id="yui_3_16_0_1_1451473382024_3271">&nbsp;&nbsp; Accept: application/pidf+xml<br class="" id="yui_3_16_0_1_1451473382024_3273">&nbsp;&nbsp; Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY<br class="" id="yui_3_16_0_1_1451473382024_3275">&nbsp;&nbsp; Supported: timer, path, replaces<br class="" id="yui_3_16_0_1_1451473382024_3277">&nbsp;&nbsp; Event: presence<br class="" id="yui_3_16_0_1_1451473382024_3279">&nbsp;&nbsp; Content-Length: 0<br class="" id="yui_3_16_0_1_1451473382024_3281"><div dir="ltr"></div><div id="yui_3_16_0_1_1451473382024_3190" dir="ltr"><br></div><div id="yui_3_16_0_1_1451473382024_3251" dir="ltr"><br></div><div id="yui_3_16_0_1_1451473382024_2892" dir="ltr">There is way to subscribe through a trunk for presence or generate it via mod_event_socket ( i found only the NOTIFY event and not for SUBSCRIBE <a id="yui_3_16_0_1_1451473382024_2948" href="https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#sendevent),">https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#sendevent),</a> or there are any other tools to probe the presence and don't do a "polling of busy call" for a call center application?</div><div id="yui_3_16_0_1_1451473382024_2961" dir="ltr">thank you for all, and thanks indeed for the help receveived in the past month.<br></div><div id="yui_3_16_0_1_1451473382024_3000" dir="ltr">Emiliano Olivier<br></div><div id="yui_3_16_0_1_1451473382024_2405"><br></div></div></body></html>