Re: [SR-Users] Kamailio as front proxy for multiple sip servers

2021-05-10 Thread Eliphas Levy Theodoro
Hello,

I now understood that to send the request directly to the socket
instead of via UDP/invalid.ip.address. Succeded by lookup() after
save(), or asterisk's, Dial(PJSIP/local_aor) if registered locally.

I settled with passing registration by domain to the right asterisk
server beneath kamailio, and save()ing on reply 200 OK. On the
asterisks, I set kamailio as outbound proxy; They then dial the
sip:aor@domain and kamailio will lookup($rd) easily.

By the way, why save("$rd") and lookup("$rd") won't substitute for
request uri domain? It is saving a literal $rd on the location table.
In this case I will need to have multiple if()s with each domain name.
Should I use another function/table for saving multidomain contacts?

Now that the signaling is doing alright, I need to figure out about
the media, starting with that config from gitub/havfo (WEBRTC-to-SIP).

Thanks,
Eliphas

Em qui., 6 de mai. de 2021 às 16:03, Yuriy Gorlichenko
 escreveu:
>
> If pjsip path doest work ( which indeed can be a case )
> It is an option for you to mascarade contact on kamailio ( if you need to 
> register phones on asterisk ), but this is not a trivial.
>
> If you do registrar on kamailio then lookup and set up proper $du for webrtc 
> endpoints will workout for you I believe.
>
> On Thu, 6 May 2021, 20:43 Eliphas Levy Theodoro,  wrote:
>>
>> As I have got 4 different answers (thanks!) I will paste them all down there.
>>
>> Em qua., 5 de mai. de 2021 às 18:44, Eliphas Levy Theodoro
>>  escreveu:
>> >
>> > I am trying to config one kamailio as reverse proxy for a bunch of 
>> > internal (no internet address) separate asterisk sip
>> > instances (per domain). The kamailio server would be the only with the 
>> > valid IP address, so would use rtpengine to
>> > force to be in the media path.
>> >
>> > Like this scenario: 
>> > https://opensips.org/pipermail/users/2020-August/043610.html
>> >
>> > I have used as starting point this very basic config:
>> > https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-requests-setup/
>> >
>> > Basically just added rtpproxy support, and voilà, inter-SIP is working, 
>> > media always passing into the proxy.
>> >
>> > The problem: I would have WebRTC phones connecting too. I tried setting 
>> > WSS up in kamailio, and asterisk (pjsip)
>> > wouldn't know how to send the message to the proxy: on register it has 
>> > trasnport=wss in the contact: header, looks
>> > like it is confusing the asterisk.
>> >
>> > So, I resort for the wisdom of the list :) What would be the 
>> > good-best-path to take here, hack the header, or put the
>> > webphones registering directly on the asterisks (with a nginx reverse 
>> > proxy maybe)?
>>
>> [..]
>>
>> Daniel-Constantin Mierla mico...@gmail.com por  lists.kamailio.org
>> 06:26 (há 8 horas)
>> >
>> > if both endpoints can do webrtc srtp, then it works with rtpproxy to do 
>> > srtp packet forwarding for nat traversal or networks bridging.
>>
>> Yes, when a pair of softphones (ok) and softphones (not yet) exchange
>> signalling alright in that scenario, I will start on transcoding...
>>
>>
>> Wojtko, Daniel daniel.woj...@rittec.de por  lists.kamailio.org 05:32
>> (há 8 horas)
>> > afaik rtpproxy doesn't support WebRTC but rtpengine does
>>
>> As Daniel said above, I reckon that rtpproxy would work when
>> transcoding/translating sip/webrtc is not needed. But first, need to
>> pass signalling at least :)
>>
>>
>> Yuriy Gorlichenko ovoshl...@gmail.com por  lists.kamailio.org 05:55 (há 8 
>> horas)
>> >
>> > If you looking for examples: you can use this one
>> > https://github.com/havfo/WEBRTC-to-SIP as starting point
>> >
>> > anyway, the Path mentioned by Alex is the best approach.
>>
>> I tried that one but could not figure most of it out... I think I
>> borked it. Tried only changing $du to asterisk instead of doing
>> register locally and got the same results (and lots of rtpengine
>> chattiness) too, so I am using now a very simple config to make
>> finding the signalling problem easier.
>>
>>
>> > Alex Balashov abalas...@evaristesys.com por  lists.kamailio.org 03:26 (há 
>> > 10 horas)
>> > It sounds like you are in need of the Path extension:
>>
>> That was one of the modifications I have made, found out later that
>> the problem is PJSIP not handling Path: anyway:
>> https://community.asterisk.org/t/pjsip-path-module-issues/88046
>> https://issues.asterisk.org/jira/browse/ASTERISK-28211
>> So I have changed back to the older chan_sip interface, problem
>> solved, that one worked with Path: header. Now asterisk sends the
>> invite back to kamailio!
>>
>> Now, the basic signalling of webphone -> kamailio -> asterisk ->
>> kamailio -> otherphone is stopping on kamailio itself, it is sending
>> the packet via UDP like asterisk was, instead of using the socket.
>>
>> This is how the webphone contact looks like:
>> 
>> Kamailio (and asterisk before Path: worked) invites
>> UDP:192.0.2.210:5060, instead of the "local" websocket, and of 

