Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - oldbay

Pages: [1]
1
hi oldbay,
i had the same kind of question a few days back but now i just did it.
got to register.conf and edit the below context accordingly

[user.auth]

query=SELECT secret FROM sip_users WHERE username='${username}' AND secret IS NOT NULL
result=secret

Тhank you very much for your reply! :)

2
Forom regfile.conf use:

Code: [Select]
[user1]
password=123
caller=FirstName1 LastName1

[user2]
password=123
caller=FirstName2 LastName2

As a result: data from "caller" visible in called client by call

How make this from use register.conf at authorization on database?

3
Features requests / Re: jingle calls to sip conference
« on: September 18, 2013, 05:34:10 AM »
Hi,

http://docs.yate.ro/wiki/Jabber_Client_With_Jingle_Yate_Server contains directions to setup yate server (not yate jabber server) using jabber client and jingle to connect to google voice.
Understood, thanks!

I suppose you want to use youer own jabber server, so:
1. A yate instance running jabber server (no jingle or jabber client)
2. A yate instance running jabber client and jingle in client mode (and the conference, sip)
Made by this scheme, this woks!

Thank you very much for your help!

4
Features requests / Re: jingle calls to sip conference
« on: September 17, 2013, 02:33:46 AM »
marian, thank you very much for your reply!

jabberclient and jabberserver modules are not designed to run in the same time.
You might have some issues.
mmm, this solution: http://docs.yate.ro/wiki/Jabber_Client_With_Jingle_Yate_Server .... or I is misunderstood it

Run jabber server in a different yate instance.
You can use the -c command line option to use a different directory for configuration files.
OK! I use it.
you propose to do this:
1 process: jabber server + jingle client in server mode
2 process: jabber client + jingleclient in client mod -> roating to sip conference(sip server is running to thisprocess)
I understand you correctly?



5
Features requests / jingle calls to sip conference
« on: September 16, 2013, 06:20:26 AM »
try route jingle calls to sip conference, in local yate server.

Yate server and Yate client version 4.3.0
my configs:

(for start jabber client after jabber server)
yate.conf

Code: [Select]
[postload]
${modulepath}/client/jabberclient${modsuffix}=yes

(create jabber user on local Yate server for routing to sip conference)
accfile.conf

Code: [Select]
[testconf]
enabled=yes
protocol=jabber
username=test
domain=mydomain.org
password=123456
server=192.168.0.101
port=5222
resource=Yate

(routing process)
regexroute.conf

Code: [Select]
[extra]
call.execute=10

[call.execute]
${caller}=;caller=${callername}/Yate

[contexts]
${in_line}testconf=;called=800

[default]
^800$ = conf/test;lonely=true;billing=true;maxusers=200

(jabber and jangle settings)
jabberserver.conf
 
Code: [Select]
[general]
domains=mydomain.org

[listener s2s]
enable=yes
type=s2s
port=5269

[listener c2s]
enable=yes
type=c2s
address=192.168.0.101
port=5222

yjinglechan.conf

Code: [Select]
[general]
servermode=no

(authorization to db and roster works)

mysqldb.conf
Code: [Select]
[yate]
host=127.0.0.1
database=yate
user=root

register.conf
Code: [Select]
[general]
user.auth=yes
user.register=yes
user.unregister=yes
call.route=yes


[default]
priority=50
account=yate

[user.auth]
query=\
    SELECT password \
    FROM users \
    WHERE username='${username}' \
    AND password IS NOT NULL AND password<>''
result=password


[user.register]
query=\
    UPDATE users \
    SET \
        location='jingle/${data}',\
        expires=CURRENT_TIMESTAMP \
    WHERE username='${username}'


[user.unregister]
query=\
    UPDATE users \
    SET \
        location=NULL,\
        expires=NULL \
    WHERE expires IS NOT NULL \
    AND username='${username}'


[call.route]
query=\
    SELECT location,(CASE WHEN location IS NULL THEN 'offline' ELSE NULL END) AS error \
    FROM users \
    WHERE username='${called}@mydomain.org'

result=location


subscription.conf
Code: [Select]
[general]
account=yate

user_event_auth=\
    SELECT * \
    FROM subscriptions \
    WHERE notifier='${notifier}' \
    AND subscriber='${subscriber}' \
    AND event='${event}'

