Change incoming sip uri from AsteriskNow to e.164 format - asterisk

I write an IVR using UCMA, When I want to transfer the call I've got runtime error.
after searching I found that the problem is the uri of call from asterisk wich is in form of 1234 instead of +1234. How and where can i set incomming call uri in form of e.164? In lync setting? or in AsteriskNow.
I am using lync 2013, UCMA 4.0.

You can change callerid on outbound call by using something like that
exten => _x.,n,Set(CALLERID(num)=+${CALLERID(num)})
For asterisknow it maybe more complex, it is not doable via web so need see your configs.
After that call will come as +1234.

Related

How to setup HTTP Basic Authentication for SOAP Client within WebSphere Liberty

We are trying to deploy an EAR on WebSphere Liberty.
Our application contains an EJB-module, which contains and EJB that makes a call to another SOAP server.
The WSDL of the service defines a wsp:Policy with ExactlyOne of http:BasicAuthentication xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http"/
After deployment when we send a request to our application, which would trigger that SOAP-call we get an error: None of the policy alternatives can be satisfied.
I found some java-code on how to solve this
HTTPConduit http = (HTTPConduit) client.getConduit();
http.getAuthorization().setUserName("user");
http.getAuthorization().setPassword("pass");
But I do not want to do this in the Java-code but I want to make it part of the server config.
I found several helpful links, but still could not get it working.
Does anybody have any suggestions on how I can set this up?
https://www.ibm.com/support/knowledgecenter/en/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/twlp_wssec_migrating.html
https://www.ibm.com/support/knowledgecenter/en/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/twlp_sec_ws_clientcert.html
You could use the JNDI feature to express the userid and password in server.xml, then have your java code pull it out of JNDI.
https://www.ibm.com/support/knowledgecenter/en/SSD28V_8.5.5/com.ibm.websphere.wlp.core.doc/ae/twlp_dep_jndi.html

How to specify Logout Service in the PingFederateSLOURL in mod_pf configuration

We are using PingFederate as Service Provider and are using Opentokenadapter.
We are also using mod_pf apache library provided by PingFederate.
Is there any way we can configure "Logout Service (present in OpenToken Adapter )" in the mod_pf configuration? Is there any query parameter for it just like we have for PartnerIdpId, TargetResource etc?
The Apache Integration Kit's mod_pf.conf refers to the /sp/startSLO.ping application endpoint. In that configuration file is where you will configure various bits for the integration... You can review the /sp/startSLO.ping options as listed here:
https://documentation.pingidentity.com/pingfederate/pf81/index.shtml#concept_spServices.html#concept_spServices
The "Logout Service", as defined in the adapter, is where the browser will be sent to for an SLO that will destroy any current session within the SP Application. By spec, that application must return BACK to PingFederate, so that PingFederate can respond back to the IdP with a success/fail. If you plan to support SLO, then this "service" must exist. It's "goal" will be close the session, and redirect back to PingFederate with a success.

Routing of incoming calls by called number

I have two phone numbers registered with the same sip provider. I would like Asterisk/PJSIP to route phone #1 (18005551212) differently than phone #2 (18005551313).
[sipprovider-18005551212]
type=registration
client_uri=sip:18005551212#sip.provider.com:5060
[sipprovider-18005551313]
type=registration
client_uri=sip:18005551313#sip.provider.com:5060
The Contact provided by Asterisk during registration is the same for both (using default extension 's').
Contact: <sip:s#10.1.1.1:5060>;expires=120
Can I do any of the following:
1) When registering, provide an extension other than 's'? Allowing inbound calls to hit unique extensions in the dialplan.
2) Route to unique context based on the To: Header on the INVITE? (which holds the unique phone number called). I have tried using 'context=' in the pjsip.conf endpoint block, but no luck; routing is either by IP (which is the same for both phone numbers), or by name (which is based on the From: Header).
Any help or pointers would be appreciated.
You could try this from my extensions.conf
[inbound-sip]
exten => 3215445,1,Goto(sip-in-1,s,1)
exten => 2544221,1,Goto(sip-in-2,s,1)
[sip-in-1]
exten => s,1,Goto(internal-ext,6881,1)
Calls then end up in the relevant context for further processing and alerting etc. sip-in-1 or sip-in-2 in this case.
In your sip.conf or pjsip.conf you need to specify the inbound context for both numbers you have - in this case context = inbound-sip
You should enable sip debug and see if calls have anything like destination number.
If it have no - you have no way get info which not present.
If you have, you should create extension s and parse number info using SIP_HEADER function from sip request body.