[SR-Users] Bad config - you can not call 'handle_publish' function (db_url not set)

2021-05-10 Thread Juha Heinanen
Marrold writes:

> Any suggestions appreciated.
> 
> # - presence params -
> modparam("presence", "db_url", DBURL)
> modparam("presence", "db_update_period", 20)
> modparam("presence", "clean_period", 60)
> modparam("presence", "local_log_facility", "LOG_LOCAL3")
> modparam("presence", "max_expires", 14430)
> 
> # - presence_xml params -
> modparam("presence_xml", "db_url", DBURL)
> modparam("presence_xml", "force_active", 1)

Mine starts with the following presence config:

loadmodule "presence"
loadmodule "presence_dialoginfo"
loadmodule "presence_reginfo"
loadmodule "presence_mwi"
loadmodule "presence_profile"
loadmodule "presence_xml"

# -- presence params
modparam("presence", "db_url", "MYSQL_PRES_SERV_URL")
modparam("presence", "server_address", 
"sip:PRESENCE_SERVER_IP:PRESENCE_SERVER_PORT;transport=tcp")
modparam("presence", "max_expires", 15552000)   # 6 months
modparam("presence", "pres_subs_mode", 0)

# -- presence_xml params
modparam("presence_xml", "db_url", "MYSQL_PRES_SERV_URL")
modparam("presence_xml", "force_active", 1)
modparam("presence_xml", "integrated_xcap_server", 1)

-- Juha

__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Bad config - you can not call 'handle_publish' function (db_url not set)

2021-05-10 Thread Daniel-Constantin Mierla
Hello,

do you use utils module? If yes, what is your operating system and the
compiler version (if you compiled from sources, not installing from
packages)?

Cheers,
Daniel

