Softphone, webphone and VoIP server Forum

HomeHomeDiscussionsDiscussionsMizu WebphoneMizu Webphonesetsipheadersetsipheader
Previous
 
Next
New Post
5/5/2016 8:28 PM
 
Hi, I am attempting to use set sipheader but it does not seem to be working. 
Here is what I am doing: (values changed to be generic)

var sipHeader = "X-MY-URI: sip:"+dial_url;
webphone_api.setsipheader(sipHeader);

and then I have a button on my page where I can verify that the header has been set correctly, when the button is clicked it runs this:
webphone_api.getsipheader("X-MY-URI",function(value){
    alert("SIP HEADER SET TO: '"+value+"'");
});

Seems pretty straightforward but I keep getting a blank string from getsipheader... am I missing something?

Thanks

 

 

 

 

 

 


 
New Post
5/6/2016 6:26 AM
 
Hi

This is happening because:

  • the setsipheader() is for outgoing headers  (the webphone will send it to the server in SIP messages)
  • the getsipheader() is about incoming headers (sent by the server to the webphone)
Hope that this helps.

 
New Post
12/14/2016 7:10 PM
 
i'm using
webphone_api.onLoaded(function (){
webphone_api.setparameter("enginepriority_webrtc", "0");
webphone_api.setparameter("enginepriority_ns", "5");
webphone_api.setparameter("enginepriority_flash", "0");
webphone_api.setparameter("enginepriority_app", "0");
webphone_api.setparameter("enginepriority_p2p", "0");
webphone_api.setparameter("enginepriority_accessnum", "0");
webphone_api.setparameter("enginepriority_nativedial", "0");

webphone_api.setparameter("serveraddress", "127.0.0.1:5060");
webphone_api.setparameter("username", "3000");
webphone_api.setparameter("password", "mypswd");
webphone_api.start();

webphone_api.setsipheader("X-CRM-Id: test1");
webphone_api.setsipheader("X-OPP-Id: test2");
webphone_api.call("3001");
});

my asterisk context is:
exten => _XXXX,1,NoOp(${SIP_HEADER(X-CRM-Id)})
exten => _XXXX,2,NoOp(${SIP_HEADER(X-OPP-Id)})
exten => _XXXX,n,Dial(SIP/${EXTEN},60, tTkK)
exten => _XXXX,n,Hangup()

the call is ok, but the variables X-CRM-Id and X-OPP-Id are not set. why it doesn't work?

the call is ok
 
New Post
12/15/2016 5:52 PM
 
i've tried also with:

webphone_api.onLoaded(function (){

webphone_api.setparameter("enginepriority_webrtc", "0");
webphone_api.setparameter("enginepriority_ns", "5");
webphone_api.setparameter("enginepriority_flash", "0");
webphone_api.setparameter("enginepriority_app", "0");
webphone_api.setparameter("enginepriority_p2p", "0");
webphone_api.setparameter("enginepriority_accessnum", "0");
webphone_api.setparameter("enginepriority_nativedial", "0");

webphone_api.setparameter("serveraddress", "127.0.0.1:5060");
webphone_api.setparameter("username", "3000");
webphone_api.setparameter("password", "mypswd");
webphone_api.start();

webphone_api.setparameter('customsipheader', 'X-CRM-id:test1; X-OPP-id:test2');
webphone_api.call("3001");
});

X-CRM-id is set to value: "test1; X-OPP-id:test2"

before i buy this software i need to solve this problem.
 
New Post
12/16/2016 6:34 AM
 
The problem is that the setsipheader() is for outgoing messages (the webphone will send this to your sip server in SIP signaling messages).
The getsipheader() is for incoming messages (extracted from SIP signaling messages sent from your server).

If I am wrong or if your server doesn't receive the header set with the setsipheader(), please send us a log from the browser console about this to webphone@mizu-voip.com and we will check it.

Meantime we will also test this and it will be fixed with the upcoming release if there is any issue regarding passing the SIP headers. (We plan to release a new version -v.1.9- next week).
 
New Post
12/16/2016 7:11 AM
 
i' ve solved by using:

webphone_api.setparameter('customsipheader', 'X-CRM-id:test1\nX-OPP-id:test2');
 
New Post
12/16/2016 8:28 AM
 
Ok, good to know.
We will check why the same doesn't work via API.
 
Previous
 
Next
HomeHomeDiscussionsDiscussionsMizu WebphoneMizu Webphonesetsipheadersetsipheader


You need to register / login to be able to post in the forum