Using a third party web service in vb.net

I am trying to build an app in VS Pro 2012 (VB.NET) that will invoke RoyalMail's MailMark WSDL which has methods such as RetrieveActiveSupplyChains which are expecting a single parameter (request).
I have used svcutil with the /l:vb switch to download the WSDL and referenced it in my project and I can see methods being exposed once I have done
Dim client As PosterUploadClient = New PosterUploadClient()
Now typing client. brings up all the methods I expect to see and I can pass authentication and see the state change when I do client.open() but what I can't figure out is how to provide the parameters the actual methods need. According to their documentation, RetrieveActiveSupplyChains doesn't need a parameter but they have provided an xml example of the request structure so my assumption is that I'd need to construct this as xml with the appropriate values and send it as "request"?
Does this sound right? I know this is probably meat and veg for a web programmer but not something I have attempted before. The xml they supplied as an example looks like the below:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">http://rm-manifest.com/2014/01/service/IPosterUpload/RetrieveAllActiveSupplyChains</a:Action>
<a:MessageID>urn:uuid:ab5e32a3-812e-4d91-97a8-de00a08874e9</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">https://rm-manifest.com/PosterUpload2/PosterUpload.svc/service</a:To>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2014-10-03T14:32:58.480Z</u:Created>
<u:Expires>2014-10-03T14:37:58.480Z</u:Expires>
</u:Timestamp>
<o:UsernameToken u:Id="uuid-dfaaf0b0-3823-4f75-b607-33f7434295dc-1">
<o:Username>NetworkAccess</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">p1</o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<RetrieveAllActiveSupplyChains xmlns="http://rm-manifest.com/2014/01/service">
<request xmlns:b="http://rm-manifest.com/2014/01/messages" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
</RetrieveAllActiveSupplyChains>
</s:Body>
</s:Envelope>
But I'm still not sure how it actually needs to be submitted, certainly if I read that sample one in with a new xmltextreader it doesn't like it with the following error message
Value of type 'System.Xml.XmlTextReader' cannot be converted to 'MM_TEST.Mosaic.EIB.PosterUploadService.Core.Messages.RetrieveActiveSupplyChainsRequest'
My assumption was the WSDL replaces the need to actually create a "New HttpRequest" in my code but not sure. I've done a lot of googling but not getting anything that quite works like this
The WSDL is here if this helps:
https://customertest.rm-manifest.com/PosterUpload/PosterUpload.svc
Just call the method. The provided XML is what is actually sent to the server by the WCF proxy when you call the method. You don't need to use it at all.
If you use a tool like Fiddler, you'll see that simply calling client.RetrieveAllActiveSupplyChains will send an HTTP request with a body similar to the XML sample.
In fact, everything outside the RetrieveAllActiveSupplyChains tag isn't related to the method at all - it's security and addressing data used to establish and execute a connection with a web service in general. All of this is handled by WCF.

Creating a url in controller in asp.net mvc 4

I am trying to send activation mail to the currently registered user.In mail body,I need to send a link like http://example.com/account/activation?username=d&email=g.Now, for debugging on local machine, I manually write it as localhost:30995/account/activation?username=d&email=g. But, when my port number changes, I need to rewrite it.
I tried another question
on this website,but, compiler gives error like url.action doesnot exist.
Please give me fresh solution as I am confused with that solution.
Use a Url.Action overload that takes a protocol parameter to generate your URLs:
Url.Action("Activation", "Account", new { username = "d", email = "g" }, "http")
This generates an absolute URL rather than a relative one. The protocol can be either "http" or "https". So this will return http://localhost:XXXXX/account/activation?username=d&email=g on your local machine, and http://example.com/account/activation?username=d&email=g on production.
In short, this will stick whatever domain you're hosting your app on in front of your URL; you can then change your hostname/port number/domain name as many times as you want. Your links will always point to the host they originated from. That should solve the problem you're facing.
Try using IIS / IIS-Express instead of Casinni web server that comes with visual studio.
You could add bindings to have the right URL (with host entries of course).
This will avoid the port numbers in your links.

Resources