user_roster_load=\
    SELECT users.username, roster.* \
    FROM users \
    LEFT OUTER JOIN roster \
    ON users.username=roster.username \
    WHERE users.username='${username}'

user_roster_delete=\
    DELETE FROM roster \
    WHERE username='${username}'

contact_load=\
    SELECT * FROM roster \
    WHERE username='${username}' \
    AND contact='${contact}'

contact_subscription_set=\
    INSERT roster (username,contact,subscription) \
    VALUES (\
        '${username}',\
        '${contact}',\
        '${subscription}'\
        ) \
    ON DUPLICATE KEY UPDATE \
        subscription='${subscription}'

contact_set=\
    INSERT roster (username,contact,name,groups) \
    VALUES (\
        '${username}',\
        '${contact}',\
        '${name}',\
        '${groups}'\
        ) \
    ON DUPLICATE KEY UPDATE \
        name='${name}',\
        groups='${groups}'

contact_set_full=\
    INSERT roster (username,contact,name,groups,subscription) \
    VALUES (\
        '${username}',\
        '${contact}',\
        '${name}',\
        '${groups}',\
        '${subscription}'\
        ) \
    ON DUPLICATE KEY UPDATE \
        name='${name}',\
        groups='${groups}',\
        subscription='${subscription}'

contact_delete=\
    DELETE FROM roster \
    WHERE username='${username}' \
    AND contact='${contact}'


Thys works, if the Yate client was initially launched in servermode=yes yjinglechan.conf.
If you run the Yate client initially (servermode=no yjinglechan.conf), then: all yangle call menu in chat room(Yate client) is not active.

differences in loading Yate client in jingle (servermode=yes) and (servermode=no) following:

load Yate client in servermode=yes jingle server(yangle call menu in chat room is OK):

Code: [Select]
<jbclientengine:INFO> Processing event (0x1a02cf0,Iq)
<jabberclient:ALL> StreamData(virt@mydomain.org) removing request 3_3075589344_3955533617
<client:INFO> Dispatching 1 postponed messages
<client:ALL> Logic(default) account=jabber:virt@mydomain.org contact=test@mydomain.org instance=Yate operation=online
<client:INFO> Dispatching 1 postponed messages
<c2s/jabber:virt@mydomain.org:INFO> Receiving from 'mydomain.org' [0x7f4e30000b90]
-----
<iq type="result" to="virt@mydomain.org/Yate" id="xep01153955532891_1" from="abaev@mydomain.org/Yate">
  <query xmlns="http://jabber.org/protocol/disco#info" node="http://yate.null.ro/yate/client/caps#lmx2tY/vPVjFXPCKk/wo2OBY18Q=">
    <identity category="client" type="im" name=""/>
    <feature var="http://jabber.org/protocol/disco#info"/>
    <feature var="http://jabber.org/protocol/disco#items"/>
    <feature var="urn:xmpp:jingle:1"/>
    <feature var="urn:xmpp:jingle:errors:1"/>
    <feature var="urn:xmpp:jingle:apps:rtp:1"/>
    <feature var="urn:xmpp:jingle:apps:rtp:audio"/>
    <feature var="urn:xmpp:jingle:apps:rtp:info:1"/>
    <feature var="urn:xmpp:jingle:apps:rtp:errors:1"/>
    <feature var="urn:xmpp:jingle:transports:ice-udp:1"/>
    <feature var="urn:xmpp:jingle:transports:raw-udp:1"/>
    <feature var="urn:xmpp:jingle:transfer:0"/>
    <feature var="urn:xmpp:jingle:dtmf:0"/>
    <feature var="urn:xmpp:jingle:apps:file-transfer:1"/>
    <feature var="http://www.google.com/session"/>
    <feature var="http://www.google.com/session/phone"/>
    <feature var="http://www.google.com/transport/p2p"/>
    <feature var="http://jabber.org/protocol/jingle/info/dtmf"/>
    <feature var="jabber:iq:roster"/>
    <feature var="jabber:iq:private"/>
    <feature var="vcard-temp"/>
    <feature var="jabber:iq:version"/>
    <feature var="http://jabber.org/protocol/caps"/>
  </query>
