is it possible to redirect all incoming calls to one specific sip account? I already did this with Asterisk adding line
exten => _[1-9]XXX,1,DIAL(SIP/3000)
to extentions.conf and now I am looking for the way how to do the same in Kamailio. But I am not experienced in Kamailio and I am not sure how to accomplish this goal. Should I modify Routing Logic section in kamailio.cfg or should I use some module like dialplan.so, uac.so or some similar one?
I am using Kamailio 5.4.4 and MariaDB 10.3.
I would appreciate any help
Thank you
Update 1: I tried to use module uac.so and function uac_replace_to.
In Global parameter section, I loaded module using modparam ("rr", "append_fromtag", 1) and loadmodule "uac.so".
In Routing Logic, I modified
if (is_method("INVITE")) {
setflag(FLT_ACC);
}
to
if (is_method("INVITE")) {
uac_replace_to("","sip:3000#192.168.20.199");
setflag(FLT_ACC);
}
But it's not working.
Sure it is possible
see sample kamailio file
https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg
in route PSTN near line 938
If you need forward to account registered on kamailio, see route LOCATION
Unfortanly kamailio is not asterisk and you need do handling for all other sip messages too.
Related
i'm trying to make a custom email configuration in the service provider, and when trying to send an email i got this error Argument 1 passed to Illuminate\Mail\MailManager::getConfig() must be of the type string, null given (src/Illuminate/Mail/MailManager.php on line 108 )
When posting a question like this, you'll get much better responses if you supply more context, for example:
The line of code that is calling getConfig() and the lines that define relevant variables just before that.
According to the documentation, it looks like you need to set the following in your project's .env file:
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=hello#example.com
MAIL_FROM_NAME="Example app"
Some ideas on the road to fixing it:
I would check everywhere for typos and spelling errors.
Clear the config: php artisan config:clear
Does every environment variable match the server your trying to send through? Note that if you're using a free SMTP server like Gmail you'll need to make many adjustments to your account before you can send... Probably use something like SendGrid if you don't know how to set this up yourself.
I would make sure that you're able to use telnet mail.example.com 587 and get a HELO from the SMTP server.
Try whatever other steps you can think of for troubleshooting then update your post with more complete information.
Good luck.
I am new to Freeswitch.
I have successfully connected two FSs. First FS redirects to second FS.
Now I would like to get the information about the SIP invite; whether it is received at 2nd FS or not programmatically, when call is made to 1st FS. I am open to scripting option as well apart from configuring the xml files.
You can write script which will listen for channel states on ESL interface of second Freeswitch, when call will hit extension of it you should get CHANNEL_CREATE event:
https://wiki.freeswitch.org/wiki/Event_List#Channel_events
More about ESL:
https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket
Is there anybody uses them both? I need IronRouter for server side, RestApi and Flow Router I was using before, so I can get rid of it but I do not want.
But I don't like this sh from Iron Router right now for every my Flow Router page.
Oops, looks like there's no route on the client or the server for url: "http://localhost:3000/."
How to do not show it.
As you are already familiar with FlowRoute and want server side route for your API, you can use Picker. It's from the same author of FlowRouter. So you should face no problem using along with the flowrouter. and it's also easy to use.
https://github.com/meteorhacks/picker
How can i connect xmpp windows live messenger with php? I am using xmpphp and jaxl library and I connected with google talk sucsessfully.
Jaxl library comes with inbuilt support for PLAIN, google talk X-OAUTH2, DIGEST-MD5, CRAM-MD5, SCRAM-SHA-1, EXTERNAL and facebook X-FACEBOOK-PLATFORM authentication mechanisms.
It does also provide ability to implement any custom authentication mechanism that you might need inside your application. Implementing X-MESSENGER-OAUTH2 authentication should be easy as described below:
Checkout latest version of JAXL library and initialize your JAXL client object as follows:
require_once 'jaxl.php';
$client = new JAXL(array(
'jid' => 'messenger.live.com', // <-- dummy jid required for DNS SRV lookup
'pass' => '',
'log_level' => JAXL_DEBUG
));
Register callback for on_stream_features event as shown below and send auth packet as described in msdn documentation:
$client->add_cb('on_stream_features', function($stanza) {
global $client, $access_token;
$auth = new JAXLXml('auth', NS_SASL, array('mechanism'=>'X-MESSENGER-OAUTH2'));
$auth->t($access_token);
$client->send($auth);
return 'wait_for_sasl_response';
});
This should get you going.
Note: Currently version of Jaxl library rely on input jabber id for DNS SRV lookup, from where it extracts target host:port for establishing socket connection. Hence you will have to pass dummy values for jid and pass as shown above (until this gets fixed in future versions).
I have written above steps without any testing, but it should work fine. More details on how to work with JAXLXml style of XML creation can be found here.
I've same problem like here. But still not able to solve it.
I've followed steps from here. but doing so doesn't sends mail.
The log file says: Mail is sent. but at the other side mail is not received.
Any ideas why?
Check your SMTP settings and make sure you have defined the right settings for your e-mail host. If you are using a sender e-mail other than Gmail then your settings will be different to the ones used in the Railscast.
The file to check is here: config/initializers/setup_mail.rb.
Edit: It still may be possible that the settings you used in jsp may not match perfectly with the 'phrasing' that Rails expects in the setup_mail.rb file. I have frequently come up against this problem where a slight difference in what SMTP settings you mention / don't mention / how they are worded will determine whether the e-mails send/receive or not.
If your logs show the e-mail is sending to a valid e-mail address (and you are not receiving those e-mails in your inbox or spam filter) then the problem, as far as I know, is most likely to be your SMTP. My advice is to check online for the Rails-specific SMTP settings for your e-mail provider, or in the case that you cannot find them, try different combinations until you find the correct one.
Okay the problem is solved. Problem was my file corresponding to action was not at proper place. Here is quick view on how to do it:
Add following to actionmailer:-
def send_mail
attachments['1.pdf'] = File.read('c:/1.pdf')
mail(:to => "harsh#xyz.com", :subject => "xyz", :from=>"harsh#xyz.com")
mail.deliver
end
Notes:- Make sure that the smtp settings are correct and the file corresponding to the action (In this example send_mail.rhtml) is present under appropriate folder.