MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / ospDumpAllDestination

Function ospDumpAllDestination

modules/osp/destination.c:519–553  ·  view source on GitHub ↗

* Dump all destination information */

Source from the content-addressed store, hash-verified

517 * Dump all destination information
518 */
519void ospDumpAllDestination(void)
520{
521 struct usr_avp* destavp = NULL;
522 int_str destval;
523 osp_dest* dest = NULL;
524 int count = 0;
525
526 for (destavp = search_first_avp(AVP_VAL_STR, _osp_origdest_avpid, NULL, 0);
527 destavp != NULL;
528 destavp = search_next_avp(destavp, NULL))
529 {
530 get_avp_val(destavp, &destval);
531
532 /* OSP destination is wrapped in a string */
533 dest = (osp_dest*)destval.s.s;
534
535 LM_DBG("....originate '%d'....\n", count++);
536
537 ospDumpDestination(dest);
538 }
539 if (count == 0) {
540 LM_DBG("there is not originate destination AVP\n");
541 }
542
543 if (search_first_avp(AVP_VAL_STR, _osp_termdest_avpid, &destval, 0) != NULL) {
544 /* OSP destination is wrapped in a string */
545 dest = (osp_dest*)destval.s.s;
546
547 LM_DBG("....terminate....\n");
548
549 ospDumpDestination(dest);
550 } else {
551 LM_DBG("there is not terminate destination AVP\n");
552 }
553}
554
555/*
556 * Convert "address:port" to "[x.x.x.x]:port" or "hostname:port" format

Callers

nothing calls this directly

Calls 4

search_first_avpFunction · 0.85
search_next_avpFunction · 0.85
get_avp_valFunction · 0.85
ospDumpDestinationFunction · 0.85

Tested by

no test coverage detected