</iq>
-----
<jbclientengine:INFO> Processing event (0x1a59060,Iq)
<client:INFO> Dispatching 2 postponed messages
<client:ALL> Logic(default) account=jabber:virt@mydomain.org contact=abaev@mydomain.org instance=Yate operation=updatecaps
<client:ALL> Logic(default) account=jabber:virt@mydomain.org contact=test@mydomain.org instance=Yate operation=updatecaps
<client:ALL> Logic(clientarchive) exitingClient() [0x7f4e5679d8e0]
<client:ALL> Logic(default) exitingClient() [0x13bb0c0]
<client:INFO> Removing logic 0x13bb0c0 name=default
<client:ALL> Destroyed client account=(null) [0x13bb460]
<client:ALL> Destroyed client account=jabber:virt@mydomain.org [0x1984eb0]
<client:ALL> Destroyed client account=sip:virt@10.25.100.242 [0x198dcc0]
<client:ALL> ClientLogic(default) destroyed [0x13bb0c0]
<jingle:ALL> YJGEngineWorker stop running
<sip:ALL> Returning false from engine.stop handler
<h323:ALL> Returning false from engine.stop handler
<ALL> Engine stopped running
<ALL> EngineThread::cleanup() [0x11ada70]
Yate engine is shutting down with code 0
<c2s/jabber:virt@mydomain.org:ALL> Terminate by 'local' state=Running destroy=1 error=system-shutdown reason='(null)' final=0 [0x7f4e30000b90]
<c2s/jabber:virt@mydomain.org:INFO> Sending to 'mydomain.org' [0x7f4e30000b90]


load Yate client in servermode=no jingle server(yangle call menu in chat room is not active):

Code: [Select]
<jbclientengine:INFO> Processing event (0x7fd750047c50,Iq)
<jabberclient:ALL> StreamData(virt@mydomain.org) removing request 3_3075589344_3955901165
<client:INFO> Dispatching 2 postponed messages
<client:ALL> Logic(default) account=jabber:virt@mydomain.org contact=test@mydomain.org instance=Yate operation=online
<c2s/jabber:virt@mydomain.org:INFO> Receiving from 'mydomain.org' [0x7fd74c000c00]
-----
<iq type="result" id="xep01153955900419_1" from="abaev@mydomain.org/Yate">
  <query xmlns="http://jabber.org/protocol/disco#info" node="http://yate.null.ro/yate/client/caps#lmx2tY/vPVjFXPCKk/wo2OBY18Q="/>
</iq>
-----
<jbclientengine:INFO> Processing event (0x7fd750047c50,Iq)
<client:ALL> Logic(clientarchive) exitingClient() [0x7fd7721fb8e0]
<client:ALL> Logic(default) exitingClient() [0x19aa0c0]
<client:INFO> Removing logic 0x19aa0c0 name=default
<client:ALL> Destroyed client account=(null) [0x19aa460]
<client:ALL> Destroyed client account=jabber:virt@mydomain.org [0x1f74950]
<client:ALL> Destroyed client account=sip:virt@10.25.100.242 [0x1f7d900]
<client:ALL> ClientLogic(default) destroyed [0x19aa0c0]
<jingle:ALL> YJGEngineWorker stop running
<sip:ALL> Returning false from engine.stop handler
<h323:ALL> Returning false from engine.stop handler
<ALL> Engine stopped running
<ALL> EngineThread::cleanup() [0x179ca70]
Yate engine is shutting down with code 0
<c2s/jabber:virt@mydomain.org:ALL> Terminate by 'local' state=Running destroy=1 error=system-shutdown reason='(null)' final=0 [0x7fd74c000c00]
<c2s/jabber:virt@mydomain.org:INFO> Sending to 'mydomain.org' [0x7fd74c000c00]

Any ideas?

p.s:
I can not use mode (servermode=no yjinglechan.conf), in this mode not working routing calls from jabber client to sip conference - get error:

Code: [Select]
<jbclientengine:INFO> Processing event (0xcfcda0,Iq)
<jbserverengine:ALL> Processing jabber.iq from=virt@mydomain.org/Yate to=test@mydomain.org/Yate
<c2s/testconf:INFO> Receiving from 'mydomain.org' [0x7f7a70000b90]
-----
<iq type="set" from="virt@mydomain.org/Yate" to="test@mydomain.org/Yate" id="JG1_647528233_1">
  <jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" type="session-initiate" initiator="virt@mydomain.org/Yate" responder="test@mydomain.org/Yate" sid="JG1_647528233">
    <content name="jingle/1_content_816648188" creator="initiator" senders="both">
      <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio">
        <payload-type id="0" name="PCMU" clockrate="8000"/>
        <payload-type id="8" name="PCMA" clockrate="8000"/>
        <payload-type id="101" name="telephone-event" clockrate="8000"/>
      </description>
      <transport xmlns="urn:xmpp:jingle:transports:raw-udp:1">
        <candidate component="1" generation="0" id="jingle/1_candidate_394773490" ip="10.25.100.242" port="30376"/>
      </transport>
    </content>
    <content name="jingle/1_content_22737225" creator="initiator" senders="both">
      <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio">
        <payload-type id="0" name="PCMU" clockrate="8000"/>
        <payload-type id="8" name="PCMA" clockrate="8000"/>
        <payload-type id="101" name="telephone-event" clockrate="8000"/>
      </description>
      <transport xmlns="urn:xmpp:jingle:transports:ice-udp:1" pwd="1031297645908646794750" ufrag="2050"/>
    </content>
  </jingle>
</iq>
-----
<jbclientengine:INFO> Processing event (0xcfcda0,Iq)
<jbserverengine:ALL> Processing jabber.iq from=virt@mydomain.org/Yate to=test@mydomain.org/Yate
<c2s/testconf:INFO> Receiving from 'mydomain.org' [0x7f7a70000b90]
-----
<iq type="set" from="virt@mydomain.org/Yate" to="test@mydomain.org/Yate" id="JG1_647528233_1">
  <jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" type="session-initiate" initiator="virt@mydomain.org/Yate" responder="test@mydomain.org/Yate" sid="JG1_647528233">
    <content name="jingle/1_content_816648188" creator="initiator" senders="both">
      <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio">
        <payload-type id="0" name="PCMU" clockrate="8000"/>
        <payload-type id="8" name="PCMA" clockrate="8000"/>
        <payload-type id="101" name="telephone-event" clockrate="8000"/>
      </description>
      <transport xmlns="urn:xmpp:jingle:transports:raw-udp:1">
        <candidate component="1" generation="0" id="jingle/1_candidate_394773490" ip="10.25.100.242" port="30376"/>
      </transport>
    </content>
    <content name="jingle/1_content_22737225" creator="initiator" senders="both">
      <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio">
        <payload-type id="0" name="PCMU" clockrate="8000"/>
        <payload-type id="8" name="PCMA" clockrate="8000"/>
        <payload-type id="101" name="telephone-event" clockrate="8000"/>
      </description>
      <transport xmlns="urn:xmpp:jingle:transports:ice-udp:1" pwd="1031297645908646794750" ufrag="2050"/>
    </content>
  </jingle>
</iq>
-----
<jbclientengine:INFO> Processing event (0xcfcda0,Iq)
<jbserverengine:ALL> Processing jabber.iq from=virt@mydomain.org/Yate to=test@mydomain.org/Yate
<c2s/testconf:INFO> Receiving from 'mydomain.org' [0x7f7a70000b90]
-----
<iq type="set" from="virt@mydomain.org/Yate" to="test@mydomain.org/Yate" id="JG1_647528233_1">
  <jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" type="session-initiate" initiator="virt@mydomain.org/Yate" responder="test@mydomain.org/Yate" sid="JG1_647528233">
    <content name="jingle/1_content_816648188" creator="initiator" senders="both">
      <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio">
        <payload-type id="0" name="PCMU" clockrate="8000"/>
        <payload-type id="8" name="PCMA" clockrate="8000"/>
        <payload-type id="101" name="telephone-event" clockrate="8000"/>
      </description>
      <transport xmlns="urn:xmpp:jingle:transports:raw-udp:1">
        <candidate component="1" generation="0" id="jingle/1_candidate_394773490" ip="10.25.100.242" port="30376"/>
      </transport>
    </content>
    <content name="jingle/1_content_22737225" creator="initiator" senders="both">
      <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio">
        <payload-type id="0" name="PCMU" clockrate="8000"/>
        <payload-type id="8" name="PCMA" clockrate="8000"/>
        <payload-type id="101" name="telephone-event" clockrate="8000"/>
      </description>
      <transport xmlns="urn:xmpp:jingle:transports:ice-udp:1" pwd="1031297645908646794750" ufrag="2050"/>
    </content>
  </jingle>
</iq>

this message loops, to stop it - require stopping Yate server.

p.s.s:
sorry for my english

Pages: [1]