On 10.05.21 15:01, Marrold wrote:
> Hi,
>
> We're trying to upgrade from 5.3.X to 5.4.5 however kamailio will not
> start and produces the following error, despite the db_url being set
> in the config and printed in the logs:
>
> Bad config - you can not call 'handle_publish' function (db_url not set)
>
> Looking at the code this error only seems plausible if the
> /pres_library_mode/ is set to 1 here
> 
>  but
> we don't see the corresponding "switch to library mode" message in the
> debug logs which leaves me a bit stuck - I've included the grepped
> logs at the bottom of the message.
>
> Does anyone have any ideas what is causing this issue? I've seen a
> previous issue relating to interactions between presence and
> presence_xml which we're also using, but it looks like this was fixed
> in an older version.
>
> Any suggestions appreciated.
>
> # - presence params -
> modparam("presence", "db_url", DBURL)
> modparam("presence", "db_update_period", 20)
> modparam("presence", "clean_period", 60)
> modparam("presence", "local_log_facility", "LOG_LOCAL3")
> modparam("presence", "max_expires", 14430)
>
> # - presence_xml params -
> modparam("presence_xml", "db_url", DBURL)
> modparam("presence_xml", "force_active", 1)
>
> root@kamailio:/etc/kamailio# grep -i "presence"
> /var/log/kamailio/kamailio.log
> May 10 12:44:14 kamailio /sbin/kamailio[23729]: ERROR: presence
> [presence.c:656]: fixup_presence(): Bad config - you can not call
> 'handle_publish' function (db_url not set)
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.y:1810]:
> yyparse(): loading module presence.so
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/sr_module.c:525]: load_module(): trying to load
> 
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/kemi.c:2927]:
> sr_kemi_modules_add(): adding module: presence
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/sr_module.c:287]: register_module(): register PV from: presence
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.lex:1796]:
> pp_define(): defining id: MOD_presence
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.y:1810]:
> yyparse(): loading module presence_xml.so
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/sr_module.c:525]: load_module(): trying to load
> 
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/kemi.c:2927]:
> sr_kemi_modules_add(): adding module: presence_xml
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.lex:1796]:
> pp_define(): defining id: MOD_presence_xml
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.y:1810]:
> yyparse(): loading module presence_mwi.so
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/sr_module.c:525]: load_module(): trying to load
> 
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.lex:1796]:
> pp_define(): defining id: MOD_presence_mwi
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.y:1810]:
> yyparse(): loading module presence_dialoginfo.so
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/sr_module.c:525]: load_module(): trying to load
> 
> May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.lex:1796]:
> pp_define(): defining id: MOD_presence_dialoginfo
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/modparam.c:107]: set_mod_param_regex(): 'presence' matches
> module 'presence'
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/sr_module.c:744]: find_param_export(): found  in module
> presence [/lib64/kamailio/modules/presence.so]
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/modparam.c:123]: set_mod_param_regex(): found  in module
> presence [/lib64/kamailio/modules/presence.so]
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/modparam.c:107]: set_mod_param_regex(): 'presence' matches
> module 'presence'
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/sr_module.c:744]: find_param_export(): found 
> in module presence [/lib64/kamailio/modules/presence.so]
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/modparam.c:123]: set_mod_param_regex(): found 
> in module presence [/lib64/kamailio/modules/presence.so]
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/modparam.c:107]: set_mod_param_regex(): 'presence' matches
> module 'presence'
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/sr_module.c:744]: find_param_export(): found  in
> module presence [/lib64/kamailio/modules/presence.so]
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/modparam.c:123]: set_mod_param_regex(): found  in
> module presence [/lib64/kamailio/modules/presence.so]
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> [core/modparam.c:107]: set_mod_param_regex(): 'presence' matches
> module 'presence'
> May 10 12:44:41 kamailio kamailio: DEBUG: 
> 

Re: [SR-Users] No Audio For Outbound Calls

2021-05-10 Thread David Villasmil
Is the telecom operator on a private network? The 200 OK SDP is asking the
telco to send the rtp to 10.0.X.X.

The 200 OK (Kamailio->telco) the sdp says:

c=IN IP4 10.0.X.X

That should be an IP the telco can reach.

You need to configure kamailio and RTPProxy to set an IP the telco can
actually reach. And probably do it on both the INVITE and the 200 OK.

On the initial invite, you should do the the same.


On Mon, 10 May 2021 at 11:39, Kashish Raheja 
wrote:

> Here are the SIP Traces:
>
> *Asterisk Server to Kamailio Server (SDP Packet):*
>
> 2021/05/10 15:54:52.835255 10.0.X.X:5060 -> 10.0.X.X:5060
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP
> 192.168.0.192;branch=z9hG4bK2599.de1bcd2ba5f8bfc86afb083b0a9e3f65.0;received=10.0.X.X;rport=5060,SIP/2.0/UDP
> 3.236.X.X:5060;branch=z9hG4bK5a69547a;received=3.236.X.X;rport=5060
> Record-Route: 
> Call-ID: 58eb00885daef7ff3a67ad0e235e817a@14.98.22.110
> From: ;tag=as2b21d944
> To: ;tag=aa2c806-Huku2c07186a1
> CSeq: 102 INVITE
> Allow:
> INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
> Contact:  :5060;Hpt=8e72_16;CxtId=3;TRC=->
> User-Agent: ZTE Softswitch/1.0.0
> Require: timer
> Session-Expires: 7200;refresher=uac
> Content-Length: 182
> Content-Type: application/sdp
>
> v=0
> o=- 1936 20890 IN IP4 10.0.X.X
> s=SBC call
> c=IN IP4 10.0.X.X
> t=0 0
> m=audio 37874 RTP/AVP 8 101
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=rtpmap:8 PCMA/8000/1
>
>
> *Kamailio Server to Telecom Operator Carrier (SDP Packet):*
>
> 2021/05/10 15:54:52.835419 192.168.0.192:5060 -> 3.X.X.X:5060
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 3.236.72.101:5060
> ;branch=z9hG4bK5a69547a;received=3.236.72.101;rport=5060
> Record-Route: 
> Call-ID: 58eb00885daef7ff3a67ad0e235e817a@14.98.22.110
> From: ;tag=as2b21d944
> To: ;tag=aa2c806-Huku2c07186a1
> CSeq: 102 INVITE
> Allow:
> INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
> Contact:  :5060;Hpt=8e72_16;CxtId=3;TRC=->
> User-Agent: ZTE Softswitch/1.0.0
> Require: timer
> Session-Expires: 7200;refresher=uac
> Content-Length: 182
> Content-Type: application/sdp
>
> v=0
> o=- 1936 20890 IN IP4 10.0.X.X
> s=SBC call
> c=IN IP4 10.0.X.X
> t=0 0
> m=audio 37874 RTP/AVP 8 101
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=rtpmap:8 PCMA/8000/1
>
> Regards
> Kashish
>
>
> On Mon, May 10, 2021 at 2:37 PM Kashish Raheja <
> kashishraheja1...@gmail.com> wrote:
>
>> Hi All,
>>
>> I have set up Kamailio in the following manner:
>>
>> Kamailio (Physical Server: Register to Telecom Operator Carrier SIP
>> trunk) ---> Asterisk Server (on Cloud having public IP)
>>
>> I am successfully able to route the call to Asterisk server on Cloud when
>> I make a call to the number provided by the carrier and there is audio also
>> on both sides.
>>
>> However, when I am making an outbound call from Asterisk server to the
>> number through Kamailio, there is no audio when I pick up the call. I have
>> tried to capture the traces but not able to understand the exact problem
>> here.
>>
>> Note: I am running the RTP proxy on Kamailio server.
>>
>> Any help on why this might be happening?
>>
>> Thanks.
>> Regards
>> Kashish
>> +919413745250
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Bad config - you can not call 'handle_publish' function (db_url not set)

2021-05-10 Thread Marrold
Hi,

We're trying to upgrade from 5.3.X to 5.4.5 however kamailio will not start
and produces the following error, despite the db_url being set in the
config and printed in the logs:

Bad config - you can not call 'handle_publish' function (db_url not set)

Looking at the code this error only seems plausible if the
*pres_library_mode* is set to 1 here

but
we don't see the corresponding "switch to library mode" message in the
debug logs which leaves me a bit stuck - I've included the grepped logs at
the bottom of the message.

Does anyone have any ideas what is causing this issue? I've seen a previous
issue relating to interactions between presence and presence_xml which
we're also using, but it looks like this was fixed in an older version.

Any suggestions appreciated.

# - presence params -
modparam("presence", "db_url", DBURL)
modparam("presence", "db_update_period", 20)
modparam("presence", "clean_period", 60)
modparam("presence", "local_log_facility", "LOG_LOCAL3")
modparam("presence", "max_expires", 14430)

# - presence_xml params -
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)

root@kamailio:/etc/kamailio# grep -i "presence"
/var/log/kamailio/kamailio.log
May 10 12:44:14 kamailio /sbin/kamailio[23729]: ERROR: presence
[presence.c:656]: fixup_presence(): Bad config - you can not call
'handle_publish' function (db_url not set)
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.y:1810]:
yyparse(): loading module presence.so
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/sr_module.c:525]:
load_module(): trying to load 
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/kemi.c:2927]:
sr_kemi_modules_add(): adding module: presence
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/sr_module.c:287]:
register_module(): register PV from: presence
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.lex:1796]:
pp_define(): defining id: MOD_presence
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.y:1810]:
yyparse(): loading module presence_xml.so
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/sr_module.c:525]:
load_module(): trying to load 
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/kemi.c:2927]:
sr_kemi_modules_add(): adding module: presence_xml
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.lex:1796]:
pp_define(): defining id: MOD_presence_xml
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.y:1810]:
yyparse(): loading module presence_mwi.so
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/sr_module.c:525]:
load_module(): trying to load 
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.lex:1796]:
pp_define(): defining id: MOD_presence_mwi
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.y:1810]:
yyparse(): loading module presence_dialoginfo.so
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/sr_module.c:525]:
load_module(): trying to load

May 10 12:44:41 kamailio kamailio: DEBUG:  [core/cfg.lex:1796]:
pp_define(): defining id: MOD_presence_dialoginfo
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/modparam.c:107]:
set_mod_param_regex(): 'presence' matches module 'presence'
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/sr_module.c:744]:
find_param_export(): found  in module presence
[/lib64/kamailio/modules/presence.so]
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/modparam.c:123]:
set_mod_param_regex(): found  in module presence
[/lib64/kamailio/modules/presence.so]
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/modparam.c:107]:
set_mod_param_regex(): 'presence' matches module 'presence'
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/sr_module.c:744]:
find_param_export(): found  in module presence
[/lib64/kamailio/modules/presence.so]
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/modparam.c:123]:
set_mod_param_regex(): found  in module presence
[/lib64/kamailio/modules/presence.so]
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/modparam.c:107]:
set_mod_param_regex(): 'presence' matches module 'presence'
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/sr_module.c:744]:
find_param_export(): found  in module presence
[/lib64/kamailio/modules/presence.so]
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/modparam.c:123]:
set_mod_param_regex(): found  in module presence
[/lib64/kamailio/modules/presence.so]
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/modparam.c:107]:
set_mod_param_regex(): 'presence' matches module 'presence'
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/sr_module.c:744]:
find_param_export(): found  in module presence
[/lib64/kamailio/modules/presence.so]
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/modparam.c:123]:
set_mod_param_regex(): found  in module presence
[/lib64/kamailio/modules/presence.so]
May 10 12:44:41 kamailio kamailio: DEBUG:  [core/modparam.c:107]:
set_mod_param_regex(): 'presence' matches module 'presence'
May 10 12:44:41 kamailio kamailio: 

Re: [SR-Users] No Audio For Outbound Calls

2021-05-10 Thread Kashish Raheja
Here are the SIP Traces:

*Asterisk Server to Kamailio Server (SDP Packet):*

2021/05/10 15:54:52.835255 10.0.X.X:5060 -> 10.0.X.X:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.0.192;branch=z9hG4bK2599.de1bcd2ba5f8bfc86afb083b0a9e3f65.0;received=10.0.X.X;rport=5060,SIP/2.0/UDP
3.236.X.X:5060;branch=z9hG4bK5a69547a;received=3.236.X.X;rport=5060
Record-Route: 
Call-ID: 58eb00885daef7ff3a67ad0e235e817a@14.98.22.110
From: ;tag=as2b21d944
To: ;tag=aa2c806-Huku2c07186a1
CSeq: 102 INVITE
Allow:
INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
Contact: 
User-Agent: ZTE Softswitch/1.0.0
Require: timer
Session-Expires: 7200;refresher=uac
Content-Length: 182
Content-Type: application/sdp

