Hello,
I would like to assign multiple DIDs (not sure how it's called in Kamailio) for one of my sip user. This sip user is registering with 7000 as username, and I would like to assign 7001, 7002 numbers to this sip user.
I have tried using dbaliases function, so I have added 7001 and 7002 as aliases for 7000. If I call 7002, then alias is retrieved fine from db, I have no problem with that. But 7000 is receiving this call as 7000 (so he see 7000 as a called number, instead of 7002).
is there a way to send "called number 7002" to 7000?
Kind regards,
Dmitri
Hello,
On 14.07.2009 11:33 Uhr, asd wrote:
Hello,
I would like to assign multiple DIDs (not sure how it's called in Kamailio) for one of my sip user. This sip user is registering with 7000 as username, and I would like to assign 7001, 7002 numbers to this sip user.
I have tried using dbaliases function, so I have added 7001 and 7002 as aliases for 7000. If I call 7002, then alias is retrieved fine from db, I have no problem with that. But 7000 is receiving this call as 7000 (so he see 7000 as a called number, instead of 7002).
is there a way to send "called number 7002" to 7000?
If by called number you mean username in R-URI, then the value is taken from the contact address stored in location table, which was uploaded by 7000 at registration. You can try:
$rU = $oU;
after doing lookup("location"); and see if you get what you want.
Cheers, Daniel
-- Daniel-Constantin Mierla http://www.asipto.com
2009/7/14, Daniel-Constantin Mierla miconda@gmail.com:
If by called number you mean username in R-URI, then the value is taken from the contact address stored in location table, which was uploaded by 7000 at registration. You can try:
$rU = $oU;
after doing lookup("location"); and see if you get what you want.
Thank you for your reply Daniel! I have added $rU = $oU; after lookup("location");
It works fine from now, according to the log, invite goes out as 7002@xx.xx.xx.xx
Kind regards, Dmitri
2009/7/14, asd xbt.dev@gmail.com:
2009/7/14, Daniel-Constantin Mierla miconda@gmail.com:
If by called number you mean username in R-URI, then the value is taken from the contact address stored in location table, which was uploaded by 7000 at registration. You can try:
$rU = $oU;
after doing lookup("location"); and see if you get what you want.
Thank you for your reply Daniel! I have added $rU = $oU; after lookup("location");
It works fine from now, according to the log, invite goes out as 7002@xx.xx.xx.xx
Kind regards, Dmitri
Ok, I have another question left. I haven't tried it yet, I'm just asking if it's possible or not.
I'll install Asterisk and I'll add 7000 to it, so Asterisk will register as 7000 in Kamailio. it's possible to set outbound callerid in asterisk to 7002, even if I call out from 7000? So basically 7002 is an alias for 7000, and I would like to display 7002.
Kind regards, Dmitri
Ok, I have another question left. I haven't tried it yet, I'm just asking if it's possible or not.
I'll install Asterisk and I'll add 7000 to it, so Asterisk will register as 7000 in Kamailio. it's possible to set outbound callerid in asterisk to 7002, even if I call out from 7000? So basically 7002 is an alias for 7000, and I would like to display 7002.
Kind regards, Dmitri
It would be better to control your RPID and P-Asserted headers in Kamailio, IMHO.
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
2009/7/14, Nick Warr nick@mobilia.it:
Ok, I have another question left. I haven't tried it yet, I'm just asking if it's possible or not.
I'll install Asterisk and I'll add 7000 to it, so Asterisk will register as 7000 in Kamailio. it's possible to set outbound callerid in asterisk to 7002, even if I call out from 7000? So basically 7002 is an alias for 7000, and I would like to display 7002.
Kind regards, Dmitri
It would be better to control your RPID and P-Asserted headers in Kamailio, IMHO.
So basically like this?
if ($fu =~ "^sip:7002+@") { xlog("L_INFO", "Changing callerid\n"); uac_replace_from("$avp(s:display)","sip:7002@domain.com"); ... ... } Sorry if it's sounds like a dumb question, I'm a beginner in Kamailio.
Kind regards, Dmitri
asd ha scritto:
2009/7/14, Nick Warr nick@mobilia.it:
Ok, I have another question left. I haven't tried it yet, I'm just asking if it's possible or not.
I'll install Asterisk and I'll add 7000 to it, so Asterisk will register as 7000 in Kamailio. it's possible to set outbound callerid in asterisk to 7002, even if I call out from 7000? So basically 7002 is an alias for 7000, and I would like to display 7002.
Kind regards, Dmitri
It would be better to control your RPID and P-Asserted headers in Kamailio, IMHO.
So basically like this?
if ($fu =~ "^sip:7002+@") { xlog("L_INFO", "Changing callerid\n"); uac_replace_from("$avp(s:display)","sip:7002@domain.com"); ... ... }
Sorry if it's sounds like a dumb question, I'm a beginner in Kamailio.
Kind regards, Dmitri
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
If you want to change the from user, yeah.
Callerid if done properly, should be P-Asserted/P-Preferred Identity, or Remote-Party-ID headers. If you're terminating to PSTN, or trunking, those are the proper headers to use for trustable callerid (and privacy,etc).
Nick