General Category > Yate users hangout place

simple sip phone dial

(1/4) > >>

jehanzaib_kiani:
Hi team,

i have used db to register my sip users. this works fine. but when i try to dial this user it does not route and says NOT FOUND.
[user.register]
; Query for the user.register message
query=UPDATE sip_users SET fullcontact='${data}',expires=DATE_ADD(NOW(), INTERVAL ${expires} SECOND) WHERE username='${username}'


i have user 100 is regsiter and calling 100. here is my route.php. the script is run and i see it set the line but dont route and say 404 Not found.

         if ($ev->getValue("called")=="100") {
           $ev->retval = "sip/".$ev->getValue("called");
           $ev->params["line"] = "100";
           //$ev->params["targetid"] = $ev->getValue("callid");
           $ev->handled = true;
           $ev->Acknowledge();
           break;
         }


here r logs
  param['rtp_forward'] = 'possible'
  param['handlers'] = 'register:50,regexroute:100,cdrbuild:50,register:50,route.php:80,gvoice:20,queues:45,yrtp:50,cdrbuild:50,lateroute:75,dbwave:90,analyzer:90,iax:90,tone:90,conf:90,dumb:90,filetransfer:90,sip:90,wave:90,callfork:100,extmodule:100,pbx:100,callgen:100,moh:100,park:100'
  param['line'] = '100'
  param['targetid'] = 'sip/4c578f4d7a34f816/e9155934/'
  param['callto'] = 'sip/100'
  param['error'] = 'offline'

marian:
The register module has its own route handler which route the call to registered user location when the called number matches the registered username.
All you have to do is to remove comments (the ; char) in register.conf, [call.route] section and enable the handler in register.conf:
[general]
call.route=yes

NOTE: A line (used to route calls to it) is an user yate registers to another entity. E.g. yate is the client (user) of another server.

marian:
Looking at your post I noticed you are using different names for table and location field.
Change them in [call.route] also.

jehanzaib_kiani:
should i put ${data} in the location field? currently i am not using location.

marian:
Yes. 'location' is the default field name.

NOTE: You can put ${data} in any database field you want as long as you properly return it when routing.

Navigation

[0] Message Index

[#] Next page

Go to full version