v=0
o=- 1936 20890 IN IP4 10.0.X.X
s=SBC call
c=IN IP4 10.0.X.X
t=0 0
m=audio 37874 RTP/AVP 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:8 PCMA/8000/1


*Kamailio Server to Telecom Operator Carrier (SDP Packet):*

2021/05/10 15:54:52.835419 192.168.0.192:5060 -> 3.X.X.X:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 3.236.72.101:5060
;branch=z9hG4bK5a69547a;received=3.236.72.101;rport=5060
Record-Route: 
Call-ID: 58eb00885daef7ff3a67ad0e235e817a@14.98.22.110
From: ;tag=as2b21d944
To: ;tag=aa2c806-Huku2c07186a1
CSeq: 102 INVITE
Allow:
INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
Contact: 
User-Agent: ZTE Softswitch/1.0.0
Require: timer
Session-Expires: 7200;refresher=uac
Content-Length: 182
Content-Type: application/sdp

v=0
o=- 1936 20890 IN IP4 10.0.X.X
s=SBC call
c=IN IP4 10.0.X.X
t=0 0
m=audio 37874 RTP/AVP 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:8 PCMA/8000/1

Regards
Kashish


On Mon, May 10, 2021 at 2:37 PM Kashish Raheja 
wrote:

> Hi All,
>
> I have set up Kamailio in the following manner:
>
> Kamailio (Physical Server: Register to Telecom Operator Carrier SIP trunk)
> ---> Asterisk Server (on Cloud having public IP)
>
> I am successfully able to route the call to Asterisk server on Cloud when
> I make a call to the number provided by the carrier and there is audio also
> on both sides.
>
> However, when I am making an outbound call from Asterisk server to the
> number through Kamailio, there is no audio when I pick up the call. I have
> tried to capture the traces but not able to understand the exact problem
> here.
>
> Note: I am running the RTP proxy on Kamailio server.
>
> Any help on why this might be happening?
>
> Thanks.
> Regards
> Kashish
> +919413745250
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] No Audio For Outbound Calls

2021-05-10 Thread David Villasmil
SDP is probably wrong, a trace here would help.

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Mon, May 10, 2021 at 10:11 AM Kashish Raheja 
wrote:

> Hi All,
>
> I have set up Kamailio in the following manner:
>
> Kamailio (Physical Server: Register to Telecom Operator Carrier SIP trunk)
> ---> Asterisk Server (on Cloud having public IP)
>
> I am successfully able to route the call to Asterisk server on Cloud when
> I make a call to the number provided by the carrier and there is audio also
> on both sides.
>
> However, when I am making an outbound call from Asterisk server to the
> number through Kamailio, there is no audio when I pick up the call. I have
> tried to capture the traces but not able to understand the exact problem
> here.
>
> Note: I am running the RTP proxy on Kamailio server.
>
> Any help on why this might be happening?
>
> Thanks.
> Regards
> Kashish
> +919413745250
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] No Audio For Outbound Calls

2021-05-10 Thread Kashish Raheja
Hi All,

I have set up Kamailio in the following manner:

Kamailio (Physical Server: Register to Telecom Operator Carrier SIP trunk)
---> Asterisk Server (on Cloud having public IP)

I am successfully able to route the call to Asterisk server on Cloud when I
make a call to the number provided by the carrier and there is audio also
on both sides.

However, when I am making an outbound call from Asterisk server to the
number through Kamailio, there is no audio when I pick up the call. I have
tried to capture the traces but not able to understand the exact problem
here.

Note: I am running the RTP proxy on Kamailio server.

Any help on why this might be happening?

Thanks.
Regards
Kashish
+919413745250
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] loose_route() and FQDN

2021-05-10 Thread Igor Olhovskiy

Sergiu,

Actually, yes

Problem is in order of checking in this function

https://github.com/kamailio/kamailio/blob/02240711239149e2f5c4890a70ab158d10fa8187/src/modules/siputils/sipops.c#L183

        if (((ip = str2ip(&(puri.host))) == NULL)
                && ((ip = str2ip6(&(puri.host))) == NULL)) {
            LM_DBG("uri host is not an ip address\n");
            return -1;
        }

So, it's checking if Record-Route is an IP address before actually 
calling *check_self()* function. I'll add an issue.


Regards,
Igor

On 08.05.2021 02:42, Sergiu Pojoga wrote:

May be related to a previous topic about is_first_hop() and 'myself'

https://lists.kamailio.org/pipermail/sr-users/2018-October/103261.html 



On Fri, May 7, 2021 at 7:22 PM David Villasmil 
> wrote:



Can you share a trace?

On Fri, 7 May 2021 at 21:12, Igor Olhovskiy
mailto:igorolhovs...@gmail.com>> wrote:

Yes. It passesuri == myself condition on auth.

Regards,
Igor

On 07.05.2021 17:32, David Villasmil wrote:

Have you tried verifying Kamailio actually believes the FQDN
is itself?

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com

phone: +34669448337


On Fri, May 7, 2021 at 4:18 PM Igor Olhovskiy
mailto:igorolhovs...@gmail.com>> wrote:

David,

Yes, I did added it, means it was there, but
is_first_hop() was blocking adding it. I think it's some
leftovers from default config.

So, my conclusion, that is_first_hop() is ok with IP
addresses, but not ok with FQDN in route. Although FQDN
is added as alias

Regards,
Igor

On 07.05.2021 16:07, David Villasmil wrote:

Did you add the handle_ruri_alias() as suggested by
Daniel? I had something like this where I would get
“unable to resolve blah blah blah" and it’s because the
RURI is the actual wss “address” which is unresolvable,
so executing the function forces kamailio to take the
alias instead.


On Fri, 7 May 2021 at 13:48, Igor Olhovskiy
mailto:igorolhovs...@gmail.com>> wrote:

Daniel,

Seems to be it's really the case, but with other
function

With FQDN in RR


  |is_first_hop()|

is not acting correctly for reply.


For incoming SIP replies, it means that top
Record-Route URI is 'myself' and source address is
not matching it

But in Record-Route we have "myself", but
*is_first_hop()* returning 0.

Thanks!

Regards,
Igor

On 07.05.2021 14:22, Daniel-Constantin Mierla wrote:


OK, because looping was something that should not
have happened in this case.

Then the problem is that you do not do
nat-traversal-like processing for websocket/webrtc
traffic. You have to use set_contact_alias() +
handle_ruri_alias() because the webrtc endpoints do
not set "valid" contact addresses.

Cheers,
Daniel

On 07.05.21 14:13, Igor Olhovskiy wrote:


Ah, no, sorry, I was wrong at this one,

This just is not sent with "unable to resolve
address toleivu2gdbh.invalid".

Sorry. Looping were something else during my
tests, this just with *advertise* added

Regards,
Igor
On 07.05.2021 14:02, Daniel-Constantin Mierla wrote:


This looks like incoming ACK, because there is
only one Via header, so it is not what proxy
forwards -- that one is relevant to see what
headers were consumed and added.

Cheers,
Daniel

On 07.05.21 13:51, Igor Olhovskiy wrote:

Sure.

ACK sip:88290@toleivu2gdbh.invalid;transport=wss
SIP/2.0
Via: SIP/2.0/UDP

A_IP_ADDRESS:5060;rport;branch=z9hG4bKPj8d05548a-91ef-4332-8617-32f8eeebf8f2
From:

;tag=0a3e31a6-96ad-42d0-9310-81b35cedbd3d
To: ;tag=hvra7mj3q0
Call-ID: 46f44741-d155-4dd5-8fd8-78e540fc1acb
CSeq: 18326 ACK
Route:


Route:


Max-Forwards: 70
User-Agent: Asterisk PBX 13.33.0
Content-